From owner-freebsd-current@FreeBSD.ORG Wed Apr 14 09:19:45 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 663A116A4CE for ; Wed, 14 Apr 2004 09:19:45 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 066A043D1D for ; Wed, 14 Apr 2004 09:19:45 -0700 (PDT) (envelope-from se@freebsd.org) Received: from [212.227.126.207] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1BDn72-0007Eb-00; Wed, 14 Apr 2004 18:19:44 +0200 Received: from [80.132.234.26] (helo=Gatekeeper.FreeBSD.org) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1BDn71-0004hY-00; Wed, 14 Apr 2004 18:19:44 +0200 Received: from StefanEsser.FreeBSD.org (StefanEsser [192.168.0.10]) by Gatekeeper.FreeBSD.org (Postfix) with ESMTP id 4634A5F18; Wed, 14 Apr 2004 18:19:42 +0200 (CEST) Received: by StefanEsser.FreeBSD.org (Postfix, from userid 200) id 1ECD22324; Wed, 14 Apr 2004 18:19:42 +0200 (CEST) Date: Wed, 14 Apr 2004 18:19:42 +0200 From: Stefan =?iso-8859-1?Q?E=DFer?= To: Martin Message-ID: <20040414161942.GB5753@StefanEsser.FreeBSD.org> Mail-Followup-To: Stefan =?iso-8859-1?Q?E=DFer?= , Martin , Garance A Drosihn , FreeBSD Current References: <20040413121925.GB29867@voodoo.oberon.net> <407C4035.8020609@ciam.ru> <1081896823.772.58.camel@klotz.local> <1081901028.772.72.camel@klotz.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1081901028.772.72.camel@klotz.local> User-Agent: Mutt/1.5.6i X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:fa3fae9b6ca38d745862a668565919f6 cc: FreeBSD Current cc: Garance A Drosihn Subject: Re: Second "RFC" on pkg-data idea for ports X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Apr 2004 16:19:45 -0000 On 2004-04-14 02:03 +0200, Martin wrote: > > Would it be useful-enough if the pd-handling program > > could spit out a true XML-formatted document, once we knew > > what that was? I realize this is rather lame, but it would > > allow us to keep this key program pretty small and simple. > > I think, XML is good for writing out things. You can > simply use fprintfs to spit out the data. It is normal to > do that. It would be a good idea to have a good DTD > or a XML-schema to parse it later. Having this few things > in mind, you can just start with a XML-prologue, then > the DOCTYPE and then whatever you want (as long as it's > well-formed and valid XML). I've developed an XML based web-application during the last few months (which is using XML for configuration data and to generate, transform/process and display content). Based on my experiences, I'd rather not generate XML data with printf(), since you have to be careful to encode special characters correctly and the XML serializer does this for you (including support for UTF-8, if desired). In fact, I found that building a DOM tree in RAM using libxml2 calls is quite simple. My suggestion is to use libxml2/libxslt which are fast, actively maintained and come with acceptable licences (BSD style). Regards, STefan