[darcs-users] Re: XML format

Alexander Staubo alex at byzantine.no
Fri Dec 17 01:44:43 UTC 2004


Mark Stosberg wrote:
>>>It's a not example of using one of the wealth of parsers, though-- The
>>>XML that darcs produces is parsed 'by hand' in that script. :) It
>>>does use XML::RSS to generate the XML output, though. 
>>
>>Oh, man. I just looked at the code. That's *cruel*!
> 
> Maybe cruel but not with out benefit: Because no XML parser is used
> (there are options that would be easy to use), the script has fewer
> dependencies and is thus easier to deploy.

And works entirely based on behaviour specific to the current version of 
Darcs, ie. an implementation artifact instead of a robust interface.

XML is not guaranteed to fit one element per line, or indeed have any 
lines at all. This means the script almost certainly won't work on 
something piped through an XSLT processor, for example.

Indeed, before I saw the code I assumed it was just using XSLT, because 
I had seen another list member, Gabriel Ebner, post an XSLT stylesheet 
that produced RSS. Simple and elegant.

In a world where a full-blown XSLT processor is one "apt-get install 
sablotron" away from being available, dependencies on such basic tools 
is the least of your problems. :)

Alexander.




More information about the darcs-users mailing list