From owner-freebsd-current@FreeBSD.ORG Tue Apr 13 15:53:55 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 C260716A4CE for ; Tue, 13 Apr 2004 15:53:55 -0700 (PDT) Received: from smtp.web.de (smtp06.web.de [217.72.192.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E1DC43D53 for ; Tue, 13 Apr 2004 15:53:55 -0700 (PDT) (envelope-from nakal@web.de) Received: from [217.225.235.219] (helo=[217.225.235.219]) by smtp.web.de with esmtp (TLSv1:DES-CBC3-SHA:168) (WEB.DE 4.101 #91) id 1BDWmo-0004YO-00; Wed, 14 Apr 2004 00:53:46 +0200 From: Martin To: Garance A Drosihn In-Reply-To: References: <20040413121925.GB29867@voodoo.oberon.net> <407C4035.8020609@ciam.ru> Content-Type: text/plain Message-Id: <1081896823.772.58.camel@klotz.local> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Wed, 14 Apr 2004 00:53:44 +0200 Content-Transfer-Encoding: 7bit Sender: nakal@web.de cc: FreeBSD Current 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: Tue, 13 Apr 2004 22:53:55 -0000 Am Tue, den 13.04.2004 schrieb Garance A Drosihn um 23:40: > Well, do not focus too much on whether it is "XML-like". > > It is just a format I dreamed up. It does what I want it to do. > If someone has a better format, and a format which will be as easy > for a simple program to process, I will be willing to try that > format instead. I am not too hung up on this specific format. I would personally like it to use XML. I'm developing a small application which is a kind of GUI for ports (works like a browser). It is very difficult to parse the Makefiles to find out which version number and which dependencies it has. Some versions (like KDE3) are just variables and I don't have an idea how to fetch them yet. With a structured language like XML, it would make the parsing process for such utils like mine easier. Furthermore, if you pack more information into the XML-files about a port, many things can be automated by using XSLT stylesheets (future ideas), like e.g. the Makefiles for the ports can be created by a stylesheet. A structured XML file is an ideal place for the pkg-descr, distinfo etc. You have a centralized resource where you can pick the information from you need. I'm not good in XML either, but I would get some more information what can be done and if you really want to do it. There is an XML-parser (Xerces C++) and a stylesheet processor (Xalan C++) developed by the apache xml project (http://xml.apache.org/), which AFAIK have acceptable licenses. > Note that I do want it to be easy to parse. I felt it might be bad > to drag in a bunch of standard XML-processing libraries, because > then my program will have a "dependency". I see. In my opinion, it's generally not a good idea to parse XML with custom parsers. Writing out XML to a file is simple. XML should be validated during the reading process. In this way you can prevent errors and, of course, extend the testing process (e.a. make the life easier for some people). > That is what I was thinking of when I picked this specific format. > With this strict, limited format, it should be easy to write a > program that can do all the processing we want to do (at least > for now). Before using XML, you should really ask people who have an idea about both, ports and XML. Martin