W3C home > Mailing lists > Public > www-xpath-comments@w3.org > January to March 2002

Re: [xsl] Namespace wildcards

From: Alex Kodat <ALEX@SIRIUS.sirius-software.com>
Date: Tue, 5 Feb 02 10:01:30 EST
Message-Id: <200202051501.KAA26037@tux.w3.org>
To: www-xpath-comments@w3.org
Cc: zarella@hmmci.com, davidc@nag.co.uk
> But the question at the heart of this thread is "should anyone new to
> XSLT be doing this at all?" Needing to key off the local name rather than
> the expanded name is the sign of a badly designed set of input languages
> (using different namespaces when they ought not to be using the same
> namespace) There no doubt are such uses but is this something that you
> need to make easy for a beginner?

Not sure I understand this. What do you mean "to key off the local name"?
When you use the *:mumble syntax you're saying you don't really care about
the namespace, local name, whatever. Also, maybe my internal parser isn't
working right but aren't "using different namespaces" the same as "not [to
be] using the same namespace" the same thing?

Anyway, I think it's important to keep in mind that XSLT doesn't "own" XPath
and that there are uses for XPath outside of XSLT -- MSXML and XQuery for
example. FWIW, we have our own API for the Model 204 database that uses XPath
as its core. For XPath embedded in a procedural language it can be quite useful
to use a *:mumble syntax and let the procedural language retrieve namespaces
on a node by node basis and decide what to do with the nodes from there.
In fact, if I were writing an application in a procedural langauge or
maybe even a style sheet using XSLT I might just make all XPath expressions
use the *:mumble syntax for each location step because XPath's refusal to
allow a (contextually appropriate?) default namespace means that the day
someone makes the namespace for a document explicit is the day my application
or stylesheet breaks.

Just as a general comment I find the XSLT centeredness of the XPath discussion
a bit distressing in that it seems that the creeping procedurality and complexity
of XPath is largely being driven by XSLT and its holy writ that XSLT shall be
non-procedural. Many of the complex new features in XPath 2.0 are easily dealt
with by any embedding procedural langauge.

Alex Kodat
Sirius Software
Cambridge, MA
Received on Tuesday, 5 February 2002 10:01:16 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:05:54 GMT