Re: Second "RFC" on pkg-data idea for ports

From: Martin <nakal_at_web.de>
Date: Wed, 14 Apr 2004 00:53:44 +0200
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
Received on Tue Apr 13 2004 - 13:53:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:51 UTC