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


>>>>> Yann Dirson <ydirson at fr dot alcove dot com>:

> Well, "you could change the DTD in a non-intrusive way" with by
> adding a local DTD part to your document, that would make this
> element valid.  Since programlisting itself does not have a hook,
> but mostly contains %para.char.mix;, you can just add to the latter,
> which BTW also allows the xinclude element in many other places.
> The following is untested, but you get the idea.

> <!DOCTYPE .... [
> <!ELEMENT xi:include ....>
> <!ATTRIBUTES xi:include ....>
> <!ENTITY % local.para.char.mix "|xi:include">
> ]>

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):

<!DOCTYPE article
  PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"; [

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


- Steinar

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