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] | [List Home]


Subject: Re: [docbook-apps] Using XIncludes


----- Original Message ----- 
From: "Phil Weston" <phil700@xmsg.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Thursday, February 12, 2004 3:49 AM
Subject: [docbook-apps] Using XIncludes


> Hiya
>
> Using Bob's explanation in Ch19 of his book I have:
>
> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"file:///c:/docbook/dtd/docbookx.dtd" [
>     <!ENTITY % global.entities SYSTEM
"file:///c:/docbook/include/global.xml">
>     %global.entities;
>
>     <!ENTITY % entities SYSTEM "entities.xml">
>     %entities;
>   ]>
> <book>
>   <bookinfo>
>     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude";
href="legalnotice.subdoc.xml" />
>   <bookinfo>
>   ...
> <book>
>
> where "legalnotice.subdoc.xml" is:
>
> <?xml version="1.0"?>
> <!DOCTYPE legalnotice PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
>                  "file:///c:/docbook/dtd/docbookx.dtd"  ]>
>
> <legalnotice>
>   <title>Legal Notices</title>
>   <para>This is a bit of a legal notice</para>
> </legalnotice>
>
> Validating with xmllint gives me:
> "validity error: No declaration for attribute xmlns:xi of element include"
>
> 1. Is XInclude Ok for use with xmllint?

Um, yes.  Read on in Chapter 19 to this section:
http://www.sagehill.net/docbookxsl/ValidXinclude.html

> 2. Is my sytax correct? (I think it is since I cut/pasted the example)

For what I can see, yes.
I can't tell what is in %global.entities;. Does it have the declaration
for the include element?

> 3. Can I use any valid DocBook element as my doctype or is it restricted
to the likes of <chapter>?

The stylesheets for print output only work with certain elements as the root
element,
because something has to start a page sequence. There is a list of supported
elements
in the variable 'root.elements' in fo /docbook.xsl.  It currently has these:

appendix article bibliography book
chapter colophon dedication glossary index part preface refentry reference
sect1
 section set setindex

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net





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