Subject: [xsl] Ignoring sibling parents From: Kaine Varley <kaine.varley@xxxxxxxxxxxxxxxxxx> Date: Tue, 6 May 2003 16:58:18 +0100 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] EXSLT, Michael Kay | Thread | Re: [xsl] Ignoring sibling parents, David Carlisle |
RE: [xsl] Tables interactive, John Proctor | Date | Re: [xsl] XPathAPI: How to associat, me |
Month |