This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: RE: XML catalog resolution problems
- From: Jeanson Mauritz <Mauritz dot Jeanson at iom dot sorman dot se>
- To: Bob Stayton <bobs at caldera dot com>, Norman Walsh <ndw at nwalsh dot com>
- Cc: docbook-apps at lists dot oasis-open dot org
- Date: Thu, 30 Jan 2003 15:23:56 +0100
- Subject: RE: DOCBOOK-APPS: RE: XML catalog resolution problems
> -----Original Message-----
> From: Bob Stayton [mailto:bobs@caldera.com]
> Sent: Friday, November 08, 2002 7:13 PM
> To: Jeanson Mauritz; Norman Walsh
> Cc: docbook-apps@lists.oasis-open.org
> Subject: Re: DOCBOOK-APPS: RE: XML catalog resolution problems
>
>
> I had some further correspondence with Norm about
> this problem. It turns out that relative system ids
> can't be resolved by the Java resolver classes because
> they never even see them in their original form.
>
> He explained that the SAX API resolves a relative system id
> such as "docbookx.dtd" as relative to the document's
> directory. The SAX API changed "docbookx.dtd" to
> "file:/c:/XMLtest/catalogs/test/Saxon/docbookx.dtd"
> in the parsing stage. That's why the resolver reports:
>
> resolveSystem(file:/c:/XMLtest/catalogs/test/Saxon/docbookx.dtd)
>
> instead of:
>
> resolveSystem(docbookx.dtd)
>
> He says there is no hook for the resolver classes to get
> the original "docbookx.dtd" string for the resolver to
> look up in the catalog. He says he argued against this
> behavior at the time, but lost.
>
> I tried "faking" an absolute path, with a system id such as
> "/docbookx.dtd". But I found that my XML catalog needed
> to have three catalog entries with three different systemIds
> if I wanted to use different processors:
>
> systemId="/docbookx.dtd" (xsltproc)
> systemId="file:/docbookx.dtd" (saxon)
> systemId="file:///docbookx.dtd" (xalan)
>
> Ugh! Better to use a fake URI such as "http://docbookx.dtd"
> in your files and catalog since that shouldn't be messed with
> by the parsers.
The explanation makes sense even though it is awkward having to fake
the system IDs.
What is the reason for requiring EntityResolver to always return
fully resolved system IDs in the first place? Why did Norm lose
the argument?
/Mauritz