I was think first in solving this with <xsl:attribute> but this only adds, by my knowing, attributes to the <a> element, unless there would also be an attribute like 'innerhtml' or something.
An other solution maybe would be possible with an <xsl:template> , but I'm not an Xslt expert, hence my question on this forum :)
selectively adding text between <a> tags in Xslt
Hi,
I was working on an Xslt script, when the need arose to selectively put text between <a> href tags in Xslt.
Say I have this Xslt code:
<p><xsl:value-of select="$sometext"/><p>
Depending on whether or not a user inputted an url in a macrocontainer, the text should be wrapped by a <a> tag:
<p><a href="{$someurl}"><xsl:value-of select="$sometext"/></a><p>
I was think first in solving this with <xsl:attribute> but this only adds, by my knowing, attributes to the <a> element, unless there would also be an attribute like 'innerhtml' or something.
An other solution maybe would be possible with an <xsl:template> , but I'm not an Xslt expert, hence my question on this forum :)
Thanks for the advice,
Anthony
Anthony,
I guess a simple xsl:choose would work?
Cheers,
/Dirk
Hi Dirk,
Just tried your code, and my problem is solved :)
Thanks a lot,
Anthony
is working on a reply...