OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: DOCBOOK: Primer needed: XML-encoded documents using SGML tools.


/ Robert Withrow <bwithrow@nortelnetworks.com> was heard to say:
| 1) The DOCTYPE declaration.  Is there a way to have a single doctype
| declaration that will work with both XML and SGML tools?

Yes.

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

If you change from the XML version to the SGML version, then you
aren't using XML anymore and your document will almost certainly
contain "errors".

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

If nsgmls/jade gacked on the "http:..." system part, make sure that
you have a catalog file that points "-//OASIS//DTD DocBook XML V4.1.2//EN"
to your local copy of DocBook XML.

OTOH, maybe the only reason it gacked was because

   "http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd"

doesn't exist. You meant:

   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"

| 2) I had this simple example (almost exactly like in the "book":
| 
|   <!DOCTYPE figure PUBLIC "-//OASIS//DTD DocBook V4.1//EN">

This is an SGML document (you're using the SGML DTD).

|   <figure><title>The Figure</title>
|   <graphic fileref="foo.gif"></graphic>

In SGML, empty elements must not have a closing tag.

| 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

If you use the XML declaration

  nsgmls [options] /path/to/xml.dcl yourfile.xml

it should be ok.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | All passions exaggerate: it is
http://www.oasis-open.org/docbook/ | only because they exaggerate that
Chair, DocBook Technical Committee | they are passions.--Chamfort


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


Powered by eList eXpress LLC