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

schemaLocation in instance documents - how many hints?

From: <Simon.Cox@csiro.au>
Date: Mon, 14 Jan 2002 15:22:50 +0800
Message-ID: <116D27C8E12BD411B3AB00B0D022B0B8AF0877@yate.wa.csiro.au>
To: xmlschema-dev@w3.org
In an /instance document/, is it good practice to have 
a schemaLocation hint for every namespace used therein?  

Or if one schema document <imports> documents which 
(ultimately) describe all the other necessary namespaces, 
is it sufficient to only provide the schemaLocation hint 
for the ultimate schema document?

_____
Simon.Cox@csiro.au  CSIRO Exploration & Mining
26 Dick Perry Avenue, Kensington WA 6151
PO Box 1130, Bentley WA 6102  AUSTRALIA
T: +61 (8) 6436 8639  F: +61 (8) 6436 8555  C: +61 (4) 0330 2672
http://www.csiro.au/page.asp?type=resume&id=CoxSimon

> -----Original Message-----
> From: ht@cogsci.ed.ac.uk [mailto:ht@cogsci.ed.ac.uk]
> Sent: Thursday, 10 January 2002 5:58 PM
> To: Simon.Cox@csiro.au
> Cc: xmlschema-dev@w3.org
> Subject: Re: Multiple <import> into same namespace?
> 
> 
> Simon.Cox@csiro.au writes:
> 
> > A schema-factoring question.  
> > 
> > Is it OK to have more than one <import > with 
> > the same value for the namespace, but different 
> > values of the schemaLocation?  
> > 
> > The behaviour of processors in repsonse 
> > to schemaLocation hints is not well defined.   
> > So how should one to respond to being told to 
> > look in two places for components in a single namespace?    
> > I'd like it to construct a union of the components.  
> > Is this a reasonable assumption?
> 
> XSV will ignore all xs:imports with the same namespace after the
> first successful one, as the REC allows it to.
> 
> The safe way to do what you want is to define a stub schema document
> in the imported namespace which consists of two (or more) xs:includes
> of the documents you want, and then use _that_ schema doc as the
> schemaLoc of a single xs:import.
> 
> 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, 14 January 2002 02:30:12 GMT

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