Package org.apache.xerces.xni.parser

Examples of org.apache.xerces.xni.parser.XMLDocumentSource


            HTMLComponent component = (HTMLComponent)fHTMLComponents.elementAt(i);
            component.reset(this);
        }

        // configure pipeline
        XMLDocumentSource lastSource = fDocumentScanner;
        if (getFeature(NAMESPACES)) {
            lastSource.setDocumentHandler(fNamespaceBinder);
            fNamespaceBinder.setDocumentSource(fTagBalancer);
            lastSource = fNamespaceBinder;
        }
        if (getFeature(BALANCE_TAGS)) {
            lastSource.setDocumentHandler(fTagBalancer);
            fTagBalancer.setDocumentSource(fDocumentScanner);
            lastSource = fTagBalancer;
        }
        XMLDocumentFilter[] filters = (XMLDocumentFilter[])getProperty(FILTERS);
        if (filters != null) {
            for (int i = 0; i < filters.length; i++) {
                XMLDocumentFilter filter = filters[i];
                XercesBridge.getInstance().XMLDocumentFilter_setDocumentSource(filter, lastSource);
                lastSource.setDocumentHandler(filter);
                lastSource = filter;
            }
        }
        lastSource.setDocumentHandler(fDocumentHandler);

    } // reset()
View Full Code Here


            HTMLComponent component = (HTMLComponent)fHTMLComponents.elementAt(i);
            component.reset(this);
        }

        // configure pipeline
        XMLDocumentSource lastSource = fDocumentScanner;
        if (getFeature(BALANCE_TAGS)) {
            lastSource.setDocumentHandler(fTagBalancer);
            fTagBalancer.setDocumentSource(fDocumentScanner);
            lastSource = fTagBalancer;
        }
        if (getFeature(NAMESPACES)) {
            lastSource.setDocumentHandler(fNamespaceBinder);
            fNamespaceBinder.setDocumentSource(fTagBalancer);
            lastSource = fNamespaceBinder;
        }
        XMLDocumentFilter[] filters = (XMLDocumentFilter[])getProperty(FILTERS);
        if (filters != null) {
            for (int i = 0; i < filters.length; i++) {
                XMLDocumentFilter filter = filters[i];
                Class filterClass = filter.getClass();
                try {
                    Method filterMethod = filterClass.getMethod("setDocumentSource", DOCSOURCE);
                    if (filterMethod != null) {
                        filterMethod.invoke(filter, new Object[] { lastSource });
                    }
                }
                catch (IllegalAccessException e) {
                    // ignore
                }
                catch (InvocationTargetException e) {
                    // ignore
                }
                catch (NoSuchMethodException e) {
                    // ignore
                }
                lastSource.setDocumentHandler(filter);
                lastSource = filter;
            }
        }
        lastSource.setDocumentHandler(fDocumentHandler);

    } // reset()
View Full Code Here

            }
            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);
            }
View Full Code Here

            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);
        }
View Full Code Here

      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);
    }
View Full Code Here

            }
            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);
            }
View Full Code Here

                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);
            }
View Full Code Here

                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);
            }
View Full Code Here

            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);
View Full Code Here

        }

   
    // 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);
View Full Code Here

TOP

Related Classes of org.apache.xerces.xni.parser.XMLDocumentSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.