Subject: Re: [xsl] Problem turning a xml string into a proper tree From: susana gonzalez <susana.gonzalez@xxxxxxxxxxx> Date: Tue, 03 Feb 2004 18:30:11 +0100 |
I have a template that receives a parameter that way: <xsl:with-param name="paramString"> <params> <param att="att1" name="name11">value1</param> <param att="att2" name="name12">value2</param>
......... </params> </xsl:with-param>
What I'd like to is to retrieve the value of <xsl:value-of select="$paramString/param[n]/@name" />
To do that in XSLT 1.0 you need the node-set() extension:
select="xx:node-set($paramString)/param[n]/@name"
What it more if i make <xsl:value-of select="$paramString"/> it should return value1value2 but it returns <params>
<param att="att1" name="name11">value1</param>
<param att="att2" name="name12">value2</param>
.........
</params>
this means xalan treats it as a string instead of a tree as I'd like to.
<xsl:value-of select="$paramString"/>
should indeed return the string "value1value2". I'm very surprised if it returns a string containing angle brackets. You need to show us a complete stylesheet that demonstrates the problem.
Michael Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Problem turning a xml str, Michael Kay | Thread | RE: [xsl] Problem turning a xml str, Michael Kay |
[xsl] using a node set in a xsl:var, Gruenewald, Terry | Date | RE: [xsl] XSLT vs Perl, David Tolpin |
Month |