SetParameter and xslt

Hi all,

i've a made a class that pass parameter to an xsl with

transformer.setParameter("myparam","A/B/C")

Note that i want that the parameter was an XPATH to access node C in xml file.

Now, in my xsl i've declared the param:

<xsl:param name="myparam" />

but when i do

<xsl:value-of select="$myparam" />

i obtain A/B/C, and not the content of node identified by xpath A/B/C

What i wrong?

THX everybody in advance

[494 byte] By [a12a] at [2007-11-27 3:34:39]
# 1

> Hi all,

>

> i've a made a class that pass parameter to an xsl

> with

>

> transformer.setParameter("myparam","A/B/C")

>

> Note that i want that the parameter was an XPATH to

> access node C in xml file.

> Now, in my xsl i've declared the param:

>

> <xsl:param name="myparam" />

>

> but when i do

>

> <xsl:value-of select="$myparam" />

>

> i obtain A/B/C, and not the content of node

> identified by xpath A/B/C

>

> What i wrong?

>

> THX everybody in advance

transformer.setParameter("myparam","A/B/C")

you are NOT setting a node object in the parameter, but rather the string "A/B/C".

yue42a at 2007-7-12 8:37:47 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...