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] Inline DTD Extension for xml:base


This crosses the boundaries between being a DocBook problem and being a
libxml2 problem, but I thought I'd ask here first because I thought the
people on this list might have experience with solving this (seemingly
simple) problem.

I'm trying to follow Bob Stayton's book in the section "Adding xml:base
to the DTD"[0].  I am initially trying to include the entity in the
DOCTYPE declaration precisely as specified in that section:

  shell# head -n 5 master.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"; [
  <!ENTITY % local.common.attrib "xml:base  CDATA  #IMPLIED">
  ]>

But xmllint seems to delete the entity declaration from the output:

  shell# xmllint --xinclude master.xml | head -n 3
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
  <book>

Needless to say, I'm a bit confused.  Obviously, my output from XInclude
processing will not validate, because there is no reference to the new
xml:base attribute.  If all else fails, I can definitely use a custom
DTD; I was just curious as to why this might happen.

As always, "DocBook XSL: The Definite Guide" is a truly amazing
reference.  It not only covers the XSL transformations beautifully, but
also discusses in great detail how to use DocBook itself productively.

Take care,

    John L. Clark

[0] http://www.sagehill.net/docbookxsl/ValidXinclude.html#XincludeDTD

Attachment: pgp00000.pgp
Description: PGP signature


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