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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: RE: [docbook] Future DocBook Ruminations - Modular Source Files & XInclude


At 5:20 PM +0100 8/20/03, Wills, Robert wrote:

>
>  <?oodb-include href="intro.xml"?>
>
>... with ...
>
>  <include xmlns="http://www.w3.org/2001/XInclude"; href="intro.xml"/>
>
>... which seems the "correct" approach, the validating editors I have tried
>immediately complain about the unrecognised <include> element.

You need to declare that element (and redefine a couple of entities) 
in the internal DTD subset like this:

<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
                       "docbook/docbookx.dtd" [
  <!-- add XIncludes -->
  <!ENTITY % local.para.char.mix " | xinclude:include">
  <!ELEMENT xinclude:include EMPTY>
  <!ATTLIST xinclude:include
     xmlns:xinclude CDATA #FIXED "http://www.w3.org/2001/XInclude";
     href           CDATA #REQUIRED
     parse          (text | xml) "xml"
  >
]>


Depending on exactly where you put the include elements you may need 
to adjust which parameter entity references you override. This 
example works when you never include inline elements, only block 
level elements and higher. And of course you may have to change the 
namespace prefix to suit. But this is essentially how it's done.
-- 

   Elliotte Rusty Harold
   elharo@metalab.unc.edu
   Processing XML with Java (Addison-Wesley, 2002)
   http://www.cafeconleche.org/books/xmljava
   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA


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