Hello,
I am trying to use the DomBuilder function loadGrammar that takes a DomInputSource to cause my parser to validate using an "in-memory" schema that we have loaded from a VC++ 2003 MFC resource. We have the grammar in a character buffer and pass it into a MemBuffInputSource which is then Wrapped to be a DomInputSource. I then call loadGrammar on my DomBuilder. Prior to parsing, I also set the following features on my DomBuilder:
fgXercesSchema, true
fgXercesSchemaFullChecking, true
fgDOMWhitespaceInElementContent, false
fgXercesUseCachedGrammarInParse, true
fgXercesCacheGrammarFromParse, true
fgXercesUseCachedGrammarInParse, true
fgXercesSchemaFullChecking, true
fgDOMWhitespaceInElementContent, false
fgXercesUseCachedGrammarInParse, true
fgXercesCacheGrammarFromParse, true
fgXercesUseCachedGrammarInParse, true
This only seems to recognize my Grammar and do the validation if I also set the feature
"fgDOMValidation, true" but not if I set the feature "fgDOMValidateIfSchema, true".
The validation works correctly with
"fgDOMValidateIfSchema, true" if I load my grammar from a local file path, but not if I use this mem buffer technique. Am I doing something incorrectly? Do I need to set "fgDOMValidation, true" to use loadGrammar? It appears that if I don't, the value fValidate gets set to false in the scanReset function and never gets set back to true in the case where I have "loaded" my grammar. However, it will get set back to true in parseSchemaLocation if I am loading my grammar from a local file.
I hope someone can clear this up for me.
Thanks,
Bryan
Bryan
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!