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


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: Linking a XML document to its schema

[ Lists Home | Date Index | Thread Index ]
  • From: John Aldridge <john.aldridge@informatix.co.uk>
  • To: xml-dev@ic.ac.uk
  • Date: Thu, 25 Nov 1999 13:23:26 +0000

>The XML Schema WG has been working VERY hard on these difficult
>questions, and the next public working draft will contain a detailed
>set of facilities for instance-schema linking, schema aggregation and
>validation for documents with multiple namespaces.
>This pros and cons of dereferencing namespace URIs as raised in this
>thread were very much part of our deliberations.

Let me explain a problem...

We are developing an application which will use XML as a syntax for
communicating data between two parts of that application.

This XML uses a DTD, both for the (admittedly limited) validation it
provides, and to supply default values for attributes, so the receiving
part of the application needs to be able to find the DTD before it can make
sense of the XML.

Many of the customers for this application will not have live internet
connections, so the DTD needs to be available on the local machine.  Even
if they did have a connection, pulling a 40 KB DTD down over a slow link is

I thought the right answer was going to be to put something like:

   <!DOCTYPE Linestyle PUBLIC
      "-//IDN informatix.co.uk//My Application DTD//EN"

in the XML file, and then arrange for installation of the software to make
the appropriate entry for "-//IDN informatix.co.uk//My Application DTD//EN"
in the catalogue.  The XML would then be meaningful on any machine on which
the appropriate catalogue entry had been created, or failing that on any
machine with an internet connection.

However, the XML spec makes the resolution of public identifiers optional;
and it seems that support for them is absent from many XML parsers
(including the Microsoft DOM, which I'm trying to use).

What should I do?  If I put:

   <!DOCTYPE Linestyle SYSTEM "file://C:/MyApp/MyApp.dtd">

in the file, the XML will be unusable on any machine which happens to have
installed my application in another directory.

I guess there are a few possible answers to this:

(a) I'm an idiot, and I've missed some obvious solution to this problem.

(b) I'm an idiot, the validation support is not good enough to be worth
having, and default attribute values are at least as evil as external
parsed entities :-)

(c) Yes this is a real problem with DTDs, but at least schemas will have
some better answers to the problem (this is the reason I'm contributing to
this thread).

I'd be grateful for any light which can be shed.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS