W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2003

Re: Must the content of SchemaLocation be a resorvable URL?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: Tue, 15 Jul 2003 15:07:46 +0100
To: "Noga Atsil" <Noga.Atsil@smarteam.com>
Cc: xmlschema-dev@w3.org, www-xml-schema-comments@w3.org
Message-ID: <f5bwuejlw7h.fsf@erasmus.inf.ed.ac.uk>

"Noga Atsil" <Noga.Atsil@smarteam.com> writes:

> ht,
>
> Thanks a lot for your respone.
>
> I understand by your answer that relative URLs are OK, but in your sample - should "my.xsd" really exist under "subdir"?
>
> Should "subdir" exist under current URL? 
>
> Some parsers require that there will be an "xsi:schemaLocation"
> attribute in the instance file for validation needs, but I can later
> use a URL resolver to set another location to the schema. This
> behavior allows me to put as value of "xsi:schemaLocation" any URL
> string I want, such as the schema name, without really giving any
> hint to its actual location.
>
> But is it allowed according to XML Schema specification?
>
> The specification mentions it is an optional attribute, and that its
> content should be a URL, but it doesn't say whether or not this URL
> should be resorvable (meaning that if I look for the schema under
> that location - I must find it).

With respect to the schemaLocation attribute of import, he REC says
"It is not an error for the application schema reference strategy to
fail."  It says something similar for the schemaLocation attribute of
include and redefine.  It _doesn't_ say this wrt xsi:schemaLocation,
but I believe it is reasonable to carry the above over to this case.  

However, in the absence of anything definitive in the REC, the
application you describe is within its rights, although I think it's
being unnecessarily unhelpful.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                      Half-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/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Tuesday, 15 July 2003 10:07:53 GMT

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