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: psgml and XInclude elements in DocBook XML

>>>>> Steinar Bang <sb@dod.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">


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
   parse (xml|text) "xml"
   encoding CDATA #IMPLIED
   xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude' >

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