Re: [xsl] RE : Still Testing!

Subject: Re: [xsl] RE : Still Testing!
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Sun, 13 Feb 2005 12:33:16 +0100
Tempore 12:04:02, die 02/13/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Adam J Knight <adam@xxxxxxxxxxxxxxxxx>:

This is my xsl:template I am using.
It doesn't appear to work, in that the second condition doesn't cause the
display of the appropriate value.

<xsl:template match="tree_node">
	<xsl:if test="parent::tree or parent::tree_node[@id=$c_node]">
          <xsl:value-of select="@value"/>
      </xsl:if>
	
</xsl:template>

Could it be that this is the only template in your xslt? In that case you should add <xsl:apply-templates/> or otherwise, processing will stop when the first 'tree_node' element level is encountered:


<xsl:template match="tree_node">
<xsl:if test="parent::tree or parent::tree_node[@id='7']">
          <xsl:value-of select="@value"/>
		<xsl:apply-templates/>
</xsl:if>
</xsl:template>



regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
Laudeo W3C et dona ferens

Current Thread