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

Re: Namespaces does *not* formally introduce "global attributes"

  • From: Tyler Baker <tyler@i...>
  • To: Mark Birbeck <Mark.Birbeck@i...>
  • Date: Fri, 05 Feb 1999 14:50:35 -0500

formally introduce
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!

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.
Email
First Name
Last Name
Company
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.