public void startDocument() throws SAXException { try { PropertyMapBuilder builder = new PropertyMapBuilder(sr.getProperties()); ValidateProperty.ERROR_HANDLER.put(builder, ceh); validator = sr.getMnsSchema().createValidator(builder.toPropertyMap()); } catch (IOException e) { throw new WrappedIOException(e); } catch (IncorrectSchemaException e) { throw new RuntimeException("internal error in RNG schema for MNS"); } setDelegate(validator.getContentHandler()); if (locator != null) super.setDocumentLocator(locator); super.startDocument(); }
Handler(SchemaReceiverImpl sr) { this.sr = sr; this.eh = ValidateProperty.ERROR_HANDLER.get(sr.getProperties()); this.ceh = new CountingErrorHandler(eh); }