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

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


    protected void reset() throws XNIException {

        // reset every component
        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

        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

        }

        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();
                fUnparsedEntityHandler = new UnparsedEntityHandler(fSchemaValidationManager);
                config.setDTDHandler(fUnparsedEntityHandler);
                fUnparsedEntityHandler.setDTDHandler(domParser);
                domParser.setDTDSource(fUnparsedEntityHandler);
                fSchemaValidatorComponentManager = new SchemaValidatorConfiguration(config,
                        (XSGrammarPoolContainer) grammar, fSchemaValidationManager);
            }
            /** For third party grammars, use the JAXP validator component. **/
            else {
                validatorComponent = new JAXPValidatorComponent(grammar.newValidatorHandler());
                fSchemaValidationManager = null;
                fUnparsedEntityHandler = null;
                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

        // 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();
                fUnparsedEntityHandler = new UnparsedEntityHandler(fSchemaValidationManager);
                config.setDTDHandler(fUnparsedEntityHandler);
                fUnparsedEntityHandler.setDTDHandler(xmlReader);
                xmlReader.setDTDSource(fUnparsedEntityHandler);
                fSchemaValidatorComponentManager = new SchemaValidatorConfiguration(config,
                        (XSGrammarPoolContainer) grammar, fSchemaValidationManager);
            }
            /** For third party grammars, use the JAXP validator component. **/
            else {
                validatorComponent = new JAXPValidatorComponent(grammar.newValidatorHandler());
                fSchemaValidationManager = null;
                fUnparsedEntityHandler = null;
                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

    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

    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

   * 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

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.