cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Ulrich Niedermann <niederm...@isd.uni-stuttgart.de>
Subject Re: [Cocoon Devel]DTD PUBLIC ID resolution
Date Fri, 04 Aug 2000 13:36:55 GMT
Brian May <bam@snoopy.apana.org.au> writes:

> >>>>> "Hans" == Hans Ulrich Niedermann <niedermann@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

Mime
View raw message