[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Selecting Median of Root to Deepest node

Subject: Selecting Median of Root to Deepest node
From: "J. Zhang" <j.zhang@xxxxxx>
Date: Wed, 01 Aug 2007 12:06:38 +0200
 Selecting Median of Root to Deepest node
Hi all,

I have written a stylesheet that selects the deepest node when there is a match with a keyword. I want to expand my stylesheet so that it also selects the median. I need to count the number of nodes for the deepest node. I am using Saxon's function saxon:path() to give me the absolute path.

I use xsl:sort and position() = 1 to select the deepest node. I know you can use the function count() to count the number of nodes. I want to test if a path contains at least 4 nodes while I am at the deepest node. I am trying count(saxon:path()), but that clearly is not working. Anyone know how I can pull off this trick?

Thanks
  jz

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.