Project

Profile

Help

Map extension

Added by Anonymous over 13 years ago

Legacy ID: #9035108 Legacy Poster: Martin (a2be2do)

Hi, I'm trying to implement the "Map extension" as described in Saxonicas documentation. I'm using Saxon EE 9.3.02. Initially the problem was that ImmutableMap class was not in com.saxonica.extfn.map as described in doc but in com.saxonica.functions.map package. After modifying it, I was able to get the following code to work <xsl:stylesheet .. xmlns:map="http://ns.saxonica.com/map" xmlns:java="http://saxon.sf.net/java-type" xmlns:javatype="http://saxon.sf.net/java-type" ... version="2.0"> ... <xsl:variable name="Map1" as="javatype:com.saxonica.functions.map.ImmutableMap" select="map:new()"/> <xsl:variable name="Map2" select="map:put($Map1, 'aaa', 'bbb1')"/> <xsl:value-of select="map:get($Map2, 'aaa')"/> ... The code printed 'bbb1'. The problem is that I could not get to work the following line in example: <xsl:param name="map" select="map:new()"/>. It seems to work only with xsl:variable tag. Is it possible to use ImmutableMap in xsl:param tag? Thank you.


Please register to reply