Re: [xsl] XSLT engines and terminal newline

Subject: Re: [xsl] XSLT engines and terminal newline
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 20 Sep 2006 11:08:47 -0400
Mike,

At 02:47 PM 9/19/2006, you wrote:
> If that's the only difference in the serialized output, I'm amazed. Many
> aspects of serialization aren't defined in the specs to that level of detail
> - for example, the order of attributes is unpredictable. The general rule is
> that if the XML parser treats two documents in the same way, then they are
> equivalent. The correct way to compare results is to put them both through a
> canonicalizer that removes these differences.


The one concern I had was just to ensure that the serialized
output is newline-terminated. For HTML output, running the output
through a canonicalizer isn't an option.

But it is an option to generate your output in XML syntax and then have the canonicalizer also reformat into HTML syntax. (Or use an HTML canonicalizer.)


Mike Kay's point appears to me to be that this is a general problem relating to serialization, not just a particular problem with newlines; and a general problem requires a general solution (or it is likely to reappear).

Cheers,
Wendell

Current Thread