[
Lists Home |
Date Index |
Thread Index
]
david@megginson.com (David Megginson) writes:
>Danny Ayers writes:
>
> > A lot of the arguments I've heard against XML namespaces end with
> > "...but I'll use them if I have to...", so I'm not sure about the
> > toxicity. But in the context of RDF they make so much sense I
> > personally find it hard to understand the objections. But (as has
> > been joyfully pointed out here before) RDF/XML is hardly typical
> > XML. So is there a bad smell to namespaces? Maybe.
>
>Most list members have probably done a fair bit of playing around with
>XSLT and XSL-FO, and -- if they are still able to read this message --
>have survived XML Namespaces at least that far.
I see we're veering into permathread territory. Maybe we need a
placeholder entry on "namespaces" that we can point to every time
someone asks what's good/bad about namespaces. Here's one attempt.
Good:
1) Long names help disambiguate markup components
2) Long names are easier to process in some APIs than more intricate
context information.
Bad:
1) What's that URI really mean? Don't ask, or we'll never get home. In
fact, it's probably better not to ask _anything_ about URIs, or we'll
all end up on www-tag[1], with its 288 mostly URI-permathread messages
this month alone.
2) Scoping makes for a strange set of issues, littering the landscape
with extra declarations or making it difficult to do simple
cut-and-paste with XML documents.
3) While most tools now understand namespaces and namespace
declarations, many programmers still use local names even in very
namespace-specific contexts. For one very small example of this, see
[2], but I've encountered this practice constantly. I think that XSLT
is the only programming space where this practice is rare, and that's
because the tool doesn't work with local names alone. (Figuring that
out causes beginners a lot of pain, but once they're past it, they're
likely better XML practitioners.)
4) QNames in content seems to be an ever-expanding mess, with no means
in sight for a normalization method that makes them context-independent.
(That's largely because there's no simple mapping between QNames and
URIs - hashes vs. slashes keeps that complicated.)
To me, the bad factors outweigh the good, but I too have "survived
namespaces" and implemented support for them in the code I've built.
(Perversely, I'm even considering extending namespace support to entity
names in a current project.) That said, I don't look on "survived" as a
badge of pride - it's more that I've come to terms with toxic sludge in
our collective basement which we can't afford to clean up.
[1] http://lists.w3.org/Archives/Public/www-tag/2003Jul/
[2] http://www.tbray.org/tag/rddl/r2n3.pl, referenced with a broken link
from http://lists.w3.org/Archives/Public/www-tag/2003Jun/0004.html .
--
Simon St.Laurent
Ring around the content, a pocket full of brackets
Errors, errors, all fall down!
http://simonstl.com -- http://monasticxml.org
|