I'm running into similar problems. Has anybody out there been successfull with schema validation in the DOMParser class? The current error that I'm getting is:
Warning at (file , line 0, char 0): An exception occurred! Type:RuntimeException, Message:Warning: The primary document entity could not be opened. Id=https://ipaddress/ifx/schemas/SummitSchema.xsd https://ipaddress/ifx/schemas/2001_IFX110.xsd The two uri's listed above are accessable since I am able to view them with a browser. I've even tried by placing the schemas in my local development directory where the executable is. I keep getting the same error message. Any clue on what this error message really means? Any help would be greatly appreciated. Thanks. Carlo [EMAIL PROTECTED] -----Original Message----- From: Urbons, Steffen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 2:29 AM To: [EMAIL PROTECTED] Subject: Validation against XML schema without internet connection Hi, I'm using Xerces C++ 1.7 and quite new to XML. I'd like to validate my XML against a XML Schema when parsing, but it doesn't work. The schema or referenced resources seem not to be found and when I enforce validating by setting m_parser->setValidationScheme(DOMParser::Val_Always); I get a lot of parsing erros reported by the ErrorHandler I've defined. Parsing without validating works fine. My XSD Schema is stored locally and is specified in the document instance of the XML. In every XML and XSD file I found, resources in the internet are referenced. What if my computer cannot access the internet. Do I have to download several resources and store them locally? I have found this question in newgroups but nobody has given an answer. Here some parts of my code: // Init the DOM parser. m_parser->setValidationScheme(DOMParser::Val_Auto); m_parser->setDoNamespaces(true); m_parser->setDoSchema( true ); m_parser->setValidationSchemaFullChecking(true); try { // Parse input buffer m_parser->parse(*m_pInputSource); iErrorCount = m_parser->getErrorCount(); } catch (const XMLException& toCatch) { //... } catch (const DOM_DOMException& toCatch) { //... } catch(...) { //... } Thank's for any help, Steffen Urbons E-Mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
