Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to xslt coding and need your help. I am designing an email template using xslt and I have created a button using styling. This button is displayed only when the receiver is Microsoft outlook(mso). Following is the code. Please pay attention to the href attribute inside v:roundrect tag.

XML
<xsl:text disable-output-escaping="yes"><![CDATA[<!--[if gte mso 9]> <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="{$URL}" style="height:37px;v-text-anchor:middle;width:190px;" arcsize="15%" stroke="f" fillcolor="#557d9a">
        <w:anchorlock/>
        <center style="color:#ffffff;font-family:Arial, sans-serif;font-size:13px;font-weight:bold;text-decoration: none;">
           Verify Email Address 
        </center>
    </v:roundrect> <![endif]-->]]> </xsl:text>



I have used a variable called 'URL', which is the value of the element:

XML
<xsl:variable name="URL">
      <xsl:value-of select="ASBMessage/LinkURL"/>
    </xsl:variable>


HTML
<pre lang="HTML"><pre lang="HTML"><pre lang="HTML">
However, the output which comes is not as expected. The variable url value doesnt come and {$URL}' comes as it is behind the button. Any idea how to use the variable value in this situation?

What I have tried:

I have tried to use
xsl:value-of select="ASBMessage/LinkURL"/
directly instead of {$URL}, and few other things, but didnt get the required output.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900