This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Finding the maximum depth from a node
- From: Dimitre Novatchev <dnovatchev at yahoo dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 10 May 2002 13:36:04 -0700 (PDT)
- Subject: [xsl] Re: Finding the maximum depth from a node
- Reply-to: xsl-list at lists dot mulberrytech dot com
I wrote:
> <xsl:template match="myDepthCompare:*">
> <xsl:param name="arg1" select="/.."/>
> <xsl:param name="arg2" select="/.."/>
>
> <xsl:if test="$arg1/@name > $arg2/@name">1</xsl:if>
> </xsl:template>
> </xsl:stylesheet>
>
>
Ooopsss.... I should compare the depths! (Sorry, but it is Friday
night):
<xsl:template match="myDepthCompare:*">
<xsl:param name="arg1" select="/.."/>
<xsl:param name="arg2" select="/.."/>
<xsl:if test="count($arg1/ancestor::folder)
> count($arg2/ancestor::folder)">1</xsl:if>
</xsl:template>
Otherwise the result is exactly the same... :o)
Cheers,
Dimitre.
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list