This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: parameter in path


> You might be able to use xsl:attribute.
> 
> <xsl:param name="p1" select="'abc">
> <xsl:value-of>
> 	<xsl:attribute name="select">//some1/<xsl:value-of
> select="$p1"/>/some2</xsl:attribute>
> </xsl:value-of>

1. The <xsl:value-of> instruction must be empty.
2. <xsl:value-of> writes a text node to the output, <xsl:attribute> writes
an attribute node, why would you want to do both at once?
3. The value of the attribute node created will be the string
'//some1/abc/some2', it will not be the value obtained by treating this
string as an XPath expression and evaluating it. XSLT 1.0 does not allow you
to construct XPath expressions dynamically from strings.

Mike Kay 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]