[
Lists Home |
Date Index |
Thread Index
]
- From: Tyler Baker <tyler@infinet.com>
- To: Tim Bray <tbray@textuality.com>
- Date: Mon, 08 Feb 1999 20:09:20 -0500
Tim Bray wrote:
> At 05:06 PM 2/8/99 -0500, David Megginson wrote:
> >In response to several private requests, I've recast my posting into a
> >simple HTML page at the following location:
>
> David, this is a terrific piece of work. One of your answers makes
> me nervous:
>
> [Q] What is the name of the third attribute in the example above?
> [A] The name is xmlns:z from the XML 1.0 perspective; from the Namespaces
> perspective, this attribute is a declaration.
>
> Somehow the part beginning "... from the Namespaces perspective" feels
> a bit like the question is being dodged: I'm spinning my wheels a bit
> in trying to suggest something better. The point that's not being made
> is that in a namespace-aware system, the xmlns:z attribute is
> possibly just not there. For example (I just checked) if you use
> expat and enable namespace processing, you just don't see the
> xmlns attributes - I don't think this is compulsory, but it also
> isn't surprising. I'll try to think this over some more, but somehow
>
> [Q] What's it's name?
> [A] It's a declaration.
>
> doesn't quite feel satisfying. -Tim
It would be nice if and when the namespaces recommendation is updated if it mas made a
formality that a conforming namespace aware processor strips namespace nodes from the document
model before presenting the parsed content to the application. Even though I don't think
namespace declarations should be attributes in the first place (I think a PI acting as a
pseudo-element would be a better choice for a lot of reasons I won't delve into right now), I
think this would make dealing with namespaces a lot easier in XML.
Another idea I recently had is to spit up XML into two types:
XML 1.0
XML with namespaces.
As a convention, XML files without namespaces would have a suffix of "xml" and a mime
content-type of text/xml or application/xml. XML files with namespaces would have a suffix of
"nxml" and a mime content-type of text/nxml or application/nxml.
This would allow applications to know what they are dealing with in the first place. In terms
of XSL, it would be nice because it would allow +90% of the web to use XML 1.0 and not have to
worry about namespaces and for the 10% who need namespaces, they can use NXML.
If this was made into a formality, I would not have any reason to complain anymore as the
users I am targeting could use plain old XML and for people who have applications that need to
use namespaces, they can support XML.
In this sense "Namespaces in XML" would be defined as an extension of XML 1.0.
We could keep the DOM the same as is and create an NDOM (or something like that) which handles
the "Namespaces in XML" processing model natively.
Last but not least, you could have SAX and NSAX. We would not have to worry about screwing
too much with the core SAX interfaces that everyone seems happy with, yet be able to define
some new interfaces for SAX which are more suitable to the namespaces processing model.
Would this be a terrible compromise? I think this might be the sort of compromise that would
make everyone happy here as it would:
- Not require changes to XML 1.0
- Not force XML architectures to handle the namespaces processing model if they don't want to
- Allow those who need XML namespaces to use them at their discretion
- Provide a framework for building extensions to XML in the future
- Not require recommendations and standards such as the DOM and SAX to radically change, but
rather to allow them to be extended or redefined with a clean set of interfaces.
If namespaces take off (personally I doubt this would ever happen), then users can gracefully
adandon support for XML 1.0 in their applications if they choose to. If namespaces never
catch on, then no one is hurt by having to deal with namespaces.
I think a clean separation of XML 1.0 and "Namespaces in XML" is the only way to bring
concensus to this issue as well as provide two clean frameworks for application developers to
use for different needs.
Plain and simple, it seems like XML 1.0 and "Namespaces in XML" is like comparing apples to
oranges. Yah they are both fruits and taste sweet, but some people prefer apple juice to
orange juice, but few people like apple juice mixed with orange juice.
Is this too radical an idea for the W3C to pursue?
Tyler
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)
|