Subject: RE: Effects of white space between xml elements
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 6 Mar 2009 16:47:45 -0000
|
> In 2.0, the
> rules are made more explicit (at least as I read them :-)
> that this is allowable, as well as being clearer that if
> whitespace-only nodes (or indeed any input at all) is gone
> before the XSLT engine even gets them, there's nothing to be
> done about that on a general basis.
It's a common expectation that with XSLT 1.0, you will see the inter-element
whitespace unless you use xsl:strip-space to get rid of it; but what the
spec actually says is "A transformation expressed in XSLT describes rules
for transforming a source tree into a result tree. ", and it says very
little about how that source tree might be constructed. A processor that
strips whitespace without the user's say-so might be extremely annoying, but
it is is not non-conformant.
Michael Kay
http://www.saxonica.com/
|