RE: Value of @processContents: Recommend "strict"

Martin,

Thx for pointing out the "official" schema. Since it uses "lax", I revise 
my recommendation to be "lax" in the interest of consistency. 

BTW, this mixup reinforces the desirability of giving the schema a more 
normative role in WSDL 1.2.

Arthur Ryman





"Martin Gudgin" <mgudgin@microsoft.com>
Sent by: www-ws-desc-request@w3.org
07/16/2003 06:06 PM

 
        To:     Arthur Ryman/Toronto/IBM@IBMCA, <www-ws-desc@w3.org>
        cc: 
        Subject:        RE: Value of @processContents: Recommend "strict"

 

Arthur,
 
Although the schema in the WSDL 1.1 spec document does not specify a 
processContents value, the actual schema at http://schemas.xmlsoap.org/wsdl/ uses processContents='lax' ( and has done for a long time ).
 
processContents='lax' seems to be the 'sweet spot' here as it allows me to 
validate a WSDL document even if I don't have schemas for all the 
extensions therein. I don't want validation to fail just because I don't 
have an extension schema.
 
Gudge

From: www-ws-desc-request@w3.org [mailto:www-ws-desc-request@w3.org] On Behalf Of Arthur Ryman
Sent: 14 July 2003 11:30
To: www-ws-desc@w3.org
Subject: Value of @processContents: Recommend "strict"


Since we are using wildcards for extensions instead of substitution 
groups, we need to decide on how extensions get validated. The <xs:any> 
and <xs:anyAttribute> elements have the @processContents attribute which 
controls validation as follows [1]: 

{process contents} controls the impact on ·assessment· of the information items allowed by wildcards, as follows: 
strict 
There must be a top-level declaration for the item available, or the item 
must have an xsi:type, and the item must be ·valid· as appropriate. 
skip 
No constraints at all: the item must simply be well-formed XML. 
lax 
If the item, or any items among its [children] if it's an element information item, has a uniquely determined 
declaration available, it must be ·valid· with respect to that definition, that is, ·validate· where you can, don't worry when you can't. 

The default value is strict. The value used in WSDL 1.1 [2] is the 
default, i.e. strict. Since tools need to process WSDL, it makes sense for 
extensions to be validated as much as possible by the XML schema 
validator. Therefore, we should use strict. This choice places a burden on 
extension authors to provide a schema for the extension, but the benefit 
is simplified extension processing code in tools (less need for hand-coded 
validity checking). 

[1] http://www.w3.org/TR/xmlschema-1/#Wildcards 
[2] http://www.w3.org/TR/2001/NOTE-wsdl-20010315#A4.1

Arthur Ryman

Received on Thursday, 17 July 2003 11:17:53 UTC