Hi,
Is there any way I can tell xalan library to ignore the whitespace in the
xsl template? The whitespace in our xsl template is
mainly to indent the xsl template logic. Right now the workaround we have is
to use a perl script that wraps the whitespace in  xsl template in xml
comments

I searched in the xalan site/list but did not find anything. Would
appreciate any pointers.


Best,
HB

Here is an example of what we do -- I am pasting file before removing
whitespace and after removing whitespace.

-------------------------xsl_with_white_space.xsl
----------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:xalan="http://xml.apache.org/xalan";
    exclude-result-prefixes="xalan"
    >
    <xsl:template match="*"/>

        <xsl:if test="$BaseActionType = 'new'">
         <xsl:value-of select="'some string'"/>
        </xsl:if>
    </xsl:template>

</xsl:stylesheet>


-------------------------xsl_no_white_space.xsl  -- converted through a perl
script ------------

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:xalan="http://xml.apache.org/xalan";
    exclude-result-prefixes="xalan"
    >
    <xsl:template match="*"/><!--

        --><xsl:if test="$BaseActionType = 'new'"><!--
         --><xsl:value-of select="'some string'"/><!--
        --></xsl:if><!--
    --></xsl:template><!--

--></xsl:stylesheet><!--
-->

Reply via email to