Project

Profile

Help

Bug #2931

closed

Xslt30Transformer.applyTemplates() does not apply xsl:strip-space rules

Added by Michael Kay over 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2016-09-09
Due date:
% Done:

100%

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

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.

Actions #1

Updated by Michael Kay over 7 years ago

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.

Actions #2

Updated by Michael Kay over 7 years ago

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

Actions #3

Updated by Michael Kay over 7 years ago

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

Actions #4

Updated by O'Neil Delpratt over 7 years ago

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

Actions #5

Updated by O'Neil Delpratt almost 7 years ago

  • 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