forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Wheller <s...@inwords.co.za>
Subject xi:include
Date Wed, 20 Oct 2004 09:45:07 GMT
Hi,

I'm curious as to how XIncludes are expanded. Documents transformed under 
forrest keep using the xi:fallback, so I end up with a forrest page that has
FIX ME FIX ME FIX ME FIX ME FIX ME FIX ME. When I validate and transform the 
documents outside of forrest everything works.

Sample DocTypeDecl  (see Internal Subset)
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
                      "http://www.docbook.org/xml/4.3/docbookx.dtd" [
<!ENTITY % globalents SYSTEM "global.ent">
%globalents;
<!ENTITY % xinclude SYSTEM "xinclude.mod">
%xinclude;
]>

Content of xinclude.mod
<!ELEMENT xi:include (xi:fallback?) >
<!ATTLIST xi:include
xmlns:xi            CDATA       #FIXED       "http://www.w3.org/2001/XInclude"
href                CDATA       #REQUIRED
parse               (xml|text)  "xml"
xpointer            CDATA       #IMPLIED
encoding            CDATA       #IMPLIED
accept              CDATA       #IMPLIED
accept-charset      CDATA       #IMPLIED
accept-language     CDATA       #IMPLIED >
<!ELEMENT xi:fallback ANY >
<!ATTLIST xi:fallback
xmlns:xi            CDATA       #FIXED "http://www.w3.org/2001/XInclude" >
<!ENTITY % local.book.class    "| xi:include" >
<!ENTITY % local.preface.class    "| xi:include" >
<!ENTITY % local.part.class       "| xi:include" >
<!ENTITY % local.chapter.class    "| xi:include" >
<!ENTITY % local.divcomponent.mix "| xi:include" >
<!ENTITY % local.para.char.mix    "| xi:include" >
<!ENTITY % local.info.class       "| xi:include" >
<!ENTITY % local.common.attrib    "xml:base CDATA #IMPLIED
xmlns:xi            CDATA       #FIXED       
'http://www.w3.org/2001/XInclude'" >

Note: As you can see I have added ix:include to the set element.

I am using the principles of Modular Docbook for my document architecture.
My level of granularity goes as deep as "part", so 
The driver document is a "set" which XIncludes "book" documents, which 
XInclude "part" documents.

Sample of XIncludes in Docbook set document (inclusion of book).

   <!-- SYSTEM ADMINISTRATION -->
    <xi:include href="sys-admin.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude">
        <xi:fallback>FIX ME</xi:fallback>
    </xi:include>

Sample of XIncludes in Docbook book document (inclusion of part).

<xi:include href="elective-bind/bind.xml" 
xmlns:xi="http://www.w3.org/2001/XInclude">
        <xi:fallback>FIX ME</xi:fallback>
    </xi:include>

I'm using Forrest HEAD from SVN.

Any ideas are welcome.

-- 
Sean Wheller
Technical Author
sean@inwords.co.za
http://www.inwords.co.za

Mime
View raw message