|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Namespaces does *not* formally introduce "global attributes"
Mark Birbeck wrote: > > Additionally, implementers would have been able to easily add > > a namespace > > processing module on top of their current XML parsers (a SAX namespace > > expansion filter, for example, is trivial when implemented this way), > > _without changing the interfaces_. Future implementations > > might use better > > interfaces - such as APIs for accessing just the "namespace > > part" or the > > "local part" of an expanded name - but the point is every XML > > application > > would go on working as it is, without any changes. > > Reminds me of a question I had a while back: what happens to a perfectly > acceptable XML 1.0 document run through an XML parser which has a > namespace processing module? This is, after all, valid XML 1.0: > > <this:is:my:good this:is:an:attribute:called:a1="1" /> > > (As is: > > <:::: :::="1" /> > > ) Good point. > In terms of the old document run through the new parser, as far as > namespaces go this should be no different to: > > <good a1="1" /> > > But in the new parsers it will be an error, because, as the spec says, > "The namespace prefix, unless it is xml or xmlns, must have been > declared ..." > > It seems that XML namespaces are not backwards compatible with 'old' > documents. If this is true, is it explicitly justified anywhere? I > haven't come across it. Perhaps it is the intention of the spec that a > 'non-conformant' document (i.e., more than one colon in names, etc.) > simply 'drops back' to XML 1.0, rather than being 'failed' by the > namespace processor. But this then means you couldn't merge two DTDs in > a document - one built with namespaces in mind, and one not. One idea would be to have a processing instruction in the prolog of the document which tells the XML Parser whether namespaces processing should be turned on or not before parsing of the body begins. <?xml:namespaces status="on"?> XML Parser which cannot process XML namespaces would then either throw an error or at least give a warning. Tyler 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
|
|||||||||

Cart








