W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2001

Re: Bug in XSV? ... reference without <import>

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 07 May 2001 13:16:54 +0100
To: "Roger L. Costello" <costello@mitre.org>
Cc: xmlschema-dev@w3.org
Message-ID: <f5belu1nykp.fsf@cogsci.ed.ac.uk>
"Roger L. Costello" <costello@mitre.org> writes:

> "Henry S. Thompson" wrote:
> >
> > They are right, XSV is wrong.  This is _not_ a "you can wait until
> > runtime" issue.  
> 
> In an instance document, schemaLocation is optional.  As Noah always
> reminds me, "schemaLocation is just a hint to a schema validator".  If
> schemaLocation is optional in the instance document, then it seems
> reasonable that an <import> element should be optional in a schema.  

These are completely different.  <import> _must_ supply a
_namespace_.  This is a cross check that you haven't just used
prefixes/namespaces indescriminately in your schema.  You of course
need not supply a 'schemaLocation' on your import, and no problem if
you don't.

> It's too bad that it is not a "wait till runtime" issue.  That
> capability would have provided a lot of power.  Without this capability
> there is no way to create an element with a simpleType (e.g., sensors)
> that can be extended by another schema - for example the boston_sensors
> are barometer, thermometer, and anenometer.  For the London weather
> station they need to extend the simpleType to include a hygrometer.  A
> "dangling type" provided an ideal mechanism for implementing this
> "replaceable simpleType".  I don't believe that that there is any way to
> implement this capability.  /Roger

Sure there is -- just <import> the namespace, with no
'schemaLocation'.  You've now issued a promise that at runtime someone
will supply types in that namespace (if indeed you use them), but that 
promise won't come due _until_ runtime.  No problem.

ht
-- 
  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 Monday, 7 May 2001 08:16:58 GMT

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