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

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 UTC