OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

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

Re: [xml-dev] Interoperability [long]



At 2:31 AM -0800 2001-11-15, Sean McGrath wrote:
>At 09:16 14/11/2001 -0800, Tim Bray wrote:
>>[...]
>>What kind of problems do you run across?
>

[deleted]

>4) Locating DTDs
>
>I want to put DTDs somewhere central. I don't want to lug them around
>each directory I have XML files in so that:
><!DOCTYPE foo SYSTEM "foo.dtd">
>works.
>
>I could use a full URI but then I need HTTP running locally or live with
>the hit of pulling this stuff across an unreliable network. Not good.
>
>Could use SOCAT but patchy support on the ground for this. So
>much for freely interchangeable tools.
>
>Could separate the prolog completely from the instance so that
>entity A says <!DOCTYPE foo [ ... [> and entity B says
><foo>..<./foo>.
>
>This worked great in the SGML days. You could pass multiple
>system identifiers to NSGMLS for example and it would concatenate
>them prior to parsing. Not workable with XML because although nothing
>in the XML 1.0 spec prohibits it, parsing tools don't like it. If I have
>to customize a parser to do this management will look at me
>funny given all they have read about freely available parser tools
>out there!
>

[deleted]

The method I use, which is supported by all of the SGML and XML
tools I've ever used, it to use a simple system id in the
doctype declaration just as in your example:

  <!DOCTYPE foo SYSTEM "foo.dtd">

and then, in the directory containing the XML file with the
doctype declaration, place a small file named "foo.dtd" that
ends with

  <!ENTITY foo "/dtds/foo.dtd">

Any INCLUDE/IGNORE blocks, "override" values for entities, and
so forth go before the "redirection" to the main DTD file.

It's just a small "stub" file to which the system id in the
doctype declaration refers, without ever needing to edit the
system id itself.  Yes, it's one more file to fuss with, but it
is just that one stub file alongside the XML files, and it 
greatly ameliorates the lack of support for socat catalogs. 


/s/ Ernest G. Allen