Project

Profile

Help

Bug #4035

closed

Exporting a stylesheet containing node-valued static variables

Added by Michael Kay about 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT export
Sprint/Milestone:
-
Start date:
2018-11-19
Due date:
% Done:

100%

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

Description

It is possible to create and export a stylesheet containing a node-valued static variable. For example:

<xsl:variable name="e" static="true" select="parse-xml(......)//x"/>

There are restrictions here which are not currently documented. We should review these restrictions and document them.

The restrictions include:

  • We can only export document and element nodes (not, for example, text nodes, attributes, and comments)

  • The nodes, after re-importing, will be parentless (whereas the originals, as in the above example, might have parents)

  • Relationships between nodes are lost: in the above example, ($x[1]/following-sibling::x is $x[2]) might be true in the original stylesheet, false after exporting and importing.


Related issues

Related to SaxonJS - Bug #4829: Static variable initialised to node values cause run-time failureResolved2020-11-18

Actions

Please register to edit this issue

Also available in: Atom PDF