Bug #3722
closed
XPST0008 on 9.8.0.10: failure to resolve a forwards reference to a global variable in the select expression of a template xsl:param
Category:
XSLT conformance
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Description
-
Get the latest master (commit ae7727a) here: https://github.com/transpect/css-tools
-
Compile it with 9.8.0.8. OK:
P:\css-tools-master\xsl>java -cp saxon9ee.jar net.sf.saxon.Transform -nogo -t -xsl:REx_css-parser.xsl
Saxon-EE 9.8.0.8J from Saxonica
Java version 1.8.0_161
Using license serial number V......
...
Stylesheet compilation time: 1.813896s (1813.896658ms)
- Compile the same one with 9.8.0.10:
P:\css-tools-master\xsl>java -cp saxon9ee.jar net.sf.saxon.Transform -nogo -t -xsl:REx_css-parser.xsl
Saxon-EE 9.8.0.10J from Saxonica
Java version 1.8.0_161
Using license serial number V......
...
Static error at char 6 in xsl:param/@select on line 702 column 62 of REx_css-parser.xsl:
XPST0008: Variable input has not been declared (or its declaration is not in scope)
Errors were reported during stylesheet compilation
The only difference is Saxon build. So I guess something may be wrong in 9.8.0.10.
- Subject changed from XPST0008 on 9.8.0.10 to XPST0008 on 9.8.0.10: failure to resolve a forwards reference to a global variable in the select expression of a template xsl:param
- Category set to XSLT conformance
- Status changed from New to In Progress
- Assignee set to Michael Kay
This appears to be a regression caused by the fix to bug 3691.
That change has the side-effect that we are parsing the select expression of the local xsl:param in a named template before all the global variables have been indexed, and a forwards reference to a global variable is therefore not resolved.
- Related to Bug #3691: Bad parent pointer error message added
Actually, it turns out that it's a backwards reference to a global variable that causes the problem: forwards references are fine (because we process components in reverse order). Problem reproduced in new xslt3 test case param-0702.
On further study, there's another related problem which occurs if a local parameter of a named template declares its type be reference to type aliases defined in a saxon:type-alias extension element: the type alias might have not get been indexed at the point where we are indexing the named template. It probably makes sense to index type aliases earlier, as we do with types declared in an imported schema.
- Status changed from In Progress to Resolved
- Applies to branch 9.8, trunk added
- Fix Committed on Branch 9.8, trunk added
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.8.0.11 added
Bug fix applied in the Saxon 9.8.0.11 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF