Hello Boris,
I really liked your solution to my problem, it's quite elegant and will suit
my needs!

I peeked at the documentation of loadGrammar under Xerces 2.8 and it says
the function is experiential and is subject to change, should I be worried
about that?


Boris Kolpackov-2 wrote:
> 
> Hi Daniel,
> 
> Daniel Jackson <[EMAIL PROTECTED]> writes:
> 
>> I have schema A that includes schema B, both have a
>> targetNamespace="http://www.foo.com";.
>> I have a XML file that uses as his default namespace
>> "http://www.foo.com";,
>> meaning it's root element has a xmlns="http://www.foo.com";.
>>
>> When running Xerces C++ with schema validation I need to determine what
>> to
>> send the parser on it's setExternalSchemaLocation. Assuming I don't know
>> which schema is the "main" one (in my case it's A), should I send both A
>> and
>> B in the setExternalSchemaLocation? What's the way to handle this?
> 
> The value of the schema location property is a map of namespace-to-
> schema. Each entry specifies a schema for a particular namespace. As
> a result, you can only specify one schema for a distinct namespace.
> 
> If there is really no way to know which file is the "root schema",
> then the only way to overcome this is to create (perhaps at runtime)
> a schema that includes all the schema files for the same namespace.
> If you are using setExternalSchemaLocation then this file will have
> to be real. If, however, you use loadGrammar, you can create this
> schema in memory. The latter method is discussed here:
> 
> http://www.codesynthesis.com/pipermail/xsd-users/2007-December/001403.html
> 
> Boris
> 
> -- 
> Boris Kolpackov, Code Synthesis Tools
> Open source XML data binding for C++:  
> http://codesynthesis.com/products/xsd
> Mobile/embedded validating XML parsing:
> http://codesynthesis.com/products/xsde
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/setExternalSchemaLocation-and-xs%3Aimport-tp15532404p15641405.html
Sent from the Xerces - C - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to