So I need to access a nested element in an if statement.
Below you can see an example of the XML I am using:
<Publication>
<PubName>Avoid the Consumer Apps - How to Collaborate Securely and Productively in the Finance Sector</PubName>
<Attributes>
<Attribute>
<AttributeName>Type</AttributeName>
<Value>Webinar</Value>
<ValueText>Webinar</ValueText>
</Attribute>
</Attributes>
</Publication>
And here is the XSLT code I am using to try and get to the Webinar value:
<xsl:for-each select="TradePub.com/PublicationTable/Publication">
<xsl:if test="Attributes/Attribute/Value='Webinar'">
<tr>
<td><xsl:value-of select="PubName"/></td>
<td><xsl:value-of select="PubCode"/></td>
</tr>
</xsl:if>
</xsl:for-each>
But this returns nothings, so I am wondering how I can access the Value element?
Valueequals "Webinar", the if-expression evaluates to false and no output is produced. What did you expect?