Hi Boris,
Before trying to create an in-memory schema that includes the others I
wanted to try something simpler and ran into the following problem when
using loadGrammar:
I have a schema with targetNamespace="foo" that defines an element Person.
I have an XML that has a reference to that schema using xmlns="foo".
The XML looks like this:
<xml header here>
<Person xmlns="foo">
<FirstName...>
</Person
In my code I use following line: parser->loadGrammar("the path to the
schema", 1, false);
When parsing the XML I get an error message saying that Person is an unknown
element.
To my understanding this happens because: I didn't cache the schema. When
using loadGrammar with the cache flag set to true and calling
parser->useCachedSchemas... the XML file passes OK.
But caching the schemas could be a problem to me. Are the cached schemas
saved there untill the process dies? Or is the cache cleared when the parser
object dies?
Second thing I noticed is that when setting
parser->setExternalSchemaLocations this doesn't work at all. Even when
caching the schema.
Boris Kolpackov-2 wrote:
>
> Hi Daniel,
>
> Daniel Jackson <[EMAIL PROTECTED]> writes:
>
>> 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?
>
> The experimental status was removed for loadGrammar in the 3.0.0 code
> base so I wouldn't worry about this.
>
> 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-tp15532404p15661415.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]