/** * Sets the particular property in the underlying implementation of * org.xml.sax.XMLReader. */ public void setProperty(String name, Object value) throws SAXNotRecognizedException, SAXNotSupportedException { xmlReader.setProperty(name, value); }
public void characters(XMLString text, Augmentations augs) throws XNIException { // since a validator may change the contents, // let this one go through a validator fCurrentAug = augs; xni2sax.characters(text,null); }
public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException { // since a validator may change the contents, // let this one go through a validator fCurrentAug = augs; xni2sax.ignorableWhitespace(text,null); }
public void reset() { try { /** Restore initial values of features and properties. **/ xmlReader.restoreInitState(); } catch (SAXException exc) { // This should never happen. We only store recognized // features and properties in the hash maps. For now // just ignore it. } /** Restore various handlers. **/ xmlReader.setContentHandler(null); xmlReader.setDTDHandler(null); if (xmlReader.getErrorHandler() != fInitErrorHandler) { xmlReader.setErrorHandler(fInitErrorHandler); } if (xmlReader.getEntityResolver() != fInitEntityResolver) { xmlReader.setEntityResolver(fInitEntityResolver); } }
/** * <p> * Get the 'correct' implementation of a JAXP <code>SAXParserFactory</code>; this is * intended to ensure that local implementations (e.g., Crimson) don't sneak into * the mix. * </p> * @return the Xerces-specific implementaiton */ public static SAXParserFactory getSAXParserFactory() { return new SAXParserFactoryImpl(); }
public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { startElement(element,attributes,augs); endElement(element,augs); }
public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { startElement(element,attributes,augs); endElement(element,augs); }
public void parse(InputSource inputSource) throws SAXException, IOException { if (fSAXParser != null && fSAXParser.fSchemaValidator != null) { if (fSAXParser.fSchemaValidationManager != null) { fSAXParser.fSchemaValidationManager.reset(); fSAXParser.fUnparsedEntityHandler.reset(); } resetSchemaValidator(); } super.parse(inputSource); }
/** * <p> * Get the 'correct' implementation of a JAXP <code>DocumentBuilderFactory</code>; * this is intended to ensure that local implementations (e.g., Crimson) don't * sneak into the mix. * </p> * @return the Xerces-specific implementation */ public static DocumentBuilderFactory getDocumentBuilderFactory() { return new DocumentBuilderFactoryImpl(); }
/** * returns the particular property requested for in the underlying * implementation of org.xml.sax.XMLReader. */ public Object getProperty(String name) throws SAXNotRecognizedException, SAXNotSupportedException { return xmlReader.getProperty(name); }
/** * Gets the XInclude processing mode for this parser * @return the state of XInclude processing mode */ public boolean isXIncludeAware() { try { return xmlReader.getFeature(XINCLUDE_FEATURE); } catch (SAXException exc) { return false; } }
public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { fCurrentAttributes = attributes; fCurrentAug = augs; xni2sax.startElement(element,attributes,null); fCurrentAttributes = null; // mostly to make it easy to find any bug. }
public void endElement(QName element, Augmentations augs) throws XNIException { fCurrentAug = augs; xni2sax.endElement(element,null); }
public void startElement(String uri, String localName, String qname, Attributes atts) throws SAXException { try { updateAttributes(atts); handler().startElement(toQName(uri,localName,qname), fCurrentAttributes, elementAug()); } catch( XNIException e ) { throw toSAXException(e); } }
public void endElement(String uri, String localName, String qname) throws SAXException { try { handler().endElement(toQName(uri,localName,qname),aug()); } catch( XNIException e ) { throw toSAXException(e); } }
private Augmentations elementAug() { Augmentations aug = aug(); /** aug.putItem(Constants.TYPEINFO,typeInfoProvider.getElementTypeInfo()); **/ return aug; }
/** * Get the handler to which we should send events. */ private XMLDocumentHandler handler() { return JAXPValidatorComponent.this.getDocumentHandler(); }
public ConfigParserContentHandler() throws Exception { DocumentBuilderFactory dbf = DocumentBuilderFactoryImpl.newInstance(); // Xerces db = dbf.newDocumentBuilder(); }
public void parse(String systemId) throws SAXException, IOException { if (fSAXParser != null && fSAXParser.fSchemaValidator != null) { if (fSAXParser.fSchemaValidationManager != null) { fSAXParser.fSchemaValidationManager.reset(); fSAXParser.fUnparsedEntityHandler.reset(); } resetSchemaValidator(); } super.parse(systemId); }
protected DocumentBuilderFactory createDocumentBuilderFactory(boolean resolveEntities, boolean validate) { DocumentBuilderFactory dbFactory = new DocumentBuilderFactoryImpl(); dbFactory.setNamespaceAware(true); dbFactory.setExpandEntityReferences(resolveEntities); dbFactory.setValidating(validate); return dbFactory; }