[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: DOCBOOK-APPS: Problem with XInclude
> I just tried to use XInclude in my DocBook/XML marked up book to > include listings from external files into <programlisting> sections, > but all I get out of > > <xi:include href="Test.php" parse="text" /> > > is > > <xi:include></xi:include> > > in the output and > > No template matches xi:include in programlisting. > > as a warning from Saxon 6.5.2. > >-- > Sebastian Bergmann Saxon 6.5.2 doesn't do xinclude "out of the box". You cantry the xincluder plugin from http://xincluder.sourceforge.net/ or maybe you can use something like this stylesheet first: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xi="http://www.w3.org/2001/XInclude"> <!-- initial generator --> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <!-- simply copy everything --> <xsl:template match="@*|*|text()|processing-instruction()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|processing-instruction()"/> </xsl:copy> </xsl:template> <!-- base reference for xincludes a smarter person may be able to do without it --> <xsl:param name="basedir" select="."/> <!-- resolve the xi:includes in leau of a real xincluder --> <xsl:template match="xi:include"> <xsl:apply-templates select="document(concat($basedir,../@xml:base,@href))"/> </xsl:template> </xsl:stylesheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC