[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [wsrp] CR309 - Extension type
thanks Subbu for this evaluation.
I agree to your conclusion and would also favour lax for our extensions
type.
And yes, I'm intersted in the files you used for testing.
Mit freundlichen Gruessen / best regards,
Richard Jacob
______________________________________________________
IBM Lab Boeblingen, Germany
Dept.8288, WebSphere Portal Server Development
WSRP Standardization Technical Lead
Phone: ++49 7031 16-3469 - Fax: ++49 7031 16-4888
Email: mailto:richard.jacob@de.ibm.com
Subbu Allamaraju
<subbu@bea.com>
To
01/14/2005 05:09 wsrp@lists.oasis-open.org
PM cc
Subject
Re: [wsrp] CR309 - Extension type
Based on yesterday's feedback, I looked into the schema spec again, and
experimented with some test schemas/documents. The findings are below.
Per the schema, an xs:any type can be used with a processContents
attribute. This is an optional attribute, with the following valid values:
a. "strict": This is the default, and requires validating processors to
validate the contents.
b. "skip": This requires validating processors to skip the contents,
even if the extension type schema is known to the processor.
c. "lax": This requires validating processors to "try" to process the
contents if the extension type schema is known to the processor. If not,
it can skip.
Here is the test schema I used. It has three kinds of extension elements.
<xs:element name="strictExtension" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:any namespace="##other" processContents="strict"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="skipExtension" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:any namespace="##other" processContents="skip"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="laxExtension" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:any namespace="##other" processContents="lax"/>
</xs:sequence>
</xs:complexType>
</xs:element>
I added different kinds of extensions to an instance document and tried
to validate, and here are the results:
a. strictExtension: Always tries to validate. Processing fails if the
schema is not available and/or the instance is not valid.
b. skipExtension: Always skips validation, even if the schema is known.
I tested this by adding invalid xml within this extension, and it was
not picked up by the validator.
c. laxExtension: I created two extension elements, one containing an
element of know schema, another containing an element of unknown schema.
The processor validated the first one (and failed when the xml is
invalid), but skipped the second one (and accepted invalid xml).
Note that current WSRP1.0 extension defaults to "strict" and does not
allow validators to ignore unknown types.
Given these findings, I recommend adding a "processContents=lax"
attribute to WSRP1.0 extension. This change meets the concerns of those
implementations/intermediaries that always want to valid, and also those
that want to ignore unknown elements.
Please mail me if you're interested in the xsd/xml files I used for
testing.
Regards,
Subbu
To unsubscribe from this mailing list (and be removed from the roster of
the OASIS TC), go to
http://www.oasis-open.org/apps/org/workgroup/wsrp/members/leave_workgroup.php
.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]