Re: Catching node at undetermined depth in key

Ainsi parlait Henry S. Thompson :
> Guillaume Rousse <rousse@ccr.jussieu.fr> writes:
> > I have a bunch of nested foo under foos element i would like to identify
>
> So you haven't told us quite enough to help.
Oops, sorry.

> 1) Are there many <foos> or only one in a given document?
Only one.

> 2) If many, are they separate identity scopes, or one, i.e. is the
> following meant to be good or bad?
Not relevant here.

> 3) Can <foo id='a'> appear anywhere other than inside <foos>?
With an id attribute, yes. Without, no

> Only if the answers are 'many';'bad';'yes' do you have a problem.
>
> Otherwise just use
>
>  <key name="fooKey">
>    <selector xpath=".//foo"/>
>    <field xpath="@id"/>
>  </key>
>
> within the root element declaration if the answer to (2) is 'bad', or
> within the <foos> element declaration if the answer to (2) is 'good'.
So i guess i must either declare the key in root element with an additional 
[@id] assertion, or in the <foos> element declaration. Was my initial 
supposition it would make fooKey local to this element wrong ?
-- 
Guillaume Rousse <rousse@ccr.jussieu.fr>
GPG key http://bohm.snv.jussieu.fr/~rousse/gpgkey.html

Received on Saturday, 1 September 2001 07:27:14 UTC