This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: parameter in path
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: parameter in path
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Mon, 4 Dec 2000 10:48:14 -0000
- Reply-To: xsl-list at mulberrytech dot com
> 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