Peter Ring wrote:
> 
> I'm currently setting up a system for company-wide resolution of XML
> and related entities. It has to work cross-platform (Linux/Win32) and
> support SGML Open Catalog as well as XML Catalog. It will be used by
> emacs+psgml, Epic 4.2, FrameMaker7, saxon et.al., libxml2 (xsltproc),
> and probably also XXE.
> 
> It's nice to see that XXE uses the Sun resolver classes for entity
> resolution; it holds the promise that other xml/xslt processing tools
> that use the Sun resolver can use a common set of resolver properties.
> 
> In my test, I didn't find paths relative to catalogs to be a problem;
> should it be? The set of pre-configured catalogs does not suggest so.
> 
> But I have a couple of gripes though.
> 
> One is caused by the the Sun resolver classes: If my XML catalog files
> have DOCTYPE declarations, entity resolution will fail if an XML Catalog
> DTD is not around (and BTW, the one at [1] is out of sync with the spec
> at [2]. I like to keep the DOCTYPE declarations because it makes it a
> lot easier to maintain the catalogs. Should I keep local copies of the
> XML Catalog DTD, should I just comment-out the DOCTYPE when I'm finished
> editing a catalog, or is there a more elegant solution?

[1] Remove DOCTYPE from your catalogs.

[2] Create a very simple XXE configuration file for XML catalogs. This
configuration file will be used to automatically detect that your are
editing a XML catalog and will associate the XML catalog DTD to it
without the need to reference it in the instance.

[3] Use XXE to edit XML catalogs.

Writing configuration files for XXE is described in the Power User's
Guide (released next week with V20final).



> BTW, what is the best way to control the Sun resolver as used by XXE?

I don't really understand what do you mean by control. Is it the
property file used by the resolver? We don't use it. We use Sun resolver
pretty naively to fulfill very basic needs. I guess that you are more
expert than us in this field.



> The other glitch appear to be caused by the part of XXE (and xsdvalid)
> that validates and serializes the DTD. Even if the XML catalog says
> prefer="public", something in XXE tries to resolve the systemID.

It tries to parse it as an URL but only for informational purposes which
seems pretty useless.



> Well, we tend to use URNs like "urn:x-oasis:docbook-xml-v4.1.2" for system
> identifiers in our documents (as suggested by Norman Walsh in [3]) in
> order to avoid picking up random DTDs.

I didn't manage to find such recommendation in [3]. I would like to
understand the drawbacks of using system IDs like
http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd.



> But XXE dies with the message
> that it doesn't grok the 'urn:' protocol (which it wasn't supposed to
> anyway). I might of course just use 'junk' as the system identifier,
> but OTOH, libxml2 resolves URN-type system identifiers just fine.
> 
> [1] http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd
> [2] http://www.oasis-open.org/committees/entity/spec.html).
> [3] http://wwws.sun.com/software/xml/developers/resolver/article/

This seems to be a bug. If this is confirmed, it will be fixed for V2.0
Final or for V2.0 Patch 1.

Reply via email to