Sign In/My Account | View Cart  
advertisement

Article:
 Controlling Whitespace, Part 1
Subject: stripping out tabs and cr
Date: 2004-12-06 07:59:34
From: Bob DuCharme
Response to: stripping out tabs and cr

Which stylesheet do you mean, what do you mean by "empty leafs," and which XSLT processor are you using?


Bob


No Previous Message Previous Message Move up to Parent Message Up Next Message No Next Message


Titles Only Full Threads Newest First
  • stripping out tabs and cr
    2004-12-07 05:03:57 Boris Rousseau [Reply]

    I am using this code:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">


    <xsl:output method="xml" omit-xml-declaration="yes"/>


    <xsl:strip-space elements="*"/>


    <xsl:template match="@*|node()">
    <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
    </xsl:template>


    </xsl:stylesheet>


    Nevertheless, I am still getting some whitespaces (due to carriage returns and/or tabs). And I am using the Java 2 javax.xml.transform class as the XSLT processor.


Sponsored By: