Hi Anton,
1. *util:collection-name* is eXist specific function. Sedna doesn't support
it.
2. Sedna doesn't have nested collection (however, as far as I know, XML:DB
API for Sedna simulates them).
Now I want find all "patients", which have for example document
> x.xml/Bloodpressure=130. How I must write the XQuery for that?
>
3. Try something like this:
*for $coll in doc("$collections")//collection[contains(@name, 'patient')]
if doc('x.xml', $coll)//Bloodpressure eq 130
return $coll
*However, it seems to me that it's better to use the following structure:
Collection 'patients' - contains documents 'patient1', 'patient2', etc -
each contains all information about this patient. With this structure you
will be able to create value based index on Bloodpressure and very simple
and fast query to find all patients with Bloodpressure=130:
*index-scan("patient-by-bloodpressure', 130, EQ)*
Ivan Shcheklein,
Sedna Team
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion