在XSL中使用变量:XSLT中的roundrect标记中的文本 [英] Using a variable inside XSL:text in roundrect tag in XSLT

查看:92
本文介绍了在XSL中使用变量:XSLT中的roundrect标记中的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是xslt编码的新手,需要你的帮助。我正在使用xslt设计电子邮件模板,我使用样式创建了一个按钮。仅当接收器是Microsoft Outlook(mso)时才会显示此按钮。以下是代码。请注意v:roundrect标签内的href属性。



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.

<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>







我使用了一个名为'URL'的变量,它是元素的值:






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

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







<pre lang="HTML"><pre lang="HTML"><pre lang="HTML">

然而,来的输出并不像预期的那样。变量url值没有来,{$ URL}'来自按钮后面。知道如何在这种情况下使用变量值吗?



我尝试过:



我试图使用

xsl:value-of select =ASBMessage / LinkURL/

而不是{$ URL},很少其他的东西,但没有得到所需的输出。

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.

推荐答案

URL}style =height:37px; v-text-anchor:middle; width:190px; arcsize =15%stroke =ffillcolor =#557d9a>
< w:anchorlock />
< center style =color:#ffffff; font-family: Arial,sans-serif; font-size:13px; font-weight:bold; text-decoration:none;>
验证电子邮件地址
< / center>
< / v:roundrect><![endif] - > ]]> < / xsl:text >
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>







我使用了一个变量称为'URL',它是元素的值:






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

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







<pre lang="HTML"><pre lang="HTML"><pre lang="HTML">

然而,输出的是不像预期的那样。变量url值没有来,{

However, the output which comes is not as expected. The variable url value doesnt come and {


URL}'来自按钮后面。知道如何在这种情况下使用变量值吗?



我尝试过:



我试图直接使用

xsl:value-of select =ASBMessage / LinkURL/

而不是{
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},以及其他一些东西,但没有得到所需的输出。
URL}, and few other things, but didnt get the required output.


这篇关于在XSL中使用变量:XSLT中的roundrect标记中的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆