Subject: [xsl] Re: Finding the maximum depth from a node From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Fri, 10 May 2002 13:36:04 -0700 (PDT) |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Re: Finding the maximum d, Greg Faron | Thread | [xsl] newbie question, Mark Hutchinson |
Re: [xsl] Finding the maximum depth, Wendell Piez | Date | RE: [xsl] Xalan Rounding, Jeff Kenton |
Month |