This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5797 - SML validity appeal to schema-validity is underspecified
Summary: SML validity appeal to schema-validity is underspecified
Status: RESOLVED FIXED
Alias: None
Product: SML
Classification: Unclassified
Component: Core (show other bugs)
Version: LC
Hardware: Macintosh Mac System 9.x
: P2 normal
Target Milestone: LC
Assignee: Kumar Pandit
QA Contact: SML Working Group discussion list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-24 15:28 UTC by C. M. Sperberg-McQueen
Modified: 2008-08-21 22:09 UTC (History)
5 users (show)

See Also:


Attachments

Description C. M. Sperberg-McQueen 2008-06-24 15:28:29 UTC
In section 8, the first condition for valid SML models (or perhaps I 
should say SML-valid models) is that 

    In each instance document in the model, the [validity] property 
    of the root element and all of its attributes and descendants 
    MUST NOT be "invalid" when schema validity is assessed by a 
    conforming schema-aware processor with respect to the referenced 
    XML Schema documents in the model's definition documents. [XML '   
    Schema Structures]

But the conditions given do not determine an interoperable result
(even within the limits of XSD 1.0).  

We need to decide, and specify, whether validity assessment needs
to be initiated with type-driven, element-driven, lax-wildcard,
or strict-wildcard validation.  If we specify lax wildcard validation,
documents may be vacuously valid; if we specify strict wildcard
validation, models without any schema documents cannot be valid
(that may be OK).  We can't specify which element or type should be
used in general; it might be specified in the SML-IF document
(or in some out-of-scope way, for SML processors).

Perhaps the simplest thing to do, in the light of our discusssions
yesterday, would be to specify that validation is started in
lax- or strict-wildcard mode.
Comment 1 Pratul Dublish 2008-07-17 20:03:45 UTC
Record of discussion on 7/17 - members felt we need more time to investigate this

Sandy: possible solutions. a) when there is no schema document at all, then use "lax-wildcard", otherwise "strict". or b) for instances documents covered by at least one "schema binding", use "strict"; if an instance is not covered by any "schema binding", then use "lax".
Comment 2 Pratul Dublish 2008-07-31 19:57:43 UTC
Resolution in 7/31 call

If a schema is bound to an instance document, we perform strict-wildcard validation. If a schema is not bound to an instance document, no schema validation is performed. 

The SML spec should explicitly mention that it does not define how a schema is bound an instance document.
Comment 3 Virginia Smith 2008-08-13 00:11:42 UTC
A note was added to section 8 as part of the resolution of Bug #5797 that states that this spec does not define how a schema is
bound an instance document.
Comment 4 Kumar Pandit 2008-08-19 02:55:14 UTC
Added item 8 in the first item-list under section 8 Conformance. 

---
8. The processor MUST start Schema-Validity Assessment at the document root element with no stipulated declaration or definition. If the document root element and the schema determine an element declaration (by the name of the element) or a type definition (via xsi:type), then strict validation is performed; if they do not identify any declaration or definition, then no schema-validity assessment is performed.

Note:

This method is generally known as strict-wildcard validation.
---

links:
Schema-Validity Assessment => http://www.w3.org/TR/xmlschema-1/#cvc-assess-elt
strict validation => http://www.w3.org/TR/xmlschema-1/#key-sva
Comment 5 Sandy Gao 2008-08-20 02:59:03 UTC
The first list (about processor conformance) already has

"1. The validator MUST perform model validation  as defined in this specification."

So I didn't expect a new item to be added to that list. Instead, I expected to see changes in the last list (model validity) to reflect our "strict if bound, no validation otherwise" decision (see comment #2). e.g. change bullet 1 to:

"1. In each instance document in the model, the [validity] property of the root element MUST be "valid", and the [validity] property of all the other elements and all the attributes MUST NOT be "invalid", when schema validity is assessed with respect to any schema that is bound to this instance document. The assessment starts at the root element with no stipulated declaration or definition. [XML Schema Structures]"
Comment 6 Kirk Wilson 2008-08-20 11:21:41 UTC
+1 for Comment #5.  Suggest rewording final sentence, reversing order of the clauses:

The assessment starts with no stipulated declaration or
definition at the root element. 
Comment 7 Pratul Dublish 2008-08-21 19:12:11 UTC
Make the following change to Item 1 of the definition of valid SML model and remove Item 8 from the definition of conforming SML validators

 In each instance document in the model which is bound to a schema,
 the [validity] property of the root element MUST be "valid", and the
 [validity] property of all the other elements and all the attributes
 MUST NOT be "invalid", when schema validity is assessed with respect
 to any schema that is bound to this instance document. The assessment
 starts at the root element with no stipulated declaration or
 definition. [XML Schema Structures].
 The schema-validity of instance documents not bound to any
 schema does not contribute to the validity or invalidity of the 
 model.
Comment 8 Kumar Pandit 2008-08-21 22:09:35 UTC
fixed per comment# 7.