Detecting stylesheets and DTDs



Hi everybody,

I recently had a question about how to properly detect if a DTD or
stylesheet is installed on a machine, and what its path is.  I needed this
for (1) ScrollKeeper to make sure a given version of the DocBook/XML DTD
is installed, and (2) for updating the GNOME docs build stuff
(xmldocs.make) to have a target for building HTML from DocBook/XML docs.
I'm summarizing an off-mailing-list discussion which followed, in case
anybody is interested.

In principal, the DTDs and stylesheets should be registered in the XML
catalog (see http://www.xmlsoft.org/catalog.html for more info).  In
reality, only some DTDs are packaged properly and few stylesheets are
packaged properly, registering themselves in the XML catalog.  After
discussing the possibilities of circumventing the catalog or having GNOME
install DTDs or stylesheets properly to guarantee they are properly
registered, we decided the best thing is to follow the intended use of the
catalog system.  Thus, we will add a blurb to the configure script which
uses xmlcatalog to test for the existance of a given stylesheet or DTD.
If it isn't present, it will fail, explain that the package either isn't
installed or didn't register with the catalog properly, and link to
http://www.xmlsoft.org/catalog.html for more info.

People will have to make sure that their catalog and stylesheet packages
are good, which will be a bit of work in the short term.  But after
packagers get these fixed, we will all be much better off.

My understanding is the RH7.2 is not quite right w/r/t the XML catalog,
but that rawhide is fine.  I'm not sure of the status of other distros.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]