OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



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

[ Lists Home | Date Index | Thread Index ]
  • From: Tyler Baker <tyler@infinet.com>
  • To: Mark Birbeck <Mark.Birbeck@iedigital.net>
  • Date: Fri, 05 Feb 1999 14:50:35 -0500

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.


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
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@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS