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

Re: Another errata?

  • From: Tim Bray <tbray@t...>
  • To: james anderson <James.Anderson@m...>, XML Dev <xml-dev@i...>
  • Date: Mon, 01 Feb 1999 10:03:50 -0800

Re: Another errata?
At 06:35 PM 2/1/99 +0100, james anderson wrote:
>While I could live with the assertion, I would, unfortunately, be unable to
>write useful software which conformed to it. If an "unprefixed attribute name"
>is really not in any namespace, then it would be impossible for application
>code to execute an affirmative comparison against the name, and it would be,
>for similar reasons, impossible to write xsl patterns which addressed the
>attribute. Are these consequences really intended?

The namespace spec gets more over-interpretation than any document this
side of the Old Testament.  It seems simple to me.

1. There are abstract things called "namespaces", each identified by
   some URI
2. There is a syntactic mechanism, involving reserved attributes,
   placeholder tokens, and colon-delimited prefixes
3. The mechanism can be used to map namespaces directly to element
   types
4. The mechanism can be used to map namespaces directly to 
   attribute names
5. There is a defaulting mechanism to map namespaces to unprefixed
   element types, purely syntactic sugar

The spec says *nothing* normative about the relationship between 
namespaces, as defined in #1, and an unprefixed attribute.

Appendix A provides a scheme which can be used to create a
unique identifier for each element type & attr name in a document,
using in part the namespace information.

If it's any consolation, this very issue was more or less what tied
up the WG for months and months.  What really crystallizes it is the
question, given this:

<html:a href="fooo">

what can you say about the namespace of the href= attribute?  The 
most common and reasonable-sounding answer is, "it's in the namespace
of the html:a element".  OK, but what does that mean, formally?  It
turns out to be hard to write down.  You could decree that it's in
the HTML namespace.  A consequence of this is that

<html:a href="foo"> is identical to
<html:a html:href="foo">

which it might be in some circumstances; but always, for all element
types and all namespaces?  Tough to buy into.

Anyhow, the final consensus was that all you can say about the href=
above is that it's attached to an element that's in the html namespace.
For the purposes of many applications, that might be equivalent to
being in the html namespace; but that interpretation isn't compulsory.
For places where you want it to be compulsory, go on and prefix
the attributes.

In my first few implementations of namespace-savvy software, I've had
no trouble finding the attributes I needed.  What's a scenario that
causes problems?  -Tim

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/
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.