This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook-apps] Re: psgml and XInclude elements in DocBook XML


>>>>> Steinar Bang <sb at dod dot no>:

> Thanx for the tip!  Here's my current <!DOCTYPE> declaration, which
> seems to work from the psgml point of view (I haven't tried this with
> xsltproc yet):

It worked with psgml, but with xsltproc I got the following error
message on an <xi:include> used inside an external entity:

extsection.xml:7: warning: Namespace prefix xi is not defined
  <programlisting><xi:include href="testfile1.txt" parse="text"/></programlisti

Thanx to Daniel Veillard who told me that defining the xmlns:xi
attribute on the <xi:include> element would always work.

My current approach, is to make xmlns:xi a #FIXED attribute on
<xi:include>, put the DTD changes in a separate file, and include it
into the internal subset, using an entity, ie.

<!DOCTYPE article
  PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"; [
  <!ENTITY % docbook.xinclude.module SYSTEM "dbxinclude.mod">

  %docbook.xinclude.module;
]>

The contents of dbxinclude.mod, are:

<!-- Add <xi:include> to <programlisting> to be able to use -->
<!-- xsltproc instead of Saxon or Xalan, when including     -->
<!-- programlisting from external files                     -->
<!ENTITY % local.para.char.mix
  "|xi:include" >
<!ELEMENT xi:include EMPTY >
<!ATTLIST xi:include
   href CDATA #REQUIRED
   parse (xml|text) "xml"
   encoding CDATA #IMPLIED
   xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude' >


---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]