Java Code Examples for com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler#setDocumentSource()
The following examples show how to use
com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler#setDocumentSource() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XML11NSDocumentScannerImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * 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); } }
Example 2
Source File: XMLNSDocumentScannerImpl.java From jdk1.8-source-analysis with Apache License 2.0 | 6 votes |
/** * 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() { //fDTDValidator will be null in Stax mode if (fNamespaces && fDTDValidator == null) { fBindNamespaces = true; } else if (fNamespaces && !fDTDValidator.hasGrammar() ) { fBindNamespaces = true; fPerformValidation = fDTDValidator.validate(); // re-configure pipeline by removing DTDValidator XMLDocumentSource source = fDTDValidator.getDocumentSource(); XMLDocumentHandler handler = fDTDValidator.getDocumentHandler(); source.setDocumentHandler(handler); if (handler != null) handler.setDocumentSource(source); fDTDValidator.setDocumentSource(null); fDTDValidator.setDocumentHandler(null); } }
Example 3
Source File: XMLNSDocumentScannerImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * 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() { //fDTDValidator will be null in Stax mode if (fNamespaces && fDTDValidator == null) { fBindNamespaces = true; } else if (fNamespaces && !fDTDValidator.hasGrammar() ) { fBindNamespaces = true; fPerformValidation = fDTDValidator.validate(); // re-configure pipeline by removing DTDValidator XMLDocumentSource source = fDTDValidator.getDocumentSource(); XMLDocumentHandler handler = fDTDValidator.getDocumentHandler(); source.setDocumentHandler(handler); if (handler != null) handler.setDocumentSource(source); fDTDValidator.setDocumentSource(null); fDTDValidator.setDocumentHandler(null); } }
Example 4
Source File: XML11NSDocumentScannerImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
/** * 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); } }
Example 5
Source File: XML11NSDocumentScannerImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * 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); } }
Example 6
Source File: XMLNSDocumentScannerImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * 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() { //fDTDValidator will be null in Stax mode if (fNamespaces && fDTDValidator == null) { fBindNamespaces = true; } else if (fNamespaces && !fDTDValidator.hasGrammar() ) { fBindNamespaces = true; fPerformValidation = fDTDValidator.validate(); // re-configure pipeline by removing DTDValidator XMLDocumentSource source = fDTDValidator.getDocumentSource(); XMLDocumentHandler handler = fDTDValidator.getDocumentHandler(); source.setDocumentHandler(handler); if (handler != null) handler.setDocumentSource(source); fDTDValidator.setDocumentSource(null); fDTDValidator.setDocumentHandler(null); } }
Example 7
Source File: XML11NSDocumentScannerImpl.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * 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); } }
Example 8
Source File: XIncludeParserConfiguration.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
protected void configureXML11Pipeline() { super.configureXML11Pipeline(); // configure XML 1.1. DTD pipeline fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor); fXML11DTDProcessor.setDTDSource(fXML11DTDScanner); fXML11DTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fXML11DTDProcessor); fXIncludeHandler.setDTDHandler(fDTDHandler); if (fDTDHandler != null) { fDTDHandler.setDTDSource(fXIncludeHandler); } // 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 = fXIncludeHandler; } XMLDocumentHandler next = prev.getDocumentHandler(); prev.setDocumentHandler(fXIncludeHandler); fXIncludeHandler.setDocumentSource(prev); if (next != null) { fXIncludeHandler.setDocumentHandler(next); next.setDocumentSource(fXIncludeHandler); } }
Example 9
Source File: XIncludeParserConfiguration.java From JDKSourceCode1.8 with MIT License | 5 votes |
protected void configureXML11Pipeline() { super.configureXML11Pipeline(); // configure XML 1.1. DTD pipeline fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor); fXML11DTDProcessor.setDTDSource(fXML11DTDScanner); fXML11DTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fXML11DTDProcessor); fXIncludeHandler.setDTDHandler(fDTDHandler); if (fDTDHandler != null) { fDTDHandler.setDTDSource(fXIncludeHandler); } // 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 = fXIncludeHandler; } XMLDocumentHandler next = prev.getDocumentHandler(); prev.setDocumentHandler(fXIncludeHandler); fXIncludeHandler.setDocumentSource(prev); if (next != null) { fXIncludeHandler.setDocumentHandler(next); next.setDocumentSource(fXIncludeHandler); } }
Example 10
Source File: XIncludeParserConfiguration.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
protected void configureXML11Pipeline() { super.configureXML11Pipeline(); // configure XML 1.1. DTD pipeline fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor); fXML11DTDProcessor.setDTDSource(fXML11DTDScanner); fXML11DTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fXML11DTDProcessor); fXIncludeHandler.setDTDHandler(fDTDHandler); if (fDTDHandler != null) { fDTDHandler.setDTDSource(fXIncludeHandler); } // 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 = fXIncludeHandler; } XMLDocumentHandler next = prev.getDocumentHandler(); prev.setDocumentHandler(fXIncludeHandler); fXIncludeHandler.setDocumentSource(prev); if (next != null) { fXIncludeHandler.setDocumentHandler(next); next.setDocumentSource(fXIncludeHandler); } }
Example 11
Source File: XIncludeParserConfiguration.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
protected void configureXML11Pipeline() { super.configureXML11Pipeline(); // configure XML 1.1. DTD pipeline fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor); fXML11DTDProcessor.setDTDSource(fXML11DTDScanner); fXML11DTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fXML11DTDProcessor); fXIncludeHandler.setDTDHandler(fDTDHandler); if (fDTDHandler != null) { fDTDHandler.setDTDSource(fXIncludeHandler); } // 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 = fXIncludeHandler; } XMLDocumentHandler next = prev.getDocumentHandler(); prev.setDocumentHandler(fXIncludeHandler); fXIncludeHandler.setDocumentSource(prev); if (next != null) { fXIncludeHandler.setDocumentHandler(next); next.setDocumentSource(fXIncludeHandler); } }
Example 12
Source File: XPointerParserConfiguration.java From JDKSourceCode1.8 with MIT License | 4 votes |
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); }
Example 13
Source File: XPointerParserConfiguration.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
/** Configures the pipeline. */ protected void configurePipeline() { super.configurePipeline(); //configure DTD pipeline fDTDScanner.setDTDHandler(fDTDProcessor); fDTDProcessor.setDTDSource(fDTDScanner); fDTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fDTDProcessor); 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); }
Example 14
Source File: XPointerParserConfiguration.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** Configures the pipeline. */ protected void configurePipeline() { super.configurePipeline(); //configure DTD pipeline fDTDScanner.setDTDHandler(fDTDProcessor); fDTDProcessor.setDTDSource(fDTDScanner); fDTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fDTDProcessor); 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); }
Example 15
Source File: XIncludeParserConfiguration.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** Configures the pipeline. */ protected void configurePipeline() { super.configurePipeline(); //configure DTD pipeline fDTDScanner.setDTDHandler(fDTDProcessor); fDTDProcessor.setDTDSource(fDTDScanner); fDTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fDTDProcessor); fXIncludeHandler.setDTDHandler(fDTDHandler); if (fDTDHandler != null) { fDTDHandler.setDTDSource(fXIncludeHandler); } // 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 = fXIncludeHandler; } if (prev != null) { XMLDocumentHandler next = prev.getDocumentHandler(); prev.setDocumentHandler(fXIncludeHandler); fXIncludeHandler.setDocumentSource(prev); if (next != null) { fXIncludeHandler.setDocumentHandler(next); next.setDocumentSource(fXIncludeHandler); } } else { setDocumentHandler(fXIncludeHandler); } }
Example 16
Source File: XIncludeParserConfiguration.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** Configures the pipeline. */ protected void configurePipeline() { super.configurePipeline(); //configure DTD pipeline fDTDScanner.setDTDHandler(fDTDProcessor); fDTDProcessor.setDTDSource(fDTDScanner); fDTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fDTDProcessor); fXIncludeHandler.setDTDHandler(fDTDHandler); if (fDTDHandler != null) { fDTDHandler.setDTDSource(fXIncludeHandler); } // 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 = fXIncludeHandler; } if (prev != null) { XMLDocumentHandler next = prev.getDocumentHandler(); prev.setDocumentHandler(fXIncludeHandler); fXIncludeHandler.setDocumentSource(prev); if (next != null) { fXIncludeHandler.setDocumentHandler(next); next.setDocumentSource(fXIncludeHandler); } } else { setDocumentHandler(fXIncludeHandler); } }
Example 17
Source File: XIncludeParserConfiguration.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** Configures the pipeline. */ protected void configurePipeline() { super.configurePipeline(); //configure DTD pipeline fDTDScanner.setDTDHandler(fDTDProcessor); fDTDProcessor.setDTDSource(fDTDScanner); fDTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fDTDProcessor); fXIncludeHandler.setDTDHandler(fDTDHandler); if (fDTDHandler != null) { fDTDHandler.setDTDSource(fXIncludeHandler); } // 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 = fXIncludeHandler; } if (prev != null) { XMLDocumentHandler next = prev.getDocumentHandler(); prev.setDocumentHandler(fXIncludeHandler); fXIncludeHandler.setDocumentSource(prev); if (next != null) { fXIncludeHandler.setDocumentHandler(next); next.setDocumentSource(fXIncludeHandler); } } else { setDocumentHandler(fXIncludeHandler); } }
Example 18
Source File: XPointerParserConfiguration.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
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); }
Example 19
Source File: XPointerParserConfiguration.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** Configures the pipeline. */ protected void configurePipeline() { super.configurePipeline(); //configure DTD pipeline fDTDScanner.setDTDHandler(fDTDProcessor); fDTDProcessor.setDTDSource(fDTDScanner); fDTDProcessor.setDTDHandler(fXIncludeHandler); fXIncludeHandler.setDTDSource(fDTDProcessor); 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); }
Example 20
Source File: XPointerParserConfiguration.java From jdk1.8-source-analysis with Apache License 2.0 | 4 votes |
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); }