Bug #678
closedFastStringBuilder and Maps
0%
Description
SourceForge user: rohanr2
I am doing odd things with a map inside an xslt page
where at the top of the page:
...
xmlns:map="java:java.util.TreeMap" (or HashMap I've
tried both)
...
<xsl:variable name="mymap" select="map:new()" />
...
<xsl:value-of
select="map:put($mymap,$keyname,concat($listenerOutput,''))"
/>
where keyname is something like 'html.center'
when I query the map to see what the keySet is
<xsl:value-of select="map:keySet($mymap)" />
all looks well; however it is not possible to retrieve
the data using a key no matter what I do. for example:
<xsl:value-of select="map:get($mymap,'html.center')"/>
returns nothing
and
<xsl:value-of select="map:containsKey($mymap,
'html.center')" />
returns false
but listing the keySet
<xsl:value-of select="map:keySet($mymap)"/>
says that html.center is indeed there. I am just taking
a wild guess - does FastStringBuffer need a compare
method? I think it might be that the map can't find the
key because of that (seeing FastStringBuffer is not a
subclass of string)
I've tried string() and concat() to try to make they
key a "for sure" string, but that's not working either.
This process used to work pre 8 (or early 8 I am not
100% sure but it did work at one point).
Thank you for all your hard work and your killer
transformer btw
Files
Please register to edit this issue