Project

Profile

Help

Bug #678

closed

FastStringBuilder and Maps

Added by Anonymous over 18 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
Due date:
% Done:

0%

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

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

index.thx (9.56 KB) index.thx Anonymous, 2005-11-02 15:55

Please register to edit this issue

Also available in: Atom PDF