Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
I have a nodeset ($content) from where I want to select an element by using a variable ($element).
I can get this line to work if I hardcode it
<xsl:value-of select="$content/Brochure"/>
If I use the variable like this
<xsl:variable name="element" select="Brochure"/><xsl:value-of select="$content/$element"/>
it fails to save with the message "Unexpted token '$' in expression
Can this be done somehow?
Regards Bo
I think you can use something like:
$content/* [name() = $element]
Thanks Tom
You saved my day
/Bo
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
How to use variable as part of select statement
Hi
I have a nodeset ($content) from where I want to select an element by using a variable ($element).
I can get this line to work if I hardcode it
If I use the variable like this
it fails to save with the message "Unexpted token '$' in expression
Can this be done somehow?
Regards Bo
I think you can use something like:
$content/* [name() = $element]
Thanks Tom
You saved my day
/Bo
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.