|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Ignoring sibling parents
Hi all, I find that I am unable to select the sibling information for siblings that don't share the same parents. I use the following XPath statement, well similar anyway, to return the sibling id, and it performed perfectly until I encountered siblings with different parents: foobar/foo[@id=2]/following-sibling::foo[1]/@id foobar/foo[@id=2]/preceding-sibling::foo[1]/@id Original data: <foobars> <foobar> <foo id="1" /> <foo id="2" /> <foo id="3" /> <foo id="4" /> </foobar> </foobars> But my problem occurred when I started receiving data like this, since I still wanted to pick up <foo id="3"> id attribute: <foobars> <foobar> <foo id="1" /> <foo id="2" /> </foobar> <foobar> <foo id="3" /> <foo id="4" /> </foobar> </foobars> I don't get anything even if I precede my XPath expressions above with foobars/. Any suggestions? Kaine XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








