[xquery-talk] Problems with query on different doccument

Giulio Rizzo rizzogiulio at yahoo.it
Thu Nov 30 16:45:23 PST 2006


I have a problem, I have to query the schema to take
some data and than use it in another query on a
document XML instance of the schema. I tried something
like this:

xquery version "1.0";
for $name in doc("casodistudio.xsd")//xs:element
[xs:annotation/xs:appinfo/type = 'entity']/@name
for $pr in 
return <code pr="{$pr}"/>

What I'm trying here is to get all the name of the
entity from the schema (contained in the attribute
name of some xs:element, the one with the specified
appinfo). With this name I want to query the instance
to get all the attribute code (the key of the entity).
The results is an empty query, maybe i missunderstood
the use of the function "string".
I espect the query to works like: if the value in the
attribute is, i.e., ASL, the query string(name)/code
must be equivalent to ASL/code.
Thanks to everibody for the attention and sorry for my
bad english.


Do You Yahoo!?
Poco spazio e tanto spam? Yahoo! Mail ti protegge dallo spam e ti da tanto spazio gratuito per i tuoi file e i messaggi 

More information about the talk mailing list