Package com.sun.org.apache.xerces.internal.xni.parser

Examples of com.sun.org.apache.xerces.internal.xni.parser.XMLComponent


        }
       
        this.grammar = dbf.getSchema();
        if (grammar != null) {
            XMLParserConfiguration config = domParser.getXMLParserConfiguration();
            XMLComponent validatorComponent = null;
            /** For Xerces grammars, use built-in schema validator. **/
            if (grammar instanceof XSGrammarPoolContainer) {
                validatorComponent = new XMLSchemaValidator();
                fSchemaValidationManager = new ValidationManager();
                XMLDTDFilter entityHandler = new UnparsedEntityHandler(fSchemaValidationManager);
                config.setDTDHandler(entityHandler);
                entityHandler.setDTDHandler(domParser);
                domParser.setDTDSource(entityHandler);
                fSchemaValidatorComponentManager = new SchemaValidatorConfiguration(config,
                        (XSGrammarPoolContainer) grammar, fSchemaValidationManager);
            }
            /** For third party grammars, use the JAXP validator component. **/
            else {
                validatorComponent = new JAXPValidatorComponent(grammar.newValidatorHandler());
                fSchemaValidatorComponentManager = config;
            }
            config.addRecognizedFeatures(validatorComponent.getRecognizedFeatures());
            config.addRecognizedProperties(validatorComponent.getRecognizedProperties());
            setFeatures(features);      // Must set before calling setDocumentHandler()
            config.setDocumentHandler((XMLDocumentHandler) validatorComponent);
            ((XMLDocumentSource)validatorComponent).setDocumentHandler(domParser);
            domParser.setDocumentSource((XMLDocumentSource) validatorComponent);
            fSchemaValidator = validatorComponent;
View Full Code Here


         * reset all XML 1.0 components before parsing and namespace context
         */
        protected void reset() throws XNIException {
                int count = fComponents.size();
                for (int i = 0; i < count; i++) {
                        XMLComponent c = (XMLComponent) fComponents.get(i);
                        c.reset(this);
                }

        } // reset()
View Full Code Here

         */
        protected void resetCommon() throws XNIException {
                // reset common components
                int count = fCommonComponents.size();
                for (int i = 0; i < count; i++) {
                        XMLComponent c = (XMLComponent) fCommonComponents.get(i);
                        c.reset(this);
                }

        } // resetCommon()
View Full Code Here

         */
        protected void resetXML11() throws XNIException {
                // reset every component
                int count = fXML11Components.size();
                for (int i = 0; i < count; i++) {
                        XMLComponent c = (XMLComponent) fXML11Components.get(i);
                        c.reset(this);
                }

        } // resetXML11()
View Full Code Here

    throws XMLConfigurationException {
    fConfigUpdated = true;
    // forward to every XML 1.0 component
    int count = fComponents.size();
    for (int i = 0; i < count; i++) {
      XMLComponent c = (XMLComponent) fComponents.get(i);
      c.setFeature(featureId, state);
    }
    // forward it to common components
    count = fCommonComponents.size();
    for (int i = 0; i < count; i++) {
      XMLComponent c = (XMLComponent) fCommonComponents.get(i);
      c.setFeature(featureId, state);
    }
       
    // forward to every XML 1.1 component
    count = fXML11Components.size();
    for (int i = 0; i < count; i++) {
      XMLComponent c = (XMLComponent) fXML11Components.get(i);
      try{           
        c.setFeature(featureId, state);
      }
      catch (Exception e){
        // no op
      }
    }
View Full Code Here

        setLocale((Locale) value);
    }
    // forward to every XML 1.0 component
    int count = fComponents.size();
    for (int i = 0; i < count; i++) {
      XMLComponent c = (XMLComponent) fComponents.get(i);
      c.setProperty(propertyId, value);
    }
    // forward it to every common Component
    count = fCommonComponents.size();
    for (int i = 0; i < count; i++) {
      XMLComponent c = (XMLComponent) fCommonComponents.get(i);
      c.setProperty(propertyId, value);
    }
    // forward it to every XML 1.1 component
    count = fXML11Components.size();
    for (int i = 0; i < count; i++) {
      XMLComponent c = (XMLComponent) fXML11Components.get(i);
      try{     
        c.setProperty(propertyId, value);
      }
      catch (Exception e){
        // ignore it
      }
    }
View Full Code Here

   * reset all XML 1.0 components before parsing and namespace context
   */
  protected void reset() throws XNIException {
    int count = fComponents.size();
    for (int i = 0; i < count; i++) {
      XMLComponent c = (XMLComponent) fComponents.get(i);
      c.reset(this);
    }

  } // reset()
View Full Code Here

   */
  protected void resetCommon() throws XNIException {
    // reset common components
    int count = fCommonComponents.size();
    for (int i = 0; i < count; i++) {
      XMLComponent c = (XMLComponent) fCommonComponents.get(i);
      c.reset(this);
    }

  } // resetCommon()
View Full Code Here

   */
  protected void resetXML11() throws XNIException {
    // reset every component
    int count = fXML11Components.size();
    for (int i = 0; i < count; i++) {     
      XMLComponent c = (XMLComponent) fXML11Components.get(i);
      c.reset(this);
    }

  } // resetXML11()
View Full Code Here

        throws XMLConfigurationException {

        // forward to every component
        int count = fComponents.size();
        for (int i = 0; i < count; i++) {
            XMLComponent c = (XMLComponent) fComponents.get(i);
            c.setFeature(featureId, state);
        }
        // save state if noone "objects"
        super.setFeature(featureId, state);

    } // setFeature(String,boolean)
View Full Code Here

TOP

Related Classes of com.sun.org.apache.xerces.internal.xni.parser.XMLComponent

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.