[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Namespaces and DTDs was RE: Namespaces and interoperability (was Re: SAX
James Robertson wrote: > > Well, let me put it like this then: > > You are working out a structured interchange format. If you > want structure, you'll need a DTD, otherwise there is absolutely > no way of validating that you have got correct data. > > If you have a DTD, then namespaces are irrelevant: they simply > don't work together in any meaningful way. > > Or to put it another way: allowing arbitrary nesting of someone > else's tags doesn't achieve anything. You still have to know > what to do with them when you receive them. > > In summary: get stuck into writing a DTD, and ignore this > whole "namespaces" mess ... > It has been previously discussed that we need to use the namespace prefix as declared in the DTD in order to validate XML documents with namespaces. Would explicit declaration of namespace URIs as an attribute allow *namespace aware validators* to correctly validate documents in namespace URI dependent way as opposed to a prefix dependent way. Use attribute declarations to declare namespaces: <!ELEMENT example (a|b|aaa:p|xxx:y)> <!ATTLIST example xmlns:aaa CDATA #DEFAULT "urn:aaa" xmlns:xxx CDATA #DEFAULT "urn:xxx"> <!ELEMENT xxx:y (#PCDATA)> <!ELEMENT html:p (#PCDATA)> so <example> <aaa:p> whatever </aaa:p> <xxx:y> something else </xxx:y> </example> is valid as well as <example xmlns:bbb="urn:aaa" xmlns:yyy="urn:xxx"> <bbb:p> another </bbb:p> <yyy:y> example </yyy:y> </example> Is this what has been suggested before (and I am just getting it :-)? Jonathan Borden http://jabr.ne.mediaone.net 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 (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
|