W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

Re: FW: User issues with Namespaces in Schema -- {form} qualified vs. unqualified, was [RE: Getting acquainted with schema]

From: David Ezell <David_E3@Verifone.Com>
Date: Sat, 12 Jan 2002 18:04:52 -0500
Message-ID: <472E220BA79DD11186340060B06B38D905BD86AF@TPANTMAIL1.verifone.com>
To: "'Jeni Tennison'" <jeni@jenitennison.com>
Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>, "'w3c-xml-schema-ig@w3.org'" <w3c-xml-schema-ig@w3.org>
On Sat 1/12/2002 5:27 PM Jeni Tennison wrote:

>You are right that the only time you explicitly tell a validator to do
>a lax validation of an element is through the any particle. However, I
>believe that a validator will perform lax validation in other
>situations (and in particular this one, where the document element
>does not have an element declaration). 

I won't argue that that's not true, only that lax validation was not the
reason that my parser validated the test document (this specific case).  
As I mentioned, my parser would not accept undeclared elements,
in this case elements not declared in the example schema, so it was 
definitely not lax validating.

You are correct that the rec allows all sorts of inventiveness on the part
of schema aware document validators -- it's that way on purpose.

>Heh. Actually, I can't find anything in the XML Schema Structure Rec
>that explicitly says that the xsi:noNamespaceSchemaLocation attribute
>has to point to a schema with no target namespace! (It's implied, but
>there aren't any of the usual logical rules about it.) So probably
>it's perfectly valid for a schema validator to just pick up on
>whatever schemas it can locate through whatever attributes it can find
>and create something from that... which could explain why you found
>that it was validating those elements.

I think the rec [1] is clear on this subject...

<quote>
4.3.2 How schema definitions are located on the Web

...

3. On the other hand, in case a document author (human or not) 
created a document with a particular schema in view, and 
warrants that some or all of the document is conforms to 
that schema, the schemaLocation and noNamespaceSchemaLocation 
[attributes] (in the XML Schema instance namespace, that is, 
http://www.w3.org/2001/XMLSchema-instance) (hereafter 
xsi:schemaLocation and xsi:noNamespaceSchemaLocation) are 
provided. The first records the author's warrant with pairs 
of URI references (one for the namespace name, and one for a 
hint as to the location of a schema document defining names 
for that namespace name). The second similarly provides a 
URI reference as a hint as to the location of a schema 
document with no targetNamespace [attribute].
</quote> [emphasis mine]

So I would say the behavior of my parser is not 100% conforming,
but not necessarily harmful, either (actually kind of helpful).

Kind regards,
David

[1] http://www.w3.org/TR/xmlschema-1/
Received on Saturday, 12 January 2002 18:04:46 GMT

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