本文介绍了XSLT初学者的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有5天的XSLT经验,我确信我的问题是 几乎和他们一样基本但我无法解决,所以我希望 有人会对我表示同情 - 拜托! 我继承了一个XML文件格式,它有一个标题节点和几个子节点 : < wi workitemid =" 99999" ....等.... /> < widata dataname =" AMOUNT" datadisplay = QUOT;金额" datavalue =" 123.45" /> < widata dataname =" ADDRESS1" datadisplay = QUOT;地址]按钮datavalue =" Line 1" > < widata .... etc .... 我正在使用XSLT处理它们以生成HTML表格,用于 例如: < xsl:apply-templates select =" widata [@dataname =''AGENTNAME'']" mode =" left_left" /> 模板将datadisplay的值放入一个表格单元格中,并将的值数据值放入下一个细胞。 到目前为止,非常好。但是,我如何从两个widata 节点获取值并将它们连接起来以便我可以将它们放入一个单元格中?我知道关于concat函数但是我有问题从节点获取 的值并存储它们以便我可以使用 这个功能。 我希望我已经包含了足够的信息以便提供帮助。 谢谢。 Martin 解决方案 I have 5 days of experince with XSLT and I am sure my problem ispretty much as basic as they come but I cannot work it out, so I hopesomeone will take pity on me - please! I have inherited an XML file format which has one header node andseveral child nodes : <wi workitemid= "99999" .... etc .... /><widata dataname="AMOUNT" datadisplay="Amount" datavalue="123.45"/><widata dataname="ADDRESS1" datadisplay="Address" datavalue="Line1" ><widata .... etc .... and am processing them using XSLT to produce an HTML table, by forexample : <xsl:apply-templates select="widata[@dataname = ''AGENTNAME'']"mode="left_left"/> The template puts the value of datadisplay into one table cell, andthe value of datavalue into the next cell. So far, so good. However, how would I get the values from two widatanodes and concatenate them so that I can put them into one cell? Iknow about the concat function but I am having problems getting holdof the values from the nodes and storing them so that I can then usethat function. I hope I have included enough info to be helpful. Thank-you. Martin 解决方案 这篇关于XSLT初学者的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-16 01:20