[darcs-users] Re: XML format

Pedro Melo melo at simplicidade.org
Fri Dec 17 08:20:06 UTC 2004


Hi,

On 17/dez/2004, at 01:44, Alexander Staubo wrote:

> 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, I'm the author of the code in question.

Please look at the readme. There is a roadmap in there that says I'm 
moving to XML::Parser in the next version. Mark, this will not make the 
script more dificult to install, because I'm already using XML::RSS 
that depends on XML::Parser, so XML::Parser will always be installed.

BTW, the reason that I did that, parsed by hand, was becuase it was a 
hack! a 40 minute HACK. It works (tm) but of course XML::Parser is the 
way to go (yes, i know about XML::Simple, I did not want to use it 
becuase I was already thinking on using XML::Parser later on).

So, although I'm not a big fan of XML, I do agree that in this case is 
the best solution, and when XML is beeing used, you should use a proper 
XML::Parser.

Best regards,
--
This space left blank (until I find something funny to put in here)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2371 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20041217/7f83cf41/attachment.bin 


More information about the darcs-users mailing list