Namespaces does *not* formally introduce "global attributes"

David Megginson david at megginson.com
Fri Feb 5 14:08:49 GMT 1999


Mark Birbeck writes:

 > 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" />
 > 
 > )

Exactly.  XML 1.0 remains in force, so for general-purpose XML
parsers, namespace processing needs to be an optional feature, enabled
at user discretion (as it is in Expat).  Dedicated tools for RDF, XSL, 
etc. will, of course, need namespace processing on.

Further to this topic, the following note does appear in the XML 1.0
spec:

Note: The colon character within XML names is reserved for
      experimentation with name spaces. Its meaning is expected to be
      standardized at some future point, at which point those
      documents using the colon for experimental purposes may need to
      be updated. (There is no guarantee that any name-space mechanism
      adopted for XML will in fact use the colon as a name-space
      delimiter.) In practice, this means that authors should not use
      the colon in XML names except as part of name-space experiments,
      but that XML processors should accept the colon as a name
      character.

In other words, you're allowed to use ':' for non-namespace purposes
but you're playing with fire if you do.


All the best,


David

-- 
David Megginson                 david at megginson.com
           http://www.megginson.com/

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




More information about the Xml-dev mailing list