|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] AW: xsl:for-each and xml:space with text-nodes inbetwe
Hi, > -----Urspr|ngliche Nachricht----- > Von: Michael Kay [mailto:mike@xxxxxxxxxxxx] > Gesendet: Dienstag, 25. April 2006 22:42 > An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Betreff: RE: xsl:for-each and xml:space with text-nodes > inbetween > > > XSLT 2.0 spells the rules out in great detail: > > http://www.w3.org/TR/xslt20/#stylesheet-stripping I see; you refer to 5) of the whitespace-stripping section of XSLT 2.0 (I abviously overlooked that one): "Any whitespace text node whose following-sibling node is an xsl:param or xsl:sort element is removed from the tree, regardless of any xml:space attributes." > In 1.0 I think that a strict reading of the spec tells you > > (a) whitespace text nodes in the stylesheet are not stripped if > xml:space="preserve" is specified (section 3.4) > > (b) Text nodes, however snowy-white they are, are not > permitted as children > of an element such as xsl:choose, or before the xsl:sort child of > xsl:for-each (section 18) > > This is the interpretation that I adopted in Saxon; but it's somewhat > severe, and it's not surprising that some XSLT 1.0 processors > have chosen a > more liberal approach. We made an explicit decision to adopt the more > liberal approach in XSLT 2.0, if only because it's more > consistent with the > rules for XML validity in the presence of a DTD. OK. I think I'll go the Saxon way here for XSLT 1.0. [...] Regards & thanks, Kasimier
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






