This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: XInclude doesn't validate with xmllint
- From: Kevin dot Ruscoe at ubsw dot com
- To: jwhimpel at tseinc dot com, docbook-apps at lists dot oasis-open dot org
- Date: Wed, 02 Oct 2002 09:29:29 +0100
- Subject: RE: DOCBOOK-APPS: XInclude doesn't validate with xmllint
Hi John
> I am trying to validate two xml files
We got XInclude to work as follows:
1) All of our DocBook documents which use XInclude (and that's almost all of them) start like this:
=================================================
<?xml version='1.0'?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "docbookx.dtd"
[
<!ENTITY % xinclude PUBLIC "-//UBS//CORE//DTD XInclude V1.0//EN" "xinclude.dtd">
%xinclude;
]
>
<article>
<articleinfo><title>CDL Step-By-Step Instructions</title></articleinfo>
<xi:include href="../panels/panel_home.dbk"/>
...
=================================================
2) XML_CATALOG_FILES=/home/ruscoekm/my_tree/links/CORE/lib/catalogs/xml/catalog.xml
3) Here is the XML catalog file:
=================================================
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC
"-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<!-- Ideally i'd like to be able to point XML_CATALOG_FILES at the
catalog.xml included with docbook 4.2, but a 'bug' in libxslt means
that this variable can only hold one value, not a list of values.
Therefore here i delegate to the DocBook 4.2 catalog file -->
<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML V4.2"
catalog="../../../links/docbook-dtd/catalog.xml"/>
<!-- Rewrite any urls pointing to the docbook-xsl stylesheet to
instead go to the version pointed to by the CORE docbook-xsl link -->
<rewriteSystem
systemIdStartString="http://docbook.sourceforge.net/release/xsl/current/"
rewritePrefix="../../../links/docbook-xsl/" />
<!-- XInclude -->
<public publicId="-//UBS//CORE//DTD XInclude V1.0//EN"
uri="../../schemata/dtd/xinclude.dtd" />
<!-- Slides -->
<public publicId="-//Norman Walsh//DTD Slides Full XML V3.0b2//EN"
uri="../../../links/docbook-slides/slides-full.dtd" />
<rewriteSystem
systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/"
rewritePrefix="../../../links/docbook-dtd/" />
</catalog>
=================================================
4) Finally, here is our XInclude DTD, culled from the spec:
=================================================
<!-- public identifier "-//UBS//CORE//DTD XInclude V1.0//EN" -->
<!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"
encoding CDATA #IMPLIED
>
<!ELEMENT xi:fallback ANY>
<!ATTLIST xi:fallback
xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude"
>
<!-- implmentation of the XInclude standard to use reference this DTD
as an entity and insert it into your doctype declaration
Sagar R. Shah -->
=================================================
Hope that helps.
Regards
Kevin
+ANYTHING+BELOW+WAS+ADDED+AFTER+I+HIT+SEND+
Visit our website at http://www.ubswarburg.com
This message contains confidential information and is intended only
for the individual named. If you are not the named addressee you
should not disseminate, distribute or copy this e-mail. Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses. The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission. If
verification is required please request a hard-copy version. This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.