Hi,

The name space xmlns:xsl="http://www.w3.org/1999/XSL/Transform" is lost when I transform a XSL stylesheet to another XSL stylesheet using an XSL stylesheet.
How I can preserve the xsl name spaces?

For example,
    1) my input file is input.xsl
    2) my transformation file is transform.xsl
    3) my output file should be expected_output.xsl but the result from sabcmd is current_output.xsl

I use the following command to transform my input file:
    sabcmd transform.xsl input.xsl expected_output.xsl

-----------------------------------------------------------------------------------------------------------
INPUT.XSL
========
<?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/"> Hello World </xsl:template>

</xsl:stylesheet>
 

TRANSFORM.XSL
===============
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

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

</xsl:stylesheet>
 

EXPECTED_OUTPUT.XSL
======================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/"> Hello World </xsl:template>

</xsl:stylesheet>
 

CURRENT_OUTPUT.XSL
=====================
<?xml version="1.0" encoding="UTF-8"?>
 <xsl:stylesheet version="1.0">

<xsl:template match="/"> Hello World </xsl:template>

</xsl:stylesheet>

Reply via email to