高分请教xslt问题!急!急!急!

Gavid 2006-11-02 05:29:29
<sTable>
<id>5</id>
<PersonId>8</PersonId>
<name>sdfsd</name>
<gender>0</gender>
<age>23</age>
<address>sdf</address>
<telephone>sdf</telephone>
<caseNum>sdf</caseNum>
<diagnose>sdf</diagnose>
<cureproject>sdf</cureproject>
<starttime>2006-11-2 0:00:00</starttime>
<managemode>0</managemode>
<dname>sdf</dname>
<archivesnumber>sdf</archivesnumber>
<fname>sdf</fname>
<sickrelation>sdf</sickrelation>
<checkintime>2006-11-2 0:00:00</checkintime>
<canceltime>2006-11-2 0:00:00</canceltime>
</sTable>

我可不可以将第二个子结点作为变量,实现取值的动态性?
<xsl:value-of select="/root/sTable/$sVal"/>
我这样写不行,变量和字符不能写在一起,应该怎么写????
...全文
263 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
cloudgamer 2007-04-14
  • 打赏
  • 举报
回复
学习
yjs_lh 2006-11-05
  • 打赏
  • 举报
回复
<xsl:value-of select="/root/sTable[PersonId=8]"/>

<xsl:variable name="personid" select="8"/>
<xsl:value-of select="/root/sTable[PersonId=$personid]"/>

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧