Subject: Re: [xsl] testing preceding sibling always evaluates true From: Michael Kay <mike@xxxxxxxxxxxx> Date: Fri, 29 Jul 2011 19:19:56 +0100 |
No this is wrong. preceding-sibling::w:p[1] selects the most recent w:p element (the last in document order), whereas (preceding-sibling::w:p)[1] selects the first in document order.I believe the issue is (and I would like some clarification), is that axis steps always return nodes in document order so
preceding-sibling::w:p[1]
will always return the first paragraph with its TableCaption child.
I believe the work around for this, to collect the nodes in search order, is to make them a set,
(preceding-sibling::w:p)[1]
Michael Kay Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] testing preceding sibling, Hank Ratzesberger | Thread | Re: [xsl] testing preceding sibling, Brandon Ibach |
Re: [xsl] sorting and multiple outp, Michael Kay | Date | Re: [xsl] sorting and multiple outp, Meghan Finch |
Month |