OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[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, 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:


But that's untested.

Good luck!

Take care,

    John L. Clark

[0] http://www.w3.org/TR/xpath 

PGP signature

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]