Hi,
I have downloaded PAthan 2.0 and Xerces 2.6.
I am trying to add schema validation in Pathan
Examples under samples/basic/ by calling following
APIs:
I have a schema file data.xsd and I am calling
loadGrammer API to load the schema file as follows:
short grammarType = XERCES Grammar::SchemaGrammarType;
XERCES Grammar* grammer =
xmlParser->loadGrammar("data.xsd", grammarType, true);
I used xmlParser->setFeature API to set following
features to true:
XMLUni::fgDOMNamespaces
XMLUni::fgDOMValidation
XMLUni::fgXercesSchema
XMLUni::fgXercesSchemaFullChecking
the call to API
document = xmlParser->parseURI("data.xml");
seems to be returning document but when I evaluate
XPATH expression on it, I don't get any result and I
can get result of XPATH expresion if I turn off
XMLUni::fgDOMNamespaces.
I have validated data.xsd and data.xml with some tool
on the net and the files seems to be proper.
Any advise/suggestion on what I could be doing wrong.
In addition when I tried setting feature
"XMLUni::fgXercesValidationErrorAsFatal" to true, it
turns out the document->getDocumentElement returns
NULL.
Any help on this would be greatly appreciated.
Thanks
Kamal.
__________________________________
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
http://birthday.yahoo.com/netrospective/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]