[darcs-users] GUI

Michael Conrad silverdirk at conserv.silverdirk.com
Fri Dec 17 13:14:48 UTC 2004


On Thu, Dec 16, 2004 at 11:15:45AM +0100, Thomas Zander wrote:
> On Thursday 16 December 2004 07:32, Michael Conrad wrote:
> > Well, I was about to suggest a list of tags, and get the discussion
> > started, but it just occoured to me that XML isn't whitespace-sensitive,
> > and that if we run any of the patch text through any standard XML tools
> > there's a chance to totally corrupt the data.  (not to mention the line
> > endings, lol )
> This is not true; XML is whitespace sensitive, this is just one of those 
> myths that roam..  (probably sustained by incorrect XML parsers).
> If you have <foo><bla>123</bla></foo> then you will get a different DOM tree 
> from when you have those spread over 5 lines.  XML specifies your reader 
> needs to provide them all.

Well, in my experience (converting xml to html for my web page and stuff
like that using xslt) the sablotron translator takes the freedom to try
and indent my tags to make them more readable.  Not that it creates or
destroys any text nodes in the DOM tree, but it does alter consecutive
whitespace.

> Next to that there is a tag (xml:space="preserve") that will make tell the 
> parser it should preserve whitespace.  The funny thing is; that tag is 
> default set to "preserve", so each xml per default already is ok.

Ahh, I forgot about that one.  Yeah, that would make it possible to do darcs
patches.  I hadn't seen it be the default, though.  Maybe I just need to
update my version of sablotron.  (or find a new processor?)

-Mike





More information about the darcs-users mailing list