Reputation:
Unfortunately the xsl outputs the same ShortName entry for each section with this construct:
<xsl:for-each select="Questionnaire/Section">
<xsl:for-each select="Item">
<xsl:value-of select="Question"/></strong>
<xsl:for-each select="Optionlist/option">
<input type="radio" >
<xsl:attribute name="name"><xsl:value-of select="//ShortName" />
</xsl:attribute>
The XML:
<Questionnaire>
<Section><Title>Available Data</Title>
<Item>
<ShortName>Name</ShortName>
<Optionlist>
<option><entry>Yes</entry></option></Optionlist>
</Item>
</Section>
Thanks
Upvotes: 0
Views: 25
Reputation: 167716
It seems instead of the path //ShortName
you want ancestor::Item/ShortName
.
Upvotes: 1