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:annotation>
    <xs:documentation>Not the real urType, but as close an
    approximation as we can get in the XML
    representation</xs:documentation>
  </xs:annotation>
  <xs:sequence>
    <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any"
            processContents="strict" />
  </xs:sequence>
  <xs:anyAttribute namespace="##any" processContents="strict" /> 
</xs:complexType>

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

  http://www.w3.org/2001/05/xmlschema-rec-comments#pfianyTypeLax

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

Jeni

---
Jeni Tennison
http://www.jenitennison.com/
Received on Thursday, 29 August 2002 14:16:21 GMT

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