[Yanel-dev] xslt order

Evaldas Taroza etaroza at optaros.com
Tue Feb 12 11:50:38 CET 2008



Josias Thöny wrote:
> Evaldas Taroza wrote:
>> Hi,
>>
>> I am implementing a CreatableV2 resource, and I have the following 
>> method:
>> public HashMap createRTIProperties(HttpServletRequest request) {
>>   HashMap map = new HashMap();
>>   map.put("mime-type", "application/xhtml+xml");
>>   map.put("xslt", "/xslt/single_page.xsl");
>>   map.put("xslt", "/xslt/global.xsl");
>>   return map;
>> }
>>
>> As far as I understand the order of XSLTs for my resource matter. But 
>> HashMap does not impose ordering with the put() method. Is that a bug?
> 
> It's an unsupported feature :(
> HashMap doesn't support multiple entries with the same key, so the 
> second put will overwrite the first one. Currently it's not possible to 
> set a multi-valued property with this interface.

Looks like CreatableV* really needs rethinking.

Evaldas

-- 
+41 79 616 53 76
www.linkedin.com/in/taroza

Optaros - www.optaros.com


More information about the Yanel-development mailing list