xsl-list
[Top] [All Lists]

Re: xml:space problem WAS : Problem with identity transform and Saxon

2005-08-06 20:53:30
Hi,

    As far as I can tell, this looks like a bug in Saxon 8.4 because
the same XSL file works in Xalan, producing :

<?xml version="1.0" encoding="UTF-8"?>
                <a xmlns:exsl-common="http://exslt.org/common";>
                        <b/>
                </a>

    ....which is the expected output. Can anyone else confirm this
quirk of Saxon?

Thanks,
Kenneth

On 8/6/05, Kenneth Stephen 
<marvin(_dot_)the(_dot_)cynical(_dot_)robot(_at_)gmail(_dot_)com> wrote:
Hi,

    Nevermind - I found the problem. I modified my stylesheet thus :

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

        <xsl:variable name="rtf" xml:space="preserve">
                <a>
                        <b />
                </a>
        </xsl:variable>

        <xsl:template match="/">
                <xsl:apply-templates select="exsl-common:node-set($rtf)" 
mode="t" />
        </xsl:template>

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

</xsl:stylesheet>

     And now, the stylesheet functions, but xml:space="preserve"
doesnt get respected. What could be the problem here?

Thanks,
Kenneth


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--