Lists Home |
Date Index |
James Anderson asked:
> Are there really cases where one copies text nodes from a context in
> which a prefix had one binding to a context in which a prefix has a
> different binding with the intent of effecting a change in the implied
> universal names.
It may be that the prefix has a different binding in the target context;
it's more likely that it has no binding.
Consider a stylesheet:
<xsl:stylesheet xmlns:xsl="...." version="1.0"
<area><xsl:value-of select="math:pi() * @radius * @radius"/></area>
You now want to copy this template rule to a different stylesheet. To do so,
you have to copy the namespace declaration xmlns:math, otherwise the
template rule is meaningless. And of course, you want to do the copy using
general-purpose XML tools, tools which don't understand that there's
anything special about the select attribute of an <xsl:value-of> element.
Now, I hear lots of people saying we shouldn't have allowed this, and I'm
inclined to agree. But we do allow it, and it works today, and people are
taking advantage of the fact that it works today. And I have yet to see a
proposal that cleans up the namespace model without breaking applications
that work today according to the current specs.