使用Xslt多次绑定相同的数据 [英] Binding same data multiple times using Xslt

查看:79
本文介绍了使用Xslt多次绑定相同的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好b $ b我有以下数据。我想使用Xslt将此数据绑定两次(相同节点两次)。任何人都可以建议吗?





< note>

< to> Tove< / to> ;

< from> Jani< / from>

< heading>提醒< / heading>

< body> Don''这个周末忘了我!< / body>

< / note>





Tove Jani提醒本周末别忘了我!< b>< / b>



Tove Jani提醒本周末别忘了我!

Hi I have following data. I want to bind this data twice(same node twice) using Xslt. Can anyone suggest a way?


<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don''t forget me this weekend!</body>
</note>


Tove Jani Reminder Don''t forget me this weekend!<b></b>

Tove Jani Reminder Don''t forget me this weekend!

推荐答案

我不确定你在这个上下文中的绑定是什么意思,但要在节点上进行两次xslt处理,你需要在xslt中设置一个规则与节点匹配,并复制xslt节点内的处理。我不相信有一种方法可以让xslt规则在同一数据上触发两次。
I''m not sure what you mean by "bind" in this context, but to do xslt processing on a node twice, you need to setup a rule in the xslt that matches the node, and duplicate the processing within the xslt node. I don''t believe there is a way to get an xslt rule to fire twice on the same data.


写两次相同的XSLT片段。
Write the same snippet of XSLT twice.


这篇关于使用Xslt多次绑定相同的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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