W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2000

Proposal: targetLocation attribute for schema element

From: Curt Arnold <carnold@houston.rr.com>
Date: Wed, 26 Jan 2000 23:42:15 -0600
Message-ID: <007501bf6889$446f0d00$ca6b1b18@houston.rr.com>
To: <www-xml-schema-comments@w3.org>
I think that a optional targetLocation attribute (type uris or uri) for the
schema element that indicates the intended publication location(s) of a
schema would be useful for applications that cache or are deployed with
local schema resources.

For example, a server application is deployed with a local directory with
schemas that are anticipated to be referenced in incoming documents.  The
application preferentially wants to use a local copy of a schema if
available.  Multiple schemas are published for the same namespace
(corresponding to different versions of some software package or different
levels of capabilities such as transitional HTML vs the other flavors).

The server gets the following document:

<sample xmlns="http://www.mycomp.com/namespaces/sample"

xsi:schemaLocation="http://www.mycomp.com/schemas/sample_2000-01-01_full.xsd
">
        <HiMom/>
</sample>


http://www.mycomp.com/schemas/sample_2000-01-01_full.xsd looks like:

<schema targetNamespace="http://www.mycomp.com/namespaces/sample">
        <element name="HelloWorld"/>
        <element name="HiMom"/>
</schema>

In the application's cache is another schema for the same namespace (an
earlier version or subset) (shown with the proposed targetLocation
attribute)

<schema targetNamespace="http://www.mycomp.com/namespaces/sample"

targetLocation="http://www.mycomp.com/schemas/2000-01-25_minimal.xsd">
        <element name="HelloWorld"/>
</schema>

With the target location attribute, the application could determine that the
cached schema was inappropriate for this document.  Without the target
location, the application might apply the minimal schema and incorrectly
identify the document as invalid.

The targetLocation would make no demands on any implementation, it just
provides an additional piece of information about the schema that can be
used by applications to match local resources with the schema location.
Received on Thursday, 27 January 2000 00:48:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:46 GMT