This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: XInclude doesn't validate with xmllint
It would be helpful to remember that it is possible today to write
DocBook documents that are completely valid before and after
XInclusions, without any modifications to the core DocBook DTD. You
just need to add an internal subset to you documents that adds
xinclude:include to the content models of those elements where you've
chosen to place an XInclude element. For example, the chapter
documents for Processing XML with Java
<http://www.ibiblio.org/xml/books/xmljava/> all begin like this:
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.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"
>
]>
Authors who use XIncludes in different places may need to change
different parameter entities. However, I'm pretty sure the technique
is broadly applicable.
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+