W3C home > Mailing lists > Public > xmlschema-dev@w3.org > December 2000

Re: Schema validation terminology

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 08 Dec 2000 08:48:34 +0000
To: Michael Anderson <michael@research.canon.com.au>
Cc: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <f5blmtrxpr1.fsf@cogsci.ed.ac.uk>
Michael Anderson <michael@research.canon.com.au> writes:

> "Henry S. Thompson" wrote:
> >
> > Let's be really careful about terminology: schema _documents_ are
> > distinct from schemas.  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?


> 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?
> Now on to other issues raised, ht mentioned:
> > < snip > ......in any given validation
> > episode there is some schema == some set of components, probably
> > derived from one or more schema documents ......
> >
> In respect to this "validation episode", I am unsure what set of components
> constitute an XML Schema when validating an instance document.

Any set of components which satisfy the constraints is a schema.

> 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.

> 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.  We could in principle have
written the spec. otherwise, but we didn't.

> Q. What determines the boundaries of an XML Schema?
> A1.Given a schema document, all of its defined, included and referenced
> components (possibly in other schema documents)

Pretty much, yes, but you left out imported.  I would have said 'given
a set of schema documents, all the components defined, declared,
imported, included or redefined...'

> A2. One namespace corresponds to one XML Schema.

Not at all -- this would rule out the use of 'import'.

> In this case I think it is A1, which then leads to yet another question
> Q. Can the boundary of an XML Schema cross a namespace (ignoring the
> case when included schema documents that have NoTargetNamespace are
> converted to have the same namespace as the including schema
> document)?

I find the 'cross the boundary' terminology odd, but yes, see above.

> A1. Yes, imported components are brought into the boundary of the XML Schema.


> A2. No, imported components remain outside the boundary of the XML Schema.


> In this case I think it is A2, which then leads to my final question
> Q. Can we import a component (C) from a schema document that defines
> / declares other components that do not conform to the Constraints
> on Schemas, Validity Rules and Schema Information Set Contributions?
> ( They will of course need to conform to the XML Schema
> Representation Constraints if they appear in an XML document.)

No, not at all.

  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Friday, 8 December 2000 03:48:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:48 UTC