I am trying to pull a specific node from my xml document, but continue to get content from all nodes. I am testing for a specific jNumber by passing the number to the xslt in a variable set with the fragment call ($jNumber).
<xsl:if test="products/product/jNumber[. = $jNumber]">
<div class="floatLeft padTop10 margLeft10" style="width:185px;">
<xsl:for-each select="products/product/topicFocus">
<div id="tab{./@tab}focus" class="linksUnit padBtm3" style="display:block;"><xsl:text>» </xsl:text><a href="#" class="bold" target="_blank"><em><xsl:value-of select="./@name" /></em></a></div>
<div id="tab{./@tab}ready" class="linksUnit padBtm3" style="display:none;"><xsl:text>» </xsl:text><a href="#" target="_blank"><xsl:value-of select="./@name" /></a></div>
</xsl:for-each>
<xsl:for-each select="products/product/topicLeft">
<div id="tab{./@tab}focus" class="linksUnit padBtm3" style="display:none;"><xsl:text>» </xsl:text> <a href="#" class="bold" target="_blank"><em><xsl:value-of select="./@name" /></em></a></div>
<div id="tab{./@tab}ready" class="linksUnit padBtm3" style="display:block;"><xsl:text>» </xsl:text><a href="#" target="_blank"><xsl:value-of select="./@name" /></a></div>
</xsl:for-each>
</div>
</xsl:if>
It was my understanding that the if statement would cause only nodes that tested true to be displayed. Is that true?
<products>
<product>
<jNumber>1234</jNumber>
<name>Product #1</name>
<numberoftabs>12</numberoftabs>
<!-- Links at top of the page -->
<topicFocus tab="1" name="Accessories"></topicFocus>
<!--topicLeft tab="2" name="Configuration examples"></topicLeft-->
<topicLeft tab="2" name="Resources (white papers, datasheets, etc.)"></topicLeft>
<topicLeft tab="3" name="Download software"></topicLeft>
<topicLeft tab="4" name="FAQs"></topicLeft>
<topicLeft tab="5" name="Interoperability"></topicLeft>
<!--topicLeft tab="6" name="MIBs"></topicLeft-->
<topicRight tab="6" name="Technical documentation">
<subCategory tab="7">Management and Configuration</subCategory>
<subCategory tab="8">Archived</subCategory>
</topicRight>
<topicRight tab="9" name="Related links"></topicRight>
<topicRight tab="10" name="Support form"></topicRight>
</product>
</products>