OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

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:any namespace="##other" processContents="strict"/>
<xs:element name="skipExtension" minOccurs="0" maxOccurs="unbounded">
       <xs:any namespace="##other" processContents="skip"/>
<xs:element name="laxExtension" minOccurs="0" maxOccurs="unbounded">
       <xs:any namespace="##other" processContents="lax"/>

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.



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]