Project

Profile

Help

Bug #2708

closed

Exporting a literal map

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT export
Sprint/Milestone:
Start date:
2016-04-13
Due date:
% Done:

100%

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

Description

It is possible to export a stylesheet containing a constant map; however, such a stylesheet cannot be imported.

This does not happen when a map is written literally as, for example

<xsl:sequence select="map{'a':5, 'b':6}"/>

because such a map is exported as a sequence of calls on internal functions whose effect is to recreate the map.

It does happen, however, when the map is expressed by a call on parse-json() with a literal argument, for example

<xsl:variable name="json">{'a':5, 'b':6}</xsl:variable>
<xsl:sequence select="parse-json($json)"/>

Attempting to load this stylesheet produces the message

SXPK0002: Cannot load expression with tag map

Please register to edit this issue

Also available in: Atom PDF