strip-space-crash.xml (912B)
1 <?xml-stylesheet type="text/xsl" href="#style"?> 2 <xsl:stylesheet 3 version="1.0" 4 xml:id="style" 5 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 6 xmlns:exsl="http://exslt.org/common" 7 extension-element-prefixes="exsl" 8 > 9 <xsl:strip-space elements="s"/> 10 11 <xsl:template match="/"> 12 <xsl:variable name="space"> 13 <s> 14 <xsl:text> </xsl:text> 15 <e/> 16 <xsl:text> </xsl:text> 17 <e/> 18 <xsl:text> </xsl:text> 19 </s> 20 </xsl:variable> 21 <xsl:apply-templates select="exsl:node-set($space)/s"/> 22 </xsl:template> 23 24 <xsl:template match="s"> 25 <r> 26 <xsl:variable name="text-nodes" select="text()"/> 27 <xsl:apply-templates/> 28 <xsl:copy-of select="$text-nodes"/> 29 </r> 30 </xsl:template> 31 32 <xsl:template match="node()"/> 33 </xsl:stylesheet>