RE: default-xpath-namespace value

> 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
balance.

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