« RSS2.0 sans XML Namespaces | Main | Jakarta in a Nutshell »

XML Namespaces - it continues

Raw Blog: more namespaces

Danny's picked up on the namespaces post:

How do you validate <blah.blah.net.title> style namespaces? Won't it mean (almost) arbitrary element names are posssible?

We can ask the same question about QNames - it's no harder than validating <blahblah:title>. Arbitrary element names are already possible, what matters for XML validation is that you recognize the XML - that's not quite the same thing as keeping vocabularies separate.

It's also not entirely clear what might be gained from using an alternate system.

Having used all kinds of styles for name partitioning, I believe the cost of processing against XML+ Namespaces is higher than using straight XML along with a technology that layers atop XML, not one that changes it. For that reason alone XML Namespaces are an architectural wreck. What's to be gained? Cheaper and simpler processing where partitioning names is important.

Worrying about names a bit like is worrying about typing. Yes bad things can happen with names or types, but that doesn't mean you must to bake protection into language or its interpreter; there are other approaches.

Personally I'm not exactly in love with XML Namespaces, but they do seem to work very well in the context of RDF/XML, where multiple vocabularies are more the rule than the exception.

But they don't work well, or even properly. QNames are a fit with RDF/XML because RDF uses URI as identifiers. If you want to transmit RDF in XML, or harder, if you want your XML to be transliterated into RDF, then you need a way of moving between URIs and XML element names. RDF in XML was a usecase for namespaces way back when, so you'd have to think it would be useful. But RDF/XML requirements (roundtrip URIs through XML) remains an edge case for XML in the large (at the moment, I hope that will change). Plus it seems to be the case that QNames just don't cut it syntactically or semantically - Patrick Stickler has spent a lot of time thinking and expounding on this topic, and I don't think anyone's been able to refute him to date. XML namespaces don't meet entirely RDF's requirements and can't be justified on that basis.

[btw, it's great to see people thinking about this stuff, instead of the usual chant of Namespaces Good]

June 30, 2003 10:09 PM


Trackback Pings

TrackBack URL for this entry: