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
How do I pass a variable value from my macro (test="blah") to my XSLT?
I tried to to this with
<xsl:value-of select="/macro/test"/>
But that didn't always give me results when I was looping through subnodes of the content tree.So how do I always get a result?
Maybe it'd help if you stored it in a variable first?
<xsl:variable name="test" select="/macro/test"/>
and then later use
<xsl:value-of select="$test"/>
Try:
<xsl:param name="myParam" select="/macro/test" /><br /><span class="tag"><xsl:value-of</span><span class="pln"> </span><span class="atn">select</span><span class="pun">=</span><span class="atv">"$myParam"</span><span class="tag">/></span><span class="pln"> </span>
Oops:
<xsl:param name="myParam" select="/macro/test" />
Oops, seems my macro-parameter-knowlegde has become a bit rusty. I think Darren is right here......
D'oh, of course! Thank you guys, that worked perfectly.
hey, you stole my karma ;)
Hm, I did, didn't I? Perhaphs the forum needs a system where the poster can mark it as 'No solution' or something so the original poster can't accidentally mark it as solution?
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
Variable value from macro to xslt
How do I pass a variable value from my macro (test="blah") to my XSLT?
I tried to to this with
But that didn't always give me results when I was looping through subnodes of the content tree.
So how do I always get a result?
Maybe it'd help if you stored it in a variable first?
<xsl:variable name="test" select="/macro/test"/>
and then later use
<xsl:value-of select="$test"/>
Try:
Oops:
<xsl:param name="myParam" select="/macro/test" />
<xsl:value-of select="$test"/>
Oops, seems my macro-parameter-knowlegde has become a bit rusty. I think Darren is right here......
D'oh, of course! Thank you guys, that worked perfectly.
hey, you stole my karma ;)
Hm, I did, didn't I? Perhaphs the forum needs a system where the poster can mark it as 'No solution' or something so the original poster can't accidentally mark it as solution?
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.