public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException { if (fNeedPushNSContext) { fNamespaceContext.pushContext(); } fNeedPushNSContext = true; // Fill element QName fillQName(fElementQName, uri, localName, qName); // Fill XMLAttributes if (atts instanceof Attributes2) { fillXMLAttributes2((Attributes2) atts); } else { fillXMLAttributes(atts); } try { fSchemaValidator.startElement(fElementQName, fAttributes, null); } catch (XMLParseException e) { throw Util.toSAXParseException(e); } catch (XNIException e) { throw Util.toSAXException(e); } }
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { try { fTempString.setValues(ch, start, length); fSchemaValidator.ignorableWhitespace(fTempString, null); } catch (XMLParseException e) { throw Util.toSAXParseException(e); } catch (XNIException e) { throw Util.toSAXException(e); } }
public void endDocument() throws SAXException { fSAXLocatorWrapper.setLocator(null); try { fSchemaValidator.endDocument(null); } catch (XMLParseException e) { throw Util.toSAXParseException(e); } catch (XNIException e) { throw Util.toSAXException(e); } }
public void endElement(String uri, String localName, String qName) throws SAXException { fillQName(fElementQName, uri, localName, qName); try { fSchemaValidator.endElement(fElementQName, null); } catch (XMLParseException e) { throw Util.toSAXParseException(e); } catch (XNIException e) { throw Util.toSAXException(e); } finally { fNamespaceContext.popContext(); } }
public void startDocument() throws SAXException { fComponentManager.reset(); fSchemaValidator.setDocumentHandler(this); fValidationManager.setEntityState(this); fTypeInfoProvider.finishStartElement(); // cleans up TypeInfoProvider fNeedPushNSContext = true; if (fUnparsedEntities != null && !fUnparsedEntities.isEmpty()) { // should only clear this if the last document contained unparsed entities fUnparsedEntities.clear(); } fErrorReporter.setDocumentLocator(fSAXLocatorWrapper); try { fSchemaValidator.startDocument( fSAXLocatorWrapper, fSAXLocatorWrapper.getEncoding(), fNamespaceContext, null); } catch (XMLParseException e) { throw Util.toSAXParseException(e); } catch (XNIException e) { throw Util.toSAXException(e); } }