Bug #2931
closed
Xslt30Transformer.applyTemplates() does not apply xsl:strip-space rules
Category:
XSLT conformance
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Description
When a transformation is applied to a node using Xslt30Transformer.applyTemplates(XdmValue, Destination), no whitespace stripping is applied to nodes in the initial match selection.
I have added a test s9apiTests.TestXslt30Transformer.testStripSpace which demonstrates that strip-space is working correctly for document nodes supplied in the initial match selection. However, I don't think there is any code to handle space-stripping of trees where the supplied node is not a document node.
Added an XSLT 3.0 test case where the initial global context item is a whitespace text node that is itself stripped. This is supposed to fail (but in Saxon it currently succeeds).
Fixed this so we recognize the case where the initial context item is itself stripped.
In the course of working through this test case I found that for dynamic errors that occur while evaluating a global variable, the stylesheet stack trace doesn't show detailed information about the variables being evaluated (it shows the stack frames, but with no information. Fixed this. (Currently on the 9.7 branch only.)
- Category set to XSLT conformance
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Priority changed from Low to Normal
- Applies to branch 9.7, 9.8 added
- Fix Committed on Branch 9.7, 9.8 added
I've added a couple of test cases (mode-180x) to the XSLT 3.0 test suite.
The problem is now fixed fully on the 9.8 branch, but I've been a bit more cautious on the 9.7 branch because of the risk of destabilising something. In particular, whitespace stripping on the 9.7 branch is not done when the initial match selection supplies non-document nodes.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.14 added
Bug fix applied in the Saxon 9.7.0.14 maintenance release.
- Applies to branch deleted (
9.8)
- Fix Committed on Branch trunk added
- Fix Committed on Branch deleted (
9.8)
Please register to edit this issue
Also available in: Atom
PDF