W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2001

Re: Catching node at undetermined depth in key

From: Guillaume Rousse <rousse@ccr.jussieu.fr>
Date: Sat, 1 Sep 2001 13:25:42 +0200
To: xmlschema-dev@w3.org
Cc: ht@cogsci.ed.ac.uk (Henry S. Thompson)
Message-Id: <20010901112542.A2F914EF3@silbermann.snv.jussieu.fr>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC