|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Summary of Namespaces and Validation
At 11:30 AM 9/10/98 -0500, Mark Tucker wrote: >***************************************** > Camp1 : Most of this Newsgroup >***************************************** > Documents with Namespaces can be validated provided > the prefix abbreviations are used consistently. I don't think that too many people feel this way. I hope not, because the namespace draft makes it 100% clear that the prefix in and of itself has no meaning, and is just a short-form stand-in to a URI. > DTD processors are un-aware of Namespaces. True. > This camp seems to be equivalent to saying: > "Treat <PN:NAME> as an XML ELEMENT tag with a colon in it." This is all you can expect from an 8879-based DTD processor. >***************************************** > Camp 2 : Tim Bray, Andrew Layman >***************************************** > To validate a document that uses namespaces, do all > the ELEMENT and ATTRIBUTE handling using the Expanded > Names. > This group thinks namespaces coexist with DTD's, provided > both the DTD and the document instance specify consistent > URI's for the namespaces. The actual prefix abbreviations > used in the DTD or the document instance don't matter. Not quite right. The prefixes are stand-ins for the URIs. However, the prefixes are all the DTD processor can see. Thus, validating namespaced documents *has* to be a 3-step process. 1. Build a compound DTD that has prefixed declarations for all your elements and attributes. This is the hard part. 2. Go through the instance and rewrite all the namespace declarations onto the root element and undo any defaulting, so that anything that's in a namespace has a prefix. If necessary, rewrite the DTD so that the same URIs have the same prefixes in DTD and instance. This is tedious but straightforward, there are dozens of programmers in this group who could sort it out in a day, given a decent XML processor. 3. Validate (or not, if the doc is broken). What really bothers me is that discussion here keeps obsessing over the tedious but straightforward problem of matching up prefixes, and nobody's thinking about the interesting and difficult problem of compounding DTDs. -Tim 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/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe 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
|
|||||||||

Cart








