This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: I'm a little bit confused...
- From: Norman Walsh <ndw at nwalsh dot com>
- To: Giuseppe Greco <giuseppe dot greco at bluewin dot ch>
- Cc: Bob Stayton <bobs at caldera dot com>,DocBook Apps <docbook-apps at lists dot oasis-open dot org>
- Date: Fri, 06 Sep 2002 08:44:08 -0400
- Subject: DOCBOOK-APPS: Re: I'm a little bit confused...
- References: <1030701679.1247.22.camel@localhost.localdomain>
/ Giuseppe Greco <giuseppe.greco@bluewin.ch> was heard to say:
| 1. When should I use PUBLIC identifiers
| respectively SYSTEM identifiers?
In your documents, you should always use both. In catalogs, it may be
handy to map both. My catalog contains:
<public publicId="-//OASIS//DTD DocBook XML V4.2//EN"
uri="/share/doctypes/docbook42/xml/docbookx.dtd"/>
<system systemId="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
uri="/share/doctypes/docbook42/xml/docbookx.dtd"/>
| 2. When my document starts like this:
|
| <?xml version='1.0'?>
| <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
| "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
| <book>
| ...
| </book>
|
| ... what happens if I use a catalog like this?
|
| <!DOCTYPE catalog PUBLIC
| "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
| "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"
| >
|
| <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
| <group prefer="public" xml:base="/usr/share/sgml/docbook/xml-dtd/">
| "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
| uri="docbookx.dtd"/>
| </group>
| </catalog>
That catalog isn't valid. You probably meant:
<?xml version='1.0'?>
<!DOCTYPE catalog "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
"http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<group prefer="public" xml:base="/usr/share/sgml/docbook/xml-dtd/">
<public publicId="-//OASIS//DTD DocBook XML V4.2//EN"
uri="docbookx.dtd"/>
<system systemId="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
uri="docbookx.dtd"/>
</group>
</catalog>
| Does the XML processor look in the catalog for an entry identified by
| "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN", and then, if
| that entry doesn't exist, look at "http://www.oasis-open.org
| /committees/entity/release/1.0/catalog.dtd"?
Since you've said prefer=public, the resolver begins by looking for a matching
public identifier. It finds one and therefor it resolves the DTD for your
document to "/usr/share/sgml/docbook/xml-dtd/docbookx.dtd".
Had you omitted the public identifier from the DocType declaration, it
would have found the matching system identifier and done the same
thing.
| 3. What the right way to proceed if I want to create my PUBLIC/SYSTEM
| identifiers?
Create them for your own resources? Or create them in the catalog?
Or...I'm not sure what you're asking.
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | Vision is the art of seeing things
http://www.oasis-open.org/docbook/ | invisible.--Swift
Chair, DocBook Technical Committee |