xsl-list
[Top] [All Lists]

[xsl] Selecting Median of Root to Deepest node

2007-08-01 03:06:59
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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--