[xslt] document() and xinclude...



Hi,

It seems that since the latest libxslt/libxml, the xinclude flag is no longer 
used with document()... is that the expected behavior ?

$ xsltproc --xinclude e.xsl e.xml
<?xml version="1.0"?>
<foo>
        <element>x1</element>
        <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="x2.xml"/>
</foo>

$ cat e.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
version="1.0">

        <xsl:template match="/">
                <xsl:apply-templates select="document('x1.xml')/foo"/>
        </xsl:template>

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

</xsl:stylesheet>
$ cat e.xml
<?xml version="1.0"?>
<e/>
$ cat x1.xml
<?xml version="1.0"?>
<foo>
        <element>x1</element>
        <xi:include href="x2.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</foo>
$ cat x2.xml
<?xml version="1.0"?>
<foo>
        <element>x2</element>
</foo>


Regards,

Panard

-- 
HomePage: http://dev.inzenet.org/~panard/
Yzis : http://www.yzis.org
Qomics : http://dev.inzenet.org/~panard/qomics
Smileys : http://smileys.inzenet.org

Attachment: pgp9tn8dE9lJk.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]