[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Linking a XML document to its schema

  • From: John Aldridge <john.aldridge@i...>
  • To: xml-dev@i...
  • Date: Thu, 25 Nov 1999 13:23:26 +0000

linking schemas
>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@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.