W3C home > Mailing lists > Public > xsl-editors@w3.org > January to March 2002

RE: default-xpath-namespace value

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Fri, 18 Jan 2002 20:08:21 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E6210622B91F@daemsg02.software-ag.de>
To: "'Jeni Tennison'" <jeni@jenitennison.com>, xsl-editors@w3.org
> Section 4.4 (Unprefixed Names in Expressions and Patterns) --
> http://www.w3.org/TR/xslt20/#unprefixed-qnames -- describes the
> [xsl:]default-xpath-namespace attribute and its effect.
> Isn't this a bit confusing given that all the other attributes that
> have to point to namespaces do so via the namespace prefix? Why should
> this one be different?

Part of the purpose of the attribute is that it removes the need to declare
this namespace in the stylesheet, and therefore the need to exclude it from
the result tree. I agree its inconsistent and we did weigh this into the

I agree that this is rather a partial fix, and that we're actually
increasing the need to declare namespaces in the stylesheet that you don't
need in the result tree (especially schema namespaces and user namespaces
for stylesheet functions). But in general this particular namespace probably
doesn't need to be in scope in the stylesheet, so it seems a nuisance to
make the user declare it.

I agree there are one or two other cases where the same argument applies,
notably the result-prefix attribute of namespace-alias; perhaps we should
allow result-uri. But it's such a minority-interest facility I'm not sure
that adding complexity in the interests of usability is such a good idea at
this stage.
> If the intention is to move to using URIs rather than prefixes (since
> such attributes would have better support in XML Schema, perhaps?),
> then what about duplicating the present blah-blah-prefix(es)
> attributes with blah-blah-namespace(s) attributes, and deprecating the
> blah-blah-prefix(es) attributes. That would give more consistency and
> therefore be less confusing.
> [Personally I think that using prefixes lead to less problems with
> mistyping namespace URIs, especially if you're chopping and changing
> between default XPath namespaces a lot, but prefixes have their
> downsides as well. Consistency is the main thing.]
> On an editorial level, I don't think that it's very clear from the
> description that the value of the default-xpath-namespace attribute is
> a URI. In the middle of the second paragraph it does say:
>   "The default namespace URI for such a name is the value of the
>    [xsl:]default-xpath-namespace attribute..."
> but I think it would be clearer if the first paragraph stated up front
> that the value of the [xsl:]default-xpath-namespace attribute is a
> URI - instead of saying it is used "to define" the namespace URI, say
> that its "value is" the URI of the namespace.

Thanks, I'll try and make the explanation clearer.

Mike Kay
> Cheers,
> Jeni
> ---
> Jeni Tennison
> http://www.jenitennison.com/
Received on Friday, 18 January 2002 14:08:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:44:22 UTC