[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Identify first <section>?
On Wed, Dec 10, 2003 at 06:40:15PM +0000, firstname.lastname@example.org 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 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  http://www.w3.org/TR/xpath