Project

Profile

Help

Support #4398

closed

resolve-QName thinks prefix is not declared when it is not in use on literal result element

Added by Priscilla Walmsley over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2019-11-27
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.8
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

saxonissues2.xsl (447 Bytes) saxonissues2.xsl Priscilla Walmsley, 2019-11-27 18:16
dummyin.xml (66 Bytes) dummyin.xml Priscilla Walmsley, 2019-11-27 18:16
Actions #1

Updated by Michael Kay over 4 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

Actions #2

Updated by Michael Kay over 4 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)

Actions #3

Updated by Priscilla Walmsley over 4 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

Also available in: Atom PDF