W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2002

Re: Anything

From: Jeni Tennison <jeni@jenitennison.com>
Date: Tue, 10 Sep 2002 16:11:23 +0100
Message-ID: <62323470526.20020910161123@jenitennison.com>
To: xmlschema-dev@w3.org, Mikael Joukakelian <mikaelj@cae.com>
CC: "'Eric Jain'" <Eric.Jain@isb-sib.ch>

Hi Mikael,

> This does not work. With mixed="true" "character data can appear
> alongside subelements". However, I am still forced to define all the
> subelements.

Try adding a processContents="lax" attribute to the wildcard. Oh, and
the mixed attribute should go on the xs:complexType element not the
xs:element element, and you might want to allow any attributes as
well, so I'd use something like:

<xs:element name="ForeignNode">
  <xs:complexType mixed="true">
      <xs:any processContents="lax"
              minOccurs="0" maxOccurs="unbounded" />
    <xs:anyAttribute processContents="lax" />

Depending on your processor, you might be able to do:

<xs:element name="ForeignType" type="xs:anyType" />

Processors differ on whether xs:anyType gives you strict, lax or skip
validation of the content of the element, depending on their
implementers' reading of the spec...



Jeni Tennison
Received on Tuesday, 10 September 2002 11:11:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:58 UTC