Re: Multiple schemas

>> Is it possible to construct an xml document such that it somehow includes
both possible locations for the test.xsd file?

schemaLocations are a hint in <xsd:import> statements from other schemas, 
and in xsi:schemaLocation attributes in instances.  Even if you could did 
both, processors would have considerable lattitude in whether to go after 
either, and I suspect few processors would do what you want.

Rather than trying to put both pointers in the instance, it might make 
more sense to get yourself a schema processor that allows you to specify 
the schema document location on the command line or through an API.  You 
can then invoke the processor on machine A with a command line argument of 
http://webserver1/test.xsd and on machine B http://webserver2/test.xsd.  One of the reasons that the schema recommendation allows lattitude in 
locating schemas is that there are so many important use cases, and if we 
baked in just one or two as mandatory, we would be eliminating the ability 
of conforming processors to support others, or else we might be forcing 
processors designed for your use case to carry never-used code to 
implement other idioms merely to claim conformance.  I don't like to have to write, debug and 
document network access code that will never be used.  Hope this helps.

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------








Graeme English <graeme.english@teleca.com>
Sent by: xmlschema-dev-request@w3.org
04/08/2004 10:38 AM
Please respond to graeme.english

 
        To:     "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        Multiple schemas



Hi,

I need to develop a schema for use at two different sites. The schema 
would
reside on a different internal  web server at each site (the servers can't
see each other) say
http://webserver1/test.xsd and
http://webserver2/test.xsd

(it can't be on a public server for various reasons, and having it locally
might present maintenance problems)

There will be several people involved in writing xml documents based on 
the
test.xsd (which is the same file at both ends). These files will be
trasferred back and forward between sites.

Is it possible to construct an xml document such that it somehow includes
both possible locations for the test.xsd file? I don't want to have to
modify the xml files each time there are transferred from site to site.

Thanks for any help

Graeme


********************************************
Any opinions expressed in this email are those of the individual and not
necessarily the Company. This email and any files transmitted with it,
including replies and forwarded copies (which may contain alterations)
subsequently transmitted from the company, are confidential and solely
for the use of the intended recipient. 

If you are not the intended recipient or the person responsible for
delivering to the intended recipient, be advised that you have received
this email in error and that any use is strictly prohibited.

If you have received this email in error please notify the IT Dept. via
email to IT.Helpdesk@Teleca.com, including a copy of the message. Please
then delete this email and destroy any copies of it.
*********************************************

Received on Thursday, 8 April 2004 10:57:56 UTC