Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Selecting Median of Root to Deepest node

From: "J. Zhang" <j.zhang@------>
To:
Date: 8/1/2007 10:07:00 AM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent