Subject: RE: [xsl] 'nother xslt2 engine From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Wed, 17 Nov 2004 04:30:41 -0000 |
> > By default, the Altova XSLT 2.0 Engine strips all whitespace in > > whitespace-only nodes from the source XML document. Note > that the presence > > and absence of whitespace-only nodes affects the value the > position() > > function returns. > > They must be joking? Or is this thing different than in XSLT 1.0? XSLT 2.0 is a little more explicit than XSLT 1.0 in defining exactly what the rules are. With both versions, XSLT is defined to take a source tree as input and there are no constraints on how the source tree is constructed: in effect, construction of source trees is something that happens outside the XSLT processor rather than within it. If someone wants to provide a utility that constructs a tree by deleting every second element, and they think there is a market for such a utility, they are welcome to do it. The Data Model specification for 2.0 defines a default way of constructing the data model from an Infoset or PSVI. This states that whitespace-only text nodes should be discarded if they appear in "element content" - that is, if they are children of an element whose DTD or XML Schema content model does not allow mixed content. However, the conformance rules for XSLT 2.0 do not require a processor to support this mapping. (Conformance rules, however, often change in the final stages of completing a spec.) Michael Kay
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] 'nother xslt2 engine, Jirka Kosek | Thread | Re: [xsl] 'nother xslt2 engine, M. David Peterson |
Re: [xsl] 'nother xslt2 engine, Jirka Kosek | Date | RE: [xsl] Using key and position(), Michael Kay |
Month |