[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] selecting nodes based on sibling values
Hi List. Let's say I have an XML like below... <data> <row> <level>40</level> <keycode>1254.45.12</keycode> </row> <row> <level>50</level> <keycode>1254.45.12.7</keycode> </row> <row> <level>50</level> <keycode>1254.45.12.8</keycode> </row> <row> <level>50</level> <keycode>1254.45.12.9</keycode> </row> <row> <level>40</level> <keycode>99.25.6</keycode> </row> <row> <level>50</level> <keycode>99.25.6.45</keycode> </row> <row> <level>50</level> <keycode>99.25.6.46</keycode> </row> </data> What could be the XPath expression to get the maximum number of nodes of level=50 in data those keycode starts like the level=40 line ? Here the answer would be 3 as the maximum number of level = 50 nodes for a given level = 40 is 3 I have tried several things, but I am stuck.... (I am using XSLT 2.0 on Saxon) Thanks for lending me some neurons... Best regards, Fabien
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|