[xquery-talk] Find elements in a particular position in file and go to that schema

bryan rasmussen rasmussen.bryan at gmail.com
Mon Jun 4 15:00:42 PDT 2007

Hi, the following query

for $qu in collection("BifSchemas")/xs:schema/xs:element
let $bifel := $qu/@name
for $newqu in collection("BifInstances")/ncms-object[view/*[local-name()=$bifel]]
return <queryinstance matching="/ncms-object[view/*[local-name()='{$bifel}']">
 { $newqu }

returns the elements from instances that I have a schema global
element for (at a particular position in my tree)

now this tree is actually quite big, much bigger than my schemas, thus
I don't want to just go backwards and say for every element node in
bifinstances under /ncms-object/view check against the schemas and
return the schema that has the definition of that instance.

So I am wondering, what is an optimal way of getting the schemas in
the collection BifSchemas that has the definition of the element
(there may in fact be multiple schemas that have this)?

Database is Exist.

Bryan Rasmussen

More information about the talk mailing list