Hi Matthew, Xerces 2.6.0 only had experimental support for DOM Level 3 which was only exposed through a special beta package (i.e. beta-dom3-Xerces-J-bin.2.6.0.zip) which you had to download separately. You need at least Xerces 2.7.0 if you want something fully functional. I would suggest using the latest release (2.9.1) as we've fixed many bugs related to DOM Level 3 and schema validation in the last few years which you might encounter in the older releases.
Thanks. Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] KWyjibo <[EMAIL PROTECTED]> wrote on 04/22/2008 11:47:20 AM: > Hi there, > > i've been trying to validate an existing Document object against an external > schema, but I always end up in an java.lang.AbstractMethodError when trying > to call the getDomConfig() method. > > The function looks like this: > > public static void validateDocument(Document inputDocument, boolean > validating, String schema) throws SAXParseException { > > DOMConfiguration config = inputDocument.getDomConfig(); > config.setParameter("check-character-normalization", true); > config.setParameter("error-handler", new XMLErrorHandler()); > config.setParameter("normalize-characters", true); > > if (validating == true) { > config.setParameter("schema-type", > "http://www.w3.org/2001/XMLSchema-instance"); > config.setParameter("schema-location", schema); > config.setParameter("validate", true); > } > > inputDocument.normalizeDocument(); > > } > > The Java output: > > Exception in thread "main" java.lang.AbstractMethodError: > org.apache.xerces.dom.DeferredDocumentImpl.getDomConfig() > Lorg/w3c/dom/DOMConfiguration; > at game.XMLManager.validateDocument(XMLManager.java:85) > at game.XMLManager.main(XMLManager.java:116) > > I know that this error occurs, when calling an abstract method. But I can't > imagine how I should get around this. > > I know the Xerces api examples, but they don't really help, because the > Document is built from an URI using a LSParser Object. > > By the way, I'm using Xerces 2.6.0. > > Greetings, > > Matthew > -- > View this message in context: http://www.nabble.com/Validating-an- > existing-DOM-Tree-tp16824760p16824760.html > Sent from the Xerces - J - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > 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]