W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

how to define an XML Document with an unknown/variable element

From: remko de knikker <remko.deknikker@yale.edu>
Date: Tue, 08 Jul 2003 16:22:47 -0400
To: xmlschema-dev@w3.org
Message-id: <3F0B2817.7070309@yale.edu>
Question:
How to define a structure of which you only know that it's an 
XMLDocument with a certain root???

Situation:
I have created a webservice and am defining the output message in the 
wsdl (web service description language).
The output message structure contains ALWAYS a root element:<xsd:element 
name="method2Response"> and is always an XML Document.
But the structure of the document depends completely on the input of the 
user. How do I define a schema for this situation??

Why do I want to do this?
All medical terms are defined in a hierarchy, while terms are defined by 
their concept (so varying spelling, case insensitive etc does not 
influence the hierarchy).
Each concept has a concept id, so the medical vocabulary is captured in 
a concept hierarchy. For my project, the user submits a gene id, I match 
it to a concept id, and return the hierarchy of concepts from the gene 
to its root concept in the hierarchy. So depending on the gene id, my 
result tree varies enormously.

Except for the fact that the response is always an XML Document with the 
root <xsd:element name="method2Response">. Is there a way to define this??


<xsd:schema 
xmlns:tns="http://biryani.med.yale.edu:8081/axis/services/GetUMLS"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://biryani.med.yale.edu:8081/axis/services/GetUMLS">

<xsd:element name="method2Response">
    <xsd:element name="*" type="*" ...??
</xsd:element>

</xsd:schema>

thanks
remko
Received on Tuesday, 8 July 2003 16:24:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:39 GMT