You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Brian May <ba...@snoopy.apana.org.au> on 2000/08/04 01:20:15 UTC

Re: [Cocoon Devel]DTD PUBLIC ID resolution

>>>>> "Hans" == Hans Ulrich Niedermann <ni...@isd.uni-stuttgart.de> writes:

    Hans> Hi, I'd like to have a mechanism that maps some known PUBLIC
    Hans> IDs from the <!DOCUMENT> declaration to the corresponding
    Hans> local URIs (similar to SGML catalog files). This would allow

I am not familiar with SGML catalog files, so may have misunderstood
something...

    Hans> one to write XML files with the "canonical" URI for the used
    Hans> DTDs and still use a local copy for validation and default
    Hans> value gathering, which increases both reliability and speed.

Is it <!DOCUMENT> or <!DOCTYPE>???

    Hans> Do you think such a mechanism makes sense?  Has anybody seen
    Hans> such a thing implemented yet?  Where could/should such a
    Hans> thing be hooked into the C2 processing chain?  Where and how
    Hans> should the configuration, i.e. the mapping from PUBLIC to
    Hans> SYSTEM be stored?

Personally, I have modified the DOCTYPE specs to point to the local
copy of the DTD, using a relative path.

Probably not a good idea for distributing copies of the XML document
elsewhere....

Are there any other advantages?
-- 
Brian May <ba...@snoopy.apana.org.au>

Re: [Cocoon Devel]DTD PUBLIC ID resolution

Posted by Hans Ulrich Niedermann <ni...@isd.uni-stuttgart.de>.
Brian May <ba...@snoopy.apana.org.au> writes:

> >>>>> "Hans" == Hans Ulrich Niedermann <ni...@isd.uni-stuttgart.de> writes:
> 
>     Hans> Hi, I'd like to have a mechanism that maps some known PUBLIC
>     Hans> IDs from the <!DOCUMENT> declaration to the corresponding

s/UMENT/TYPE/ of course. Sorry.

>     Hans> local URIs (similar to SGML catalog files). This would allow
> 
> I am not familiar with SGML catalog files, so may have misunderstood
> something...

SGML catalogs roughly look like

PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN" "where/ever/strict.dtd"

so an SGML tool looking for the HTML 4.0 Strict DTD will look in
where/ever/strict.dtd instead of the URI in the <!DOCTYPE>. There are
also other resolution capabilities for entities and cascading
catalogs, but we probably don't need this with XML. (I'm no SGML
expert. I just think a local PUBLIC ID -> SYSTEM ID resolution
capability is great.)

>     Hans> one to write XML files with the "canonical" URI for the used
>     Hans> DTDs and still use a local copy for validation and default
>     Hans> value gathering, which increases both reliability and speed.
> 
> Is it <!DOCUMENT> or <!DOCTYPE>???

<!DOCTYPE>, of course. Sorry, it was 3:00 in the morning... :-)

> Personally, I have modified the DOCTYPE specs to point to the local
> copy of the DTD, using a relative path.

This is the only way to prevent the canonical server from breaking
down - as most people do not use a HTTP proxy for java.net.* stuff.

> Probably not a good idea for distributing copies of the XML document
> elsewhere....
> 
> Are there any other advantages?

Perhaps that changing the location of a DTD is easier: you don't have
to change every single file. But I think the easier distribution of
such files when using the "canonical" URI for the DTD is the main
advantage.

Uli