[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] using only xpath string to count list items
Hello, I am working with a styling tool where I am only using an xpath string to generate text. I have the following xml where I want to know the l1items in a task. So if I am at the first l1item in the first subtask I can get back a count of two. I have been trying to use something along the lines of count(./preceding::l1item[./ancestor::task])+1 but don't know how to get to the current l1item node and figure out where it is located in the task. The tool doesn't support current() so any help doing this with an XPath string would be great. <task> <topic> <title></title> <subtask> <effect></effect> <list1> <l1item> </l1item> </list1> </subtask> <subtask> <effect></effect> <list1> <l1item></l1item> <l1item></l1item> </list1> </subtask> </topic> </task> Thanks, Deb
|
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
|