Re: Catching node at undetermined depth in key

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.

1) Are there many <foos> or only one in a given document?
2) If many, are they separate identity scopes, or one, i.e. is the
following meant to be good or bad?
   <foos>
    . . .
    <foo id="a"/>
   </foos>
    . . .
   <foos>
    ...
    <foo id="a"/>
   </foos>
3) Can <foo id='a'> appear anywhere other than inside <foos>?

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'.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Saturday, 1 September 2001 06:36:13 UTC