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


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

Primer needed: XML-encoded documents using SGML tools.


Hi:

>From past articles in this list I gather it is *supposed* to be legal
to process XML DocBook documents using the SGML tools.  (I want to do
this because the XML tools are currently too immature for my liking.)
The question is exactly how is that supposed to be done?  More
specifically, I have these questions:

1) The DOCTYPE declaration.  Is there a way to have a single doctype
declaration that will work with both XML and SGML tools?

I had to change this:

  <?xml version='1.0'?> <!-- -*- DocBook -*- -->
  <!DOCTYPE article 
    PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd";>

to this:

  <?xml version='1.0'?> <!-- -*- DocBook -*- -->
  <!DOCTYPE article 
    PUBLIC "-//OASIS//DTD DocBook V4.1//EN">

Nsgmls/Jade gacked on the SYSTEM part, and I have to change from the
XML version of the DTD to the SGML version.

Is that the only/best way to deal with this?  Or can I play catalog
tricks?  If so, how?  I'm using Jade with Norm's dsssl stylesheets
version 1.64.

2) I had this simple example (almost exactly like in the "book":

  <!DOCTYPE figure PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
  <figure><title>The Figure</title>
  <graphic fileref="foo.gif"></graphic>
  </figure>

Which gave me this error from nsgmls:

  bash-2.03$ nsgmls -sv figure.xml
  nsgmls:I: SP version "1.3.4"
  nsgmls:figure.xml:3:36:E: end tag for element "GRAPHIC" which is not open

I looked in the "book" and saw that the <graphic> tag is now declared EMPTY.

The question is, how do I encode that in XML such that SGML tools like
nsgmls buy it?

This doesn't work:

  <graphic fileref="foo.gif"/>

I get:

  nsgmls:figure.xml:3:27:E: character data is not allowed here

3) Is there a primer on this technique (XML with SGML)?

Thanks!

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-request@lists.oasis-open.org


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