Support #4398
closedresolve-QName thinks prefix is not declared when it is not in use on literal result element
0%
Description
The attached XSLT results in an error that the prefix 'ord' has not been declared, but it has (both in the XSLT and in the literal result element). It seems that the issue is that the 'ord' prefix is declared but not actually used by the element. When I use ord:root instead, it works. Shouldn't resolve-QName be based on what namespaces are declared, vs. which ones are actually used by the element referenced in the second argument?
Engine name: Saxon-PE 9.8.0.12 Description: Namespace prefix 'ord' has not been declared
Files
Updated by Michael Kay almost 5 years ago
I think this one is a user error. You need to remove the attribute
exclude-result-prefixes="#all"
from the stylesheet. The attribute causes the "ord" namespace declaration to be omitted from the constructed <root>
element
Updated by Michael Kay almost 5 years ago
- Tracker changed from Bug to Support
- Status changed from New to Closed
Closing as user error (please re-open if you think I'm wrong)
Updated by Priscilla Walmsley almost 5 years ago
Thanks, you're right of course. For some reason I always thought of exclude-result-prefixes stripping the namespace declarations in the actual (final) results, not affecting the values of variables, but I see now the spec is clear on this point.
Please register to edit this issue