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

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">

  <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"?>
"-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"

<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"

<!-- Rewrite any urls pointing to the docbook-xsl stylesheet to
instead go to the version pointed to by the CORE docbook-xsl link -->

  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" />
  rewritePrefix="../../../links/docbook-dtd/" /> 


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.



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.

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

Powered by eList eXpress LLC