RE: Linking a XML document to its schema
>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 unattractive. I thought the right answer was going to be to put something like: <!DOCTYPE Linestyle PUBLIC "-//IDN informatix.co.uk//My Application DTD//EN" "http://www.informatix.co.uk/MyApp.dtd" > 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. -- Cheers, John 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...)
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format