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>
How to define a structure of which you only know that it's an 
XMLDocument with a certain root???

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:element name="method2Response">
    <xsd:element name="*" type="*" ...??


Received on Tuesday, 8 July 2003 16:24:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:02 UTC