And how to do it if the spaces to remove are in XSL file ? not in the XML file.

-----Message d'origine-----
De : Andrew Welch [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 14 janvier 2004 12:51
À : [EMAIL PROTECTED]
Objet : RE: Problem with indentation (xalan & xsltc )


xsl:preserve-space and xsl:strip-space work on whitespace-only nodes,

so if you had:

<root>
  <node/>
</root>

they would affect the two whitespace nodes (before and after <node/>)

without the whitespace nodes, the above xml would look like:

<root><node/></root>

If you want to strip (trim) leading and following whitespace on a text
node, use normalize-space()

Have a look at the xsl-faq:

http://www.dpawson.co.uk/xsl/sect2/sect21.html

For whitespace:

http://www.dpawson.co.uk/xsl/sect2/N8321.html

As for the non-indented xsltc output, one of the xalan team will have to
answer that one

cheers
andrew

Reply via email to