[英]Not able to get the value for the xml tags using xsl - (xsl:value-of)
XML Code: XML代码:
<complextype name="submission">
<sequence>
<file-audit-data></file-audit-data>
<submission-period-from-date>01/01/2014</submission-period-from-date>
<submission-period-to-date>12/31/2014</submission-period-to-date>
<aco-gpro></aco-gpro>
</sequence>
<attributeGroup ref="submissionAttributeGroup" />
</complextype>
XSL Code: XSL代码:
<xsl:for-each select="//complextype[@name='submission']">
<td width="40%"><u>From date:</u><br/><xsl:value-of select="submission-period-from-date"/><br/></td>
<td width="40%"><u>To date:</u><br/><xsl:value-of select="submission-period-to-date"/><br/></td>
</xsl:for-each>
It is not at all going inside for-each, Please help me in understanding what is causing the issue... 并不是每个问题都可以解决,请帮助我了解导致问题的原因...
You xsl:foreach work on 'complextype' node, not on 'sequence' node. 您xsl:foreach在“ complextype”节点上工作,而不在“ sequence”节点上工作。 Try this: "<xsl:for-each select="//complextype[@name='submission']/sequence">" 试试这个:“ <xsl:for-each select =” // complextype [@ name ='submission'] / sequence“>”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.