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

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

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 9 Jul 2003 09:58:29 +0100
Message-ID: <20167767506.20030709095829@jenitennison.com>
To: remko de knikker <remko.deknikker@yale.edu>
CC: xmlschema-dev@w3.org

Hi Remko,

> 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??

Yes. Use an <xs:any> wildcard in the content model for your element:

<xs:element name="method2Response">
      <xs:any />

You can put minOccurs/maxOccurs attributes on the wildcard if there
are multiple elements within the method2Response element.

You can also use the namespace attribute on <xs:any> if you want to
limit the namespaces that the elements can belong to.



Jeni Tennison
Received on Wednesday, 9 July 2003 04:58:33 UTC

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