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]
Other format: [Raw text]

[docbook] Debian XML catalog file for MathML is borked


Tom Peters <tpeters@xs4all.nl> writes:

> On Sat, 14 May 2005, Michael Smith wrote:
> 
> > What application is giving you that error?
> 
> xsltproc

OK. I think I know what's happening.

Please try running xsltproc like this:

  SGML_CATALOG_FILES=/etc/sgml/catalog xsltproc --catalogs <stylesheet> <xmlfile>

By default, xsltproc uses the catalog file /etc/xml/catalog, or
you have the XML_CATALOG_FILES variable set, whatever catalogs it
finds in there.

The --catalogs switch tells xsltproc to instead use the catalog
file in SGML_CATALOG_FILES.

> > It may be that your application doesn't actually process SYSTEM
> > entries from SGML catalogs. There are applications that don't.
> > Emacs/PSGML, for example.
> 
> I wouldn't know.  Does xsltproc handle SYSTEM entries?

Yes, it does. Or, to put it more precisely, by default (if you
don't have XML_CATALOG_FILES set or if you don't specify the
--catalogs switch), xsltproc uses the /etc/xml/catalog file, which
is an XML catalog file, not an SGML catalog. And XML catalog files
don't have SYSTEM entries, they have <system> elements (and
<delegateSystem> elements, and <rewriteSystem> elements...)

Anyway, in looking at the Debian /etc/xml/catalog file, I realized
that there is a typo in it. It has this:

  <delegateSystem
  systemIdStartString="ttp://www.oasis-open.org/docbook/xml/mathml/"
  catalog="file:///etc/xml/docbook-mathml.xml"/>$

That is, the value of the systemIdStartString attribute there
starts with "ttp" instead of "http".

So, xsltproc never finds a match for the
"http://www.oasis-open.org/docbook/xml/mathml/ URI.

The Debian /etc/xml/catalog file does have a correct
<delegatePublic> element for the MathML DTD, but xsltproc seems to
ignore it and just give up when it can't find a match for the URI.
That seems like a bug in xsltproc/libxml2 to me.

Anyway, I've filed a bug report (#309266) against the
docbook-mathml package in the Debian BTS:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=309266

Hopefully, the package maintainer will release a fixed version of
the package soon.

In the mean time, if you want an apt-gettable package that has the
fix, you can get one by putting the following line into your
/etc/apt/sources.list file

  deb http://docbook.sourceforge.net/debian/ unstable/

And then doing this:

  apt-get install docbook-mathml/unstable

Or if that doesn't work, do this:

  wget http://docbook.sourceforge.net/debian/unstable/docbook-mathml_1.0.0-3_all.deb
  dpkg --install docbook-mathml_1.0.0-3_all.deb

If you still have any problems installing it, please e-mail me
offline.

> I seem to be misunderstanding something here.  I thought that the whole
> point of catalog files is to redirect public URI's to files on your
> system, so that you do not have to go on-line and get the canonical DTD
> in order to process an XML file.

Completely right. And barring any typos or other problems in the
catalog files, it always works, if you're using XML catalog files
at least. The thing I mentioned was just sort of a corner case: If
you have a doc instance that has SYSTEM + URI only, without
PUBLIC, some tools (Emacs/PSGML for one, at least) will not be
able to resolve the URI the way you'd expect.

But, FWIW, xsltproc does not seem to be one of them.

  --Mike

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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