Ainsi parlait [EMAIL PROTECTED] :
> Hi Guillaume,
Hi Neil. Thanks for the reply.
> Looks like you have two choices to me:
>
> <key name="fooKey">
> <selector xpath="model:foos/model:foo | model:foos/*/model:foo"/>
> <field xpath="@id"/>
> </key>
>
> which should do exactly what you want but isn't perhaps as pretty as you
> might like; or
I used this solution as i have many model:foo hanging around, not only under
model:foos element. However, this syntax seems to be badly handled by
xerces-j, and only the first proposition seems to be used.
This time with real data :
<key name="nameKey">
<selector xpath="model:data/model:names/*/model:name |
model:data/model:names/model:name"/>
<field xpath="@id"/>
</key>
gives
[Error] pocilloporidae.xml:1185:11: Key with value [ID Value: name1] not
found for identity constraint of element "dataset"
<key name="nameKey">
<selector xpath="model:data/model:names/model:name |
model:data/model:names/*/model:name"/>
<field xpath="@id"/>
</key>
gives
[Error] pocilloporidae.xml:1185:11: Key with value [ID Value: name4] not
found for identity constraint of element "dataset".[Error]
[..]
[Error] pocilloporidae.xml:1185:11: Key with value [ID Value: name10] not
found for identity constraint of element "dataset".
[..]
[Error] pocilloporidae.xml:1185:11: Key with value [ID Value: name15] not
found for identity constraint of element "dataset".
Etc...
name1 is toplevel, while others are deepest in name hierachy.
Full document and schema are available, if you want to check if i'm just dumb
or if i've found a bug. I'm using a self-build xerces-j 1.4.2 /
Document is at
http://bohm.snv.jussieu.fr/~rousse/recherche/osis/model/src/xml/data/pocilloporidae.xml
Schema is at
ttp://bohm.snv.jussieu.fr/~rousse/recherche/osis/model/src/xml/schema/model.xsd
--
Guillaume Rousse <[EMAIL PROTECTED]>
GPG key http://bohm.snv.jussieu.fr/~rousse/gpgkey.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]