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

Re: Schema validation terminology

From: Michael Anderson <michael@research.canon.com.au>
Date: Fri, 08 Dec 2000 19:11:40 +1100
Message-ID: <3A3097BC.C12F27D3@research.canon.com.au>
To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>, "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>

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

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.

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

Ie consider a very small schema document:
    <element name = "A" />
    <element name = "B" />
and we are validating an instance document with just one element information

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"/> }
A2{ <element name = "A"/> }

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.

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:

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)
A2. One namespace corresponds to one XML Schema.

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)?
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
A1. Just need to check for errors in the component (C) and any components it
A2. all the components ( and any components they require) that appear in the
schema document that the component (C) resides in need to be checked for errors
A3. all the components that appear in the XML Schema (as defined in the above
question) that the component (C) resides in need to be checked for errors.

> <snip>

> Hope this helps.
> ht

Yes it does, much appreciated.

Received on Friday, 8 December 2000 03:11:51 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:19 GMT