Project

Profile

Help

Bug #2235

closed

@expand-text ignored because XSLT 3.0 not enabled

Added by Michael Kay over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
Start date:
2014-11-22
Due date:
% Done:

100%

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

Description

"When I'm running an XSLT 3.0 stylesheet that uses the @expand-text attribute(text value templates), I get the message above. Running the same transformation, but with -xslversion:3.0 option specified, the value templates are expanded in the text nodes as I expected."

The theory is: you get an XSLT 3.0/2.0 processor if you request it on the command line or the XsltCompiler API, and if you say nothing, the decision is based on the version attribute of the top-level stylesheet or package. This determines the processor version, which is not the same as the effective version of instructions in the stylesheet, which is always determined by the nearest enclosing version attribute. XSLT 3.0 syntax (such as expand-text) is:

  • accepted by an XSLT 3.0 processor, irrespective of the [xsl:]version attribute

  • accepted and ignored by an XSLT 2.0 processor in forwards compatible mode, (i.e. when [xsl:]version="3.0")

  • rejected by an XSLT 2.0 processor if [xsl:]version="2.0"

I think this is being done correctly for processing that happens once the stylesheet tree has been constructed, but it is not working correctly when decisions are made (e.g. for static variables or use-when) during tree construction. The expand-text attribute is (for some reason) being processed during tree construction.

Please register to edit this issue

Also available in: Atom PDF