Re: [xslt] XML Catalog search ordering



In message <20010917091948.B22064@redhat.com>
          Daniel Veillard <veillard@redhat.com> wrote:

> On Sun, Sep 16, 2001 at 08:22:16PM +0100, Justin Fletcher wrote:
> > Hiya,
> >
> > I'm trying to learn about XML catalogs and use them in my own system in a
> > manner that seems sensible. Consequently, I'm not sure if I'm reporting a
> > bug or a misunderstanding; I expect the latter.
> >
> > The behaviour I'm seeing is a lack of lookup in the catalogs for public
> > identifier given in the XML.
> [...]
> > If the public declaration is removed from the catalog, the DTD fetch
> > succeeds and no warning is thrown. From my reading of the XML Catalog
> > specification it seems unclear to me as to whether the URI resolved from a
> > public identifier match should be passed back through for a rewrite match.
> > It would seem to me that this would be sensible, but there may be something
> > I'm missing.
>
>   I'm not 100% sure I understood the problem, the XML Catalog implementation
> of libxml tries to implement to the letter the algorithms from section 7.1
> and 7.2 of the XML Catalog spec:
>    http://www.oasis-open.org/committees/entity/spec-2001-08-06.html#s.ext.res
>   Not that the algorithm in 7.1.2 gives priority to system identifier
> processing, for example if you have a rewriteSystem entry matching the
> Public Identifier won't even be examined.

I see what you mean. I had read that, but it may have confused me further.

The relevant section of the catalog is :

<rewriteSystem systemIdStartString="http://www.movspclr.co.uk/dtd/" rewritePrefix="file:///%3CXMLCatalog$Dir%3E/gerph/"/>
<public publicId="-//Gerph//DTD PRM documentation 1.00//EN" uri="http://www.movspclr.co.uk/dtd/prm.dtd"/>

and the requested identifiers are "-//Gerph//DTD PRM documentation 1.00//EN"
and "http://www.movspclr.co.uk/dtd/prm.dtd".

My understanding runs thus...

7.1.2.1: Ok
7.1.2.2: System ID was provided. No matching system entry, so skip this
         rule.
7.1.2.3: System ID was provided. Matching rewriteSystem entry, so re-write
         to file:///%3CXMLCatalog$Dir%3E/gerph/prm.dtd
         The re-written string is returned.

That's my understanding... There may be something else that I'm missing
here.

>  It seems that you have a problem for an external Identifier resolution.
> The only possible change I have introduced in libxml default handler is that
> once the External Identifier Resolution has been done, an additional
> URI Resolution may be used to complete the process in the case the first
> lookup returned an URL which is not accessible locally.
>
>  Can you make sure that the libxml2 "make Catatests" tests pass correctly
> on your platform ?

I'll have to port it, but that's not too big a deal; thanks for the advice.
I should be doing this anyhow.

Thank you for your quick reply; I shall avoid bothering you until I've done
that :-)

-- 
Gerph {djf0-.3w6e2w2.226,6q6w2q2,2.3,2m4}
URL: http://www.movspclr.co.uk/
... Eyes to the heavens, screaming at the sky;
    Trying to send you messages, but choking on goodbye.




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