Subject: [xsl] Xalan-J: Setting Objects as Parameters in XSL From: Seth Milder <mrseth@xxxxxxxxxxxxxxx> Date: Mon, 20 Oct 2003 19:23:30 -0400 |
I am trying to use the Transformer.setParameter method with a java.util.HashMap, but the transform tries to use a String type. If I specify a default in XSL like:
I then just get an empty HashMap. Anyone know how to make this work? Here's the Java code:
HashMap propertyMap = new HashMap(); propertyMap.put("membership", "0000000"); /* more stuff */ transformer.setParameter("propertyMap", propertyMap); transformer.transform(source, result);
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
<xsl:param name="parameterMap" select="java:java.util.HashMap.new" /> <xsl:output method="html" /> <!-- More stuff --> <xsl:variable name="foo" value="membership" /> <xsl:value-of select="java:get($parameterMap, $foo)"/>
-- Seth Milder Department of Physics and Astronomy MS 3f3 George Mason University Fairfax, VA http://www.mrseth.org -- Questions are never indiscreet, answers sometimes are. -- Oscar Wilde
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT Process for Linux --, mgrushinskiy | Thread | [no subject], kommersz |
Re: [xsl] importing stylesheets fro, J.Pietschmann | Date | Re: [xsl] Notes on Comparison of XS, W. Eliot Kimber |
Month |