/** * Re-configures pipeline by removing the DTD validator if no DTD grammar exists. If no * validator exists in the pipeline or there is no DTD grammar, namespace binding is performed * by the scanner in the enclosing class. */ private void reconfigurePipeline() { if (fDTDValidator == null) { fBindNamespaces = true; } else if (!fDTDValidator.hasGrammar()) { fBindNamespaces = true; fPerformValidation = fDTDValidator.validate(); // re-configure pipeline XMLDocumentSource source = fDTDValidator.getDocumentSource(); XMLDocumentHandler handler = fDTDValidator.getDocumentHandler(); source.setDocumentHandler(handler); if (handler != null) handler.setDocumentSource(source); fDTDValidator.setDocumentSource(null); fDTDValidator.setDocumentHandler(null); } } // reconfigurePipeline()
protected void configureXML11Pipeline() { super.configureXML11Pipeline(); // configure XML 1.1. DTD pipeline fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor); fXML11DTDProcessor.setDTDSource(fXML11DTDScanner); fDTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fXML11DTDProcessor); fXIncludeHandler.setDTDHandler(fXPointerHandler); fXPointerHandler.setDTDSource(fXIncludeHandler); fXPointerHandler.setDTDHandler(fDTDHandler); if (fDTDHandler != null) { fDTDHandler.setDTDSource(fXPointerHandler); } // configure XML document pipeline: insert after DTDValidator and // before XML Schema validator XMLDocumentSource prev = null; if (fFeatures.get(XMLSCHEMA_VALIDATION) == Boolean.TRUE) { // we don't have to worry about fSchemaValidator being null, since // super.configurePipeline() instantiated it if the feature was set prev = fSchemaValidator.getDocumentSource(); } // Otherwise, insert after the last component in the pipeline else { prev = fLastComponent; fLastComponent = fXPointerHandler; } XMLDocumentHandler next = prev.getDocumentHandler(); prev.setDocumentHandler(fXIncludeHandler); fXIncludeHandler.setDocumentSource(prev); if (next != null) { fXIncludeHandler.setDocumentHandler(next); next.setDocumentSource(fXIncludeHandler); } fXIncludeHandler.setDocumentHandler(fXPointerHandler); fXPointerHandler.setDocumentSource(fXIncludeHandler); } // configureXML11Pipeline()
public void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException { next.xmlDecl(version, encoding, standalone, augs); }
public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException { next.ignorableWhitespace(text, augs); }
public void startGeneralEntity( String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException { next.startGeneralEntity(name, identifier, encoding, augs); }
public void textDecl(String version, String encoding, Augmentations augs) throws XNIException { next.textDecl(version, encoding, augs); }
public void startDocument( XMLLocator locator, String encoding, NamespaceContext namespaceContext, Augmentations augs) throws XNIException { next.startDocument(locator, encoding, namespaceContext, augs); }
public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException { next.startElement(element, attributes, augs); }
public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException { next.processingInstruction(target, data, augs); }
public void startCDATA(Augmentations augs) throws XNIException { next.startCDATA(augs); }
public void endGeneralEntity(String name, Augmentations augs) throws XNIException { next.endGeneralEntity(name, augs); }
public void characters(XMLString text, Augmentations augs) throws XNIException { next.characters(text, augs); }
public void endElement(QName element, Augmentations augs) throws XNIException { next.endElement(element, augs); }
public void endDocument(Augmentations augs) throws XNIException { next.endDocument(augs); }
public void endCDATA(Augmentations augs) throws XNIException { next.endCDATA(augs); }
public void doctypeDecl(String rootElement, String publicId, String systemId, Augmentations augs) throws XNIException { next.doctypeDecl(rootElement, publicId, systemId, augs); }
public void comment(XMLString text, Augmentations augs) throws XNIException { next.comment(text, augs); }