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

Re: is processContents="lax" recursive ?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 29 Aug 2002 19:16:20 +0100
Message-ID: <681485985804.20020829191620@jenitennison.com>
To: xmlschema-dev@w3.org, Tom Moog <tmoog@sarvega.com>

Hi Tom,

> Suppose one is validating an element P (parent) which is
> xs:any with processContent="lax".
> Suppose P contains an immediate child C which itself
> has an immediate child GC (grandchild).
> Suppose C is not recognized and cannot be validated.
> Suppose GC is defined and can be validated.
> My reading of the spec is that under these circumstnaces
> C should be validated against the ur-type.  It is not clear
> to me whether the laxness is applied recursively to GC.
> Under these circumstances should a validator attempt to
> validate GC or should it skip validation of the contents of
> C since it has no knowledge of the type of C ?

Good question. I agree with you that under these circumstances C
should be validated against the ur-type, and therefore its content
should be validated against the ur-type's content model.

The ur-type's content model is another xs:any wildcard; the spec
currently doesn't say whether the processContents of that wildcard is
strict, lax or skip. The schema for schema says 'strict':

<xs:complexType name="anyType" mixed="true">
    <xs:documentation>Not the real urType, but as close an
    approximation as we can get in the XML
    <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any"
            processContents="strict" />
  <xs:anyAttribute namespace="##any" processContents="strict" /> 

but the comments/pending errata implies either 'skip' or 'lax':


So I'm afraid that the answer at the moment is somewhat unclear.


Jeni Tennison
Received on Thursday, 29 August 2002 14:16:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:05 UTC