xsl-list
[Top] [All Lists]

[xsl] Whitespace stripping in conjunction with PIs and comments

2006-04-13 10:45:45
Hi,

Is the whitespace-stripping process, as described in [1], intended to
be applied before or after the processing-instruction nodes and
comment nodes inside a stylesheet's tree are "ignored"?

Example:

<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  <xsl:output indent="yes"/>
  <xsl:template match="/">
    <foo>
      <bar> <?zoo x ?>1<?zoo x ?> </bar>
      <bar> <!-- zoo -->2<!-- zoo --> </bar>
      <boo><xsl:text> <!-- zoo -->3<?zoo x ?> </xsl:text></boo>
    </foo>
  </xsl:template>
</xsl:stylesheet>

Should the result be this...
<foo>
  <bar> 1 </bar>
  <bar> 2 </bar>
  <boo> 3 </boo>
</foo>

or this...
<foo>
  <bar>1</bar>
  <bar>2</bar>
  <boo> 3 </boo>
</foo>

or something different?

[1] http://www.w3.org/TR/xslt#strip

Regards,

Kasimier

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>