Hi Michael,
Why not have a look through the examples in the samples/dom package, perhaps particularly at DOMCount.java. These examples can use the DOMParser to successfully validate schemas, outputting errors as appropriate. Cheers, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 416-448-3519, T/L 778-3519 E-mail: [EMAIL PROTECTED] Michael Duffy <[EMAIL PROTECTED]> on 02/23/2001 03:25:46 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: RE: AW: Validation ? Ian: I turned on namespaces, but still no dice. The JAXP API, combined with an ErrorHandler, gets me the exception I expected when I passed a document that didn't conform to the schema. The same document passes quietly by the DOMParser using the same ErrorHandler. What else could I be missing? I've combed through the features and properties at xml.apache.org, but I haven't hit it yet. - MOD --- Ian Roberts <[EMAIL PROTECTED]> wrote: > On Thu, 22 Feb 2001, Michael Duffy wrote: > > > I've got a few features turned on: > > > > > parser.setFeature("http://xml.org/sax/features/validation", > > true); > > > > > parser.setFeature("http://apache.org/xml/features/validation/dynamic", > > true); > > > > > parser.setFeature("http://apache.org/xml/features/validation/schema", > > true); > > > > parser.setErrorHandler(new SchemaErrorHandler()); > > > > Any other thoughts would be appreciated. Thanks > for > > your help. - MOD > > You need the namespaces feature turned on as well > for validation to work. > > Ian > > -- > Ian Roberts, Software Engineer DecisionSoft > Ltd. > tel: +44-1865-203192 > http://www.decisionsoft.com > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]