W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2009

Re: Including schema with target namespace from schema with no target namespace

From: C. M. Sperberg-McQueen <cmsmcq@blackmesatech.com>
Date: Wed, 18 Feb 2009 19:46:46 -0700
Cc: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, xmlschema-dev@w3.org
Message-Id: <CA7969E8-C9FD-4722-A4ED-CD647A74D5E3@blackmesatech.com>
To: bkline@rksystems.com

On 10 Feb 2009, at 07:03 , Bob Kline wrote:

>
> Tobias Koenig wrote:
>> If the target namespace of the 'to be included' schema differs from  
>> the
>> target namespace of the including schema, you have to use <import>  
>> instead of <include>.
>>
>
> Ah, yes.  I missed that.  Thanks very much.

Or, even simpler, just give the schema validator the names of both
schema documents to load, at validation (or schema-compile) time.

For xmllint, for example, you might say

   xmllint --schema main.xsd --schema cdr.xsd instance.xml

For Saxon 9 SA,

   java -cp ... com.saxonica.Validate -s:instance.xml - 
xsd:main.xsd;cdr.xsd

For Xerces-J,

   java -cp ... jaxp.SourceValidator -i instance.xml -a main.xsd cdr.xsd

and so on.  The only XSD validator I know of that doesn't support
the specification of multiple schema documents on the command line is
MSV.

Michael Sperberg-McQueen


-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************
Received on Thursday, 19 February 2009 02:47:25 GMT

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