Project

Profile

Help

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

Added by T Hata about 6 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2018-03-17
Due date:
% Done:

100%

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

Description

  1. Get the latest master (commit ae7727a) here: https://github.com/transpect/css-tools

  2. 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)
  1. 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.


Related issues

Related to Saxon - Bug #3691: Bad parent pointer error messageClosedMichael Kay2018-02-20

Actions
Actions #1

Updated by Michael Kay about 6 years ago

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

Actions #2

Updated by Michael Kay about 6 years ago

  • Related to Bug #3691: Bad parent pointer error message added
Actions #3

Updated by Michael Kay about 6 years ago

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.

Actions #4

Updated by Michael Kay about 6 years ago

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.

Actions #5

Updated by Michael Kay about 6 years ago

  • Status changed from In Progress to Resolved
  • Applies to branch 9.8, trunk added
  • Fix Committed on Branch 9.8, trunk added
Actions #6

Updated by O'Neil Delpratt about 6 years ago

  • 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