|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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! 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








