Re: Schema validation terminology

"Henry S. Thompson" wrote:

> There are three things the spec. requires:
> > >
> > >   1) Any schema documents involved must be schema-valid wrt the schema
> > >      for schemas;
> > >   2) They must satisfy the additional Schema Representation
> > >      Constraints;
> > >   3) The schema they correspond to must satisfy the Constraints on
> > >      Schemas.
> > >
> > > Failure to satisfy these conditions is an error, and processing with
> > > that schema should stop (except to provide additional feedback on
> > > other errors).
> > To check I've got this right.  If there are any errors as defined by
> > (1) to (3) in any component that makes up the schema (possibly made
> > from multiple schema documents), then the schema has an error and
> > considered useless.  If there was no error, then we could say the
> > schema is "complete" if it contains no references to unresolved
> > components or "partial" if it does contain such references.
> >
> > Okay?
>
> Yes.
>
> > I must admit I don't actually like the names "partial" and
> > "complete" because "partial" is already used ( for the same idea )
> > in the [ validation attempted ] assessment outcome of an element
> > information item.
>
> Good point -- I used it because you suggested it!  Other suggestions?

Sorry, yes I did suggest it.  I was confused with the separation of schema error
checking with instance validation.  How about "complete" and "limited"?

> <snip>
> > Q. For the purposes of validation of an instance against an XML
> > Schema ( being the set of components "required"), does each instance
> > have its own XML Schema?
>
> > A1. An instance DOES NOT HAVE an XML Schema.  An instance document uses a subset
> > of components from one or more XML Schemas
>
> Not how I would put it.
>
> > A2. An instance HAS an XML Schema for validation, that is made up of the
> > components, from one or more schema documents, which are present in that
> > instance.
>
> s/present in/required for/
>
> > Ie consider a very small schema document:
> > <schema>
> >     <element name = "A" />
> >     <element name = "B" />
> > </schema>
> > and we are validating an instance document with just one element information
> > item:
> > <A>
> >
> > In validating the instance, is the set of schema components that makes up the
> > XML Schema we are validating against
> > A1{ <element name = "A"/>, <element name = "B"/> }
> >        OR
> > A2{ <element name = "A"/> }
>
> In terms of what is present in the PSVI, the spec. allows either.  A2
> is the minimum.

As the spec allows either, can we expect warnings (but not errors) for components that
contain an error but are not used in the instance validated ( these components are the
ones that still appear in a schema document shared by error free components being used
)?
Note:  by "contain an error" in this question is in respect to errors _not_ in the
Schema Representation Constraint & wrt Schema for Schema.
For example, XSV currently does not (but should it?) give a warning when an instance
document contains <A> but not <B> with the following schema (note the
final="extension"):

 <element name="A" type="X"/>
 <element name="B" type="Y"/>

 <complexType name="X" final="extension">    <!-- Note final extension -->
    <sequence>
      <element name="C"/>
    </sequence>
 </complexType>

 <complexType name="Y">
    <complexContent>
       <extension base="X">     <!-- Note trying to extend X -->
          <sequence>
             <element name="D"/>
          </sequence>
       </extension>
    </complexContent>
 </complexType>

>
> > In the case of A2, it only requires the <element name = "A" />
> > component and so the XML Schema that must be checked for errors is
> > only that component.
>
> Ah, now I see where you're going. . .
>
> > However, I think it is A1, where now the XML Schema that must be checked for
> > errors includes <element name="B"/> even though the instance does not use it.
> > Assuming this leads to another question:
>
> The schema document as a whole has constraints on it independent of it
> use in a particular validation episode.  <snip>


What are these independent constraints?  In reference to a previous post by you (ht),
is it (1) and (2)?

>
>   1) Any schema documents involved must be schema-valid wrt the schema
>      for schemas;
>   2) They must satisfy the additional Schema Representation
>      Constraints;
>   3) The schema they correspond to must satisfy the Constraints on
>      Schemas.
>
> Failure to satisfy these conditions is an error, and processing with
> that schema should stop (except to provide additional feedback on
> other errors).

In reference to the specs, are these independent constraints the "Schema
Representation Constraints" (which I thought included schema valid wrt the schema for
schemas)?  And thus all the other dependent constraints, that concern errors in the
schema, ie "Constraint on Schemas" and "Schema Information Set Contribution" can only
be checked during an instance validation - as you don't know which components will be
used until then?

Thank for your patience,
mick.

Received on Monday, 11 December 2000 01:19:39 UTC