【发布时间】:2013-05-26 07:29:40
【问题描述】:
如果选中 xsl <form> 中的单选按钮,我想显示 <tags> 和 <text>。
这是我的 xml:
<global>
<informations>
<title>document 1</title>
<text>This is text of doc 1</text>
<tags>tag01</tags>
</informations>
<informations>
<title>document 2</title>
<text>This is text of doc 2</text>
<tags>tag02</tags>
</informations>
</global>
这里是我的 xsl(带有 HTML 输出方法):
<xsl:template match="/">
<form><input type="radio">here</input><input type="radio">and here !</input></form>
<xsl:for-each select="//informations">
<div>
<h2><xsl:value-of select="title"/></h2>
<p><xsl:value-of select="text"/></p>
<tag><xsl:value-of select="tags"/></tag>
</div>
</xsl:template>
感谢您的帮助!
【问题讨论】:
标签: xml xslt input radio-button