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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

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


Subject: Re: [docbook-apps] Tool to query dtd/schema for valid element children|attributes[SOLVED]


Michael Smith wrote:

>>I'd already tried 'dtdflatten' but it does not seem to like my Debian 
>>default setup.
>>
>
>I ran into the same problem with it. As a workaround, try this:
>
>  $ SGML_CATALOG_FILES= dtdflatten /usr/share/xml/docbook/schema/dtd/4.2/docbookx.dtd
>

That worked a treat.  Such a simple solution...

As documented xml catalogs are not supported and, since sgml catalogs 
are disabled in the invocation, dtdflatten fails if given a public or 
system ID.

>You might also want to try the "flatten" script that's in the
>DocBook Project cvstools module.
>

'flatten' also succeeded in flattening the local copy of db4.2.  You may 
be interested to know that, oddly enough, 'flatten' fails on my default 
Debian/testing system when given either public or system ID:

-------------------------------------------------------------------------------------------------
$ ~/data/evaluation/flatten /etc/xml/catalog 
http://oasis-open.org/docbook/xml/4.2/docbookx.dtd
Cannot open ./http://oasis-open.org/docbook/xml/4.2/docbookx.dtd
$ ~/data/evaluation/flatten /etc/xml/catalog "-//OASIS//DTD DocBook XML 
V4.2//EN"
Cannot open ./-//OASIS//DTD DocBook XML V4.2//EN
-------------------------------------------------------------------------------------------------

If you trace through the 'flatten' script execution it becomes evident 
that the public ID is not recognised as a system ID and is therefore 
treated as a local file, which obviously the script then cannot open.

The system ID is recognised as such, but then 'xmlcatalog 
/etc/xml/catalog ...' fails to resolve it:

-------------------------------------------------------------------------------------------------
$ xmlcatalog /etc/xml/catalog 
http://oasis-open.org/docbook/xml/4.2/docbookx.dtd
No entry for SYSTEM http://oasis-open.org/docbook/xml/4.2/docbookx.dtd
No entry for URI http://oasis-open.org/docbook/xml/4.2/docbookx.dtd
-------------------------------------------------------------------------------------------------

This is somewhat strange as I can manually trace through the catalog files:

/etc/xml/catalog (line 49):
<delegateSystem 
systemIdStartString="http://www.oasis-open.org/docbook/xml/"; 
catalog="file:///etc/xml/docbook-xml.xml"/>
 .
 .
/etc/xml/docbook-xml.xml (line 44):
<delegateSystem 
systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/"; 
catalog="file:///usr/share/xml/docbook/schema/dtd/4.2/catalog.xml"/>
 .
 .
/usr/share/xml/docbook/schema/dtd/4.2/catalog.xml (lines 30-31):
<system systemId="http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";
        uri="docbookx.dtd"/>

Ah well, that's one for the catalog gurus to ponder.

Incidentally, the same behaviour occurs with both cvs versions of flatten.

Regards,
David.


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