This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wed, Dec 10, 2003 at 06:40:15PM +0000, martin.gautier@myrnham.co.uk wrote: > Unfortunately I'm still not getting anywhere. > > test="not($node/preceding-sibling::section)" does actually check all > sibling elements before node right? ie. in: > > <chapter> > <title> > <chapterinfo>..</> > <section> <-- if here > <section> > > ..will check <title> and <chapterinfo> to return "true"? I think the spec[0] has a revealing example for this: * preceding-sibling::chapter[position()=1] selects the previous chapter sibling of the context node So I think your XPath expression checks to see if there are any preceding section siblings, not /any/ siblings. I think you'd want something like: not($node/preceding-sibling::*) But that's untested. Good luck! Take care, John L. Clark [0] http://www.w3.org/TR/xpath
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |