← Prev in month ← Prev in thread

Using XIncludes

From
Phil Weston <>
Date
2004-02-12T11:38:08+00:00
ID
Thread
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?
2. Is my sytax correct? (I think it is since I cut/pasted the example)
3. Can I use any valid DocBook element as my doctype or is it restricted to the likes of <chapter>?

Thanks

Mart
← Prev in month ← Prev in thread