Bundling Of Multiple XML Schemas

Hi All,

We are implementing XQuery, and XQuery provides an easy way to write 
queries that construct results in multiple namespaces. We would like 
to be able to dynamically compute, and deliver to the user, the schema
of the query result.

According to the XML Schema spec, multiple schema documents are 
necessary to describe such results. These schema documents would then 
refer to each other using the import directive.

Our question is how to deliver this "compound schema" that
references multiple namespaces, without requiring that the schema
documents be stored in multiple files, or retrieved independently by
URL, etc.  In other words, we need some way to bundle these schemas 
together, and possibly also some legal way to use the schema location
"hint" to indicate that the schemas are bundled together.

It seems like this issue must have arisen before in other contexts;
has there been any suggestion for a standard for this, or are there
any conventions that people are using?

Here is an example query to make the question more concrete; this
query involves two "existing" namespaces that are used in the 
source documents, and two "new" namespaces that have been invented
just for this query (and which have no existing schema document):

NAMESPACE hr = "http://www.nimble.com/HumanResources"
NAMESPACE eng = "http://www.nimble.com/Engineering"
NAMESPACE rs = "http://www.nimble.com/results"
NAMESPACE re = "http://www.nimble.com/resultenvelope"

<re:envelope>
   { FOR $employee IN document( "employees.xml" )//hr:employee
     RETURN 
     <rs:record>
       { $employee }
       { document( "proj.xml" )//eng:project[empid=$employee/id] }
     </rs:record>
   }
</re:envelope>

==========================================
Konstantin Komissarchik
Sr. Software Engineer
Nimble Technology

kosta@nimble.com
http://www.nimble.com
 
Applying computer technology is just 
finding the right wrench to pound in the
correct screw.
========================================== 

Received on Saturday, 9 March 2002 06:27:45 UTC