com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource Java Examples

The following examples show how to use com.sun.org.apache.xerces.internal.xni.parser.XMLDocumentSource. 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 TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * 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 JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * 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 jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * 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: XIncludeParserConfiguration.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
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 #5
Source File: XIncludeParserConfiguration.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
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 #6
Source File: XIncludeParserConfiguration.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
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 #7
Source File: DOMResultBuilder.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public XMLDocumentSource getDocumentSource() {
    return null;
}
 
Example #8
Source File: TeeXMLDocumentFilterImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public XMLDocumentSource getDocumentSource() {
    return source;
}
 
Example #9
Source File: TeeXMLDocumentFilterImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setDocumentSource(XMLDocumentSource source) {
    this.source = source;
}
 
Example #10
Source File: XMLNamespaceBinder.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/** Returns the document source */
public XMLDocumentSource getDocumentSource (){
    return fDocumentSource;
}
 
Example #11
Source File: XMLDocumentFilterImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public void setDocumentSource(XMLDocumentSource source) {
    this.source = source;
}
 
Example #12
Source File: XMLSchemaValidator.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/** Sets the document source */
public void setDocumentSource(XMLDocumentSource source) {
    fDocumentSource = source;
}
 
Example #13
Source File: DefaultXMLDocumentHandler.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/** Sets the document source. */
public void setDocumentSource(XMLDocumentSource source) {
    fDocumentSource = source;
}
 
Example #14
Source File: DefaultXMLDocumentHandler.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/** Returns the document source. */
public XMLDocumentSource getDocumentSource() {
    return fDocumentSource;
}
 
Example #15
Source File: ValidatorHandlerImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public XMLDocumentSource getDocumentSource() {
    return fSchemaValidator;
}
 
Example #16
Source File: XMLDTDValidator.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/** Returns the document source */
public XMLDocumentSource getDocumentSource (){
    return fDocumentSource;
}
 
Example #17
Source File: XMLDocumentHandler.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/** Returns the document source. */
public XMLDocumentSource getDocumentSource();
 
Example #18
Source File: AbstractXMLDocumentParser.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
/** Sets the document source */
public void setDocumentSource(XMLDocumentSource source){
    fDocumentSource = source;
}
 
Example #19
Source File: ValidatorHandlerImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public XMLDocumentSource getDocumentSource() {
    return fSchemaValidator;
}
 
Example #20
Source File: DOMResultBuilder.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public XMLDocumentSource getDocumentSource() {
    return null;
}
 
Example #21
Source File: XIncludeHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public void setDocumentSource(XMLDocumentSource source) {
    fDocumentSource = source;
}
 
Example #22
Source File: DOMResultAugmentor.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public XMLDocumentSource getDocumentSource() {
    return null;
}
 
Example #23
Source File: DOMNormalizer.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/** Returns the document source. */
public XMLDocumentSource getDocumentSource(){
    return null;
}
 
Example #24
Source File: DOMNormalizer.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/** Sets the document source. */
public void setDocumentSource(XMLDocumentSource source){
}
 
Example #25
Source File: XMLDocumentHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/** Sets the document source. */
public void setDocumentSource(XMLDocumentSource source);
 
Example #26
Source File: DOMParserImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public XMLDocumentSource getDocumentSource() {
    return documentSource;
}
 
Example #27
Source File: DOMParserImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public void setDocumentSource(XMLDocumentSource source) {
    documentSource = source;
}
 
Example #28
Source File: XIncludeHandler.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
@Override
public XMLDocumentSource getDocumentSource() {
    return fDocumentSource;
}
 
Example #29
Source File: XPointerParserConfiguration.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
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 #30
Source File: DOMNormalizer.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/** Returns the document source. */
public XMLDocumentSource getDocumentSource(){
    return null;
}