xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Re: Finding the maximum depth from a node


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
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor