OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[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"
    <!-- initial generator -->
    <xsl:template match="/">
    <!-- simply copy everything -->
    <xsl:template match="@*|*|text()|processing-instruction()">
            <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>

    <!-- 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))"/>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC