Examples of XMLComponent


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

         */
        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

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

        if (fValidationManager != null)
            fValidationManager.reset();

        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

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());
            config.setDocumentHandler((XMLDocumentHandler) validatorComponent);
            ((XMLDocumentSource)validatorComponent).setDocumentHandler(domParser);
            domParser.setDocumentSource((XMLDocumentSource) validatorComponent);
            fSchemaValidator = validatorComponent;
        }
View Full Code Here

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

       
        // Get the Schema object from the factory
        this.grammar = spf.getSchema();
        if (grammar != null) {
            XMLParserConfiguration config = xmlReader.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(xmlReader);
                xmlReader.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());
            config.setDocumentHandler((XMLDocumentHandler) validatorComponent);
            ((XMLDocumentSource)validatorComponent).setDocumentHandler(xmlReader);
            xmlReader.setDocumentSource((XMLDocumentSource) validatorComponent);
            fSchemaValidator = validatorComponent;
        }
View Full Code Here

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

        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

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

        throws XMLConfigurationException {

        // forward to every component
        int count = fComponents.size();
        for (int i = 0; i < count; i++) {
            XMLComponent c = (XMLComponent) fComponents.get(i);
            c.setProperty(propertyId, value);
        }

        // store value if noone "objects"
        super.setProperty(propertyId, value);
View Full Code Here

Examples of mf.org.apache.xerces.xni.parser.XMLComponent

    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

Examples of mf.org.apache.xerces.xni.parser.XMLComponent

    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.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

Examples of mf.org.apache.xerces.xni.parser.XMLComponent

   * 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

Examples of mf.org.apache.xerces.xni.parser.XMLComponent

   */
  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
TOP
Copyright © 2018 www.massapi.com. 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.