[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Comments on Section 6.3/(Locating Schema resources)

  • From: "Curt Arnold" <carnold@h...>
  • To: <www-xml-schema-comments@w...>
  • Date: Thu, 11 May 2000 01:19:19 -0500

public identifier schema
Section 6.3.2: Point 4

Having declarations of schemaLocations anywhere in the document having
document scope, of course, seriously complicates event-based validation.  It
would seem reasonable to require that schemaLocations appear before the need
for the corresponding schema information.

There would also be the need for some sort of statement when inconsistent
schemaLocations appear for the same namespace.  I would assume that the
first would take precedence.

==================

In general, I think locating schema resources has a couple of serious
deficiencies.

First, there is not a one-to-one correspondence between namespaces and
schemas.   For example, the XHTML namespace has three distinct DTD's
associated with it which are distinguished using public identifiers.  There
may also be successive versions of schemas for the same namespace.

Second, a single schema resource may contain many distinct(possibly tens if
not hundreds) namespaces through inclusions. I believe the typically usage
would be to have a single schema resource that would contain definitions for
all the expected namespaces and then, occassionally, one or more additional
schema resources for unanticipated namespaces.  Having to enumerate all the
namespaces that appear in a mega resource would get very long and prone to
error.

Third, there is not a conflict resolution mechanism when a namespace has
multiple schema locations are declared either implicitly (through an import
within a schema) or explicitly through a schemaLocation attribute.

Fourth, there is not a mechanism to identify a schema resource to be used to
validate an XML 1.0 (pre-namespace) compatible document.

It would seem the best approach would be to use public identifiers
(fortunately having a rebirth of interest on xml-dev) to explicitly identify
a specific schema resource instead of relying on a ambiguous combination of
namespace and namespaceLocation to resolve whether a particular cached
version of a schema is appropriate.

What I would suggest is that:

1. schema element have a targetPublicIdentifier attribute in addition to a
targetNamespace.
2. xsi:schemaPublic be a list of public identiers
3. xsi:schemaSystem be a list of URI's
4. xsi:defaultNamespace would identify the namespace to be used for
unqualified elements. (see note)
5. A publicIdentifier simple type be added to the built-in datatypes.
6. The use of a processing instruction as an alternative mechanism for
specifying schema resources for XML 1.0 compatible documents.  Since these
would not involve multiple namespaces or resources, I'd recommend something
like the following to appear before the document element:

<?xsi:schema defaultNamespace PUBLIC pubid sysid ?>
<?xsi:schema defaultNamespace SYSTEM sysid ?>

When xsi:schemaPublic and xsi:schemaSystem appear on the same element, there
must be a one to one correspondence between entries, so that if the second
public identifier cannot be resolved, the second URI could be used to
retrieve the resource.  I'm assuming that there can be an acceptible
mechanism for representing a null public identifier and a null URI.

When schema information appears for one namespace in multiple schema
resources, the first appearance would be used for validation.

Note on defaultNamespace:
A previous comment
(http://lists.w3.org/Archives/Public/www-xml-schema-comments/2000AprJun/0124
.html) discussed Section 3.4 on Undeclared target namespaces.  The current
treatment would require one schema for XHTML, for example, for documents
where the namespace was declared and another schema for XHTML where the
namespace was not declared.  To me, it seems that the creation of a schema
implies that you are defining elements that are in a conceptual namespace
and that the additional burden of picking out a URI for this namespace is
minimal.  If a instance document doesn't want to use an xmlns attribute,
that is a usage issue that could be addressed by a xsi:defaultNamespace
attribute (or schema PI) that provides a weaker binding of unqualified names
to a namespace that is only used for schema validation.





***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.