xslt选择带有节点值的硬编码字符串

时间:2011-11-15 16:44:10

标签: xslt xslt-1.0

我需要在每个选择值前添加此硬编码字符串 mobile /

从xml:

中选择这个超链接
<a href="{Hyperlink/a/@href}" name="xslt">

我试过这个,但它只从xslt表达式中获取值:

<a href="'mobile/' + {Hyperlink/a/@href}"> XXX </a>

1 个答案:

答案 0 :(得分:1)

尝试使用concat()

<a href="{concat('mobile/',Hyperlink/a/@href)}" name="xslt"> XXX </a>

此外,<a href="mobile/{Hyperlink/a/@href}"> XXX </a>本来应该对你有用。你确定你当前的背景会是{孩子的{1}}吗?