[xml] XInclude processing in XSLT stylesheet (xsltproc)



When the --xinclude option is passed to xsltproc, is XInclude processing
turned on for the stylesheet as well as the xml input file? It seems like
it isn't. xmllint --xinclude processes the include in my stylesheet and
outputs a stylesheet that would do what I want. But xsltproc --xinclude
just outputs the xi:include element and it's content. A simplified example
is below.

xsltproc -V:
Using libxml 20603, libxslt 10033 and libexslt 722
xsltproc was compiled against libxml 20511, libxslt 10033 and libexslt 722
libxslt 10033 was compiled against libxml 20511
libexslt 722 was compiled against libxml 20511

a.xml:
<?xml version="1.0" ?>
<a xmlns:xi="http://www.w3.org/2003/XInclude";>
        <name>foo</name>
</a>

a.xsl:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:xi="http://www.w3.org/2003/XInclude";>
        <xsl:output method="xml" indent="yes"/>
        <xsl:template match="/">
                <a>
                        <name><xsl:value-of select="/a/name"/></name>
                        <xi:include href="c.xml"/>
                </a>
        </xsl:template>
</xsl:stylesheet>

xsltproc --xinclude a.xsl a.xml:
<?xml version="1.0"?>
<a xmlns:xi="http://www.w3.org/2003/XInclude";>
  <name>foo</name>
  <xi:include href="c.xml"/>
</a>


Dave Broudy             dave broudy net




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