"Elisha Berns" <[EMAIL PROTECTED]> writes: > But my question is, once again, assuming that you are only using Xerces, > what is the best and most thorough way to validate an XSD?
Alright, seeing that you are asking this 10th time I will take a shot. In my code I do basically the following: // Perform namespace processing. // parser->setFeature (XMLUni::fgDOMNamespaces, true); // Enable the parser's schema support. // parser->setFeature (XMLUni::fgXercesSchema, true); // Enable full schema constraint checking, including checking which // may be time-consuming or memory intensive. Currently, particle // unique attribution constraint checking and particle derivation // restriction checking are controlled by this option. // parser->setFeature (XMLUni::fgXercesSchemaFullChecking, true); // The parser will treat validation error as fatal and will exit. // parser->setFeature (XMLUni::fgXercesValidationErrorAsFatal, true); ErrorHandler eh; parser->setErrorHandler(&eh); parser->loadGrammar (uri, Grammar::SchemaGrammarType); parser->release(); It works pretty well for me so far. I.e., every time I mess up my schemas the above code catches it. hth, -boris --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
