微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

org.apache.catalina.util.SchemaResolver的实例源码

项目:tomcat7    文件DigesterFactory.java   
/**
 * Create a <code>Digester</code> parser.
 * @param xmlValidation turn on/off xml validation
 * @param xmlNamespaceAware turn on/off namespace validation
 * @param rule an instance of <code>RuleSet</code> used for parsing the xml.
 */
public static Digester newDigester(boolean xmlValidation,boolean xmlNamespaceAware,RuleSet rule) {
    Digester digester = new Digester();
    digester.setNamespaceAware(xmlNamespaceAware);
    digester.setValidating(xmlValidation);
    digester.setUseContextClassLoader(true);

    SchemaResolver schemaResolver = new SchemaResolver(digester);
    registerLocalSchema(schemaResolver);

    digester.setEntityResolver(schemaResolver);
    if ( rule != null ) {
        digester.addRuleSet(rule);
    }

    return (digester);
}
项目:lams    文件DigesterFactory.java   
/**
 * Create a <code>Digester</code> parser.
 * @param xmlValidation turn on/off xml validation
 * @param xmlNamespaceAware turn on/off namespace validation
 * @param rule an instance of <code>RuleSet</code> used for parsing the xml.
 */
public static Digester newDigester(boolean xmlValidation,RuleSet rule) {
    Digester digester = new Digester();
    digester.setNamespaceAware(xmlNamespaceAware);
    digester.setValidating(xmlValidation);
    digester.setUseContextClassLoader(true);

    if (xmlValidation || xmlNamespaceAware){
        configureSchema(digester);        
    }

    schemaResolver = new SchemaResolver(digester);
    registerLocalSchema();

    digester.setEntityResolver(schemaResolver);
    if ( rule != null ) {
        digester.addRuleSet(rule);
    }

    return (digester);
}
项目:apache-tomcat-7.0.73-with-comment    文件DigesterFactory.java   
/**
 * Create a <code>Digester</code> parser.
 * @param xmlValidation turn on/off xml validation
 * @param xmlNamespaceAware turn on/off namespace validation
 * @param rule an instance of <code>RuleSet</code> used for parsing the xml.
 */
public static Digester newDigester(boolean xmlValidation,RuleSet rule) {
    Digester digester = new Digester();
    digester.setNamespaceAware(xmlNamespaceAware);
    digester.setValidating(xmlValidation);
    digester.setUseContextClassLoader(true);

    SchemaResolver schemaResolver = new SchemaResolver(digester);
    registerLocalSchema(schemaResolver);

    digester.setEntityResolver(schemaResolver);
    if ( rule != null ) {
        digester.addRuleSet(rule);
    }

    return (digester);
}
项目:lazycat    文件DigesterFactory.java   
/**
 * Create a <code>Digester</code> parser.
 * 
 * @param xmlValidation
 *            turn on/off xml validation
 * @param xmlNamespaceAware
 *            turn on/off namespace validation
 * @param rule
 *            an instance of <code>RuleSet</code> used for parsing the xml.
 */
public static Digester newDigester(boolean xmlValidation,RuleSet rule) {
    Digester digester = new Digester();
    digester.setNamespaceAware(xmlNamespaceAware);
    digester.setValidating(xmlValidation);
    digester.setUseContextClassLoader(true);

    SchemaResolver schemaResolver = new SchemaResolver(digester);
    registerLocalSchema(schemaResolver);

    digester.setEntityResolver(schemaResolver);
    if (rule != null) {
        digester.addRuleSet(rule);
    }

    return (digester);
}
项目:class-guard    文件DigesterFactory.java   
/**
 * Create a <code>Digester</code> parser.
 * @param xmlValidation turn on/off xml validation
 * @param xmlNamespaceAware turn on/off namespace validation
 * @param rule an instance of <code>RuleSet</code> used for parsing the xml.
 */
public static Digester newDigester(boolean xmlValidation,RuleSet rule) {
    Digester digester = new Digester();
    digester.setNamespaceAware(xmlNamespaceAware);
    digester.setValidating(xmlValidation);
    digester.setUseContextClassLoader(true);

    SchemaResolver schemaResolver = new SchemaResolver(digester);
    registerLocalSchema(schemaResolver);

    digester.setEntityResolver(schemaResolver);
    if ( rule != null ) {
        digester.addRuleSet(rule);
    }

    return (digester);
}
项目:apache-tomcat-7.0.57    文件DigesterFactory.java   
/**
 * Create a <code>Digester</code> parser.
 * @param xmlValidation turn on/off xml validation
 * @param xmlNamespaceAware turn on/off namespace validation
 * @param rule an instance of <code>RuleSet</code> used for parsing the xml.
 */
public static Digester newDigester(boolean xmlValidation,RuleSet rule) {
    Digester digester = new Digester();
    digester.setNamespaceAware(xmlNamespaceAware);
    digester.setValidating(xmlValidation);
    digester.setUseContextClassLoader(true);

    SchemaResolver schemaResolver = new SchemaResolver(digester);
    registerLocalSchema(schemaResolver);

    digester.setEntityResolver(schemaResolver);
    if ( rule != null ) {
        digester.addRuleSet(rule);
    }

    return (digester);
}
项目:WBSAirback    文件DigesterFactory.java   
/**
 * Create a <code>Digester</code> parser.
 * @param xmlValidation turn on/off xml validation
 * @param xmlNamespaceAware turn on/off namespace validation
 * @param rule an instance of <code>RuleSet</code> used for parsing the xml.
 */
public static Digester newDigester(boolean xmlValidation,RuleSet rule) {
    Digester digester = new Digester();
    digester.setNamespaceAware(xmlNamespaceAware);
    digester.setValidating(xmlValidation);
    digester.setUseContextClassLoader(true);

    SchemaResolver schemaResolver = new SchemaResolver(digester);
    registerLocalSchema(schemaResolver);

    digester.setEntityResolver(schemaResolver);
    if ( rule != null ) {
        digester.addRuleSet(rule);
    }

    return (digester);
}
项目:tomcat7    文件DigesterFactory.java   
/**
 * Load the resource and add it to the resolver.
 */
protected static void register(String resourceURL,String resourcePublicId,SchemaResolver schemaResolver){
    URL url = DigesterFactory.class.getResource(resourceURL);

    if(url == null) {
        log.warn("Could not get url for " + resourceURL);
    } else {
        schemaResolver.register(resourcePublicId,url.toString() );
    }
}
项目:apache-tomcat-7.0.73-with-comment    文件DigesterFactory.java   
/**
 * Load the resource and add it to the resolver.
 */
protected static void register(String resourceURL,url.toString() );
    }
}
项目:lazycat    文件DigesterFactory.java   
/**
 * Load the resource and add it to the resolver.
 */
protected static void register(String resourceURL,SchemaResolver schemaResolver) {
    URL url = DigesterFactory.class.getResource(resourceURL);

    if (url == null) {
        log.warn("Could not get url for " + resourceURL);
    } else {
        schemaResolver.register(resourcePublicId,url.toString());
    }
}
项目:class-guard    文件DigesterFactory.java   
/**
 * Load the resource and add it to the resolver.
 */
protected static void register(String resourceURL,url.toString() );
    }
}
项目:apache-tomcat-7.0.57    文件DigesterFactory.java   
/**
 * Load the resource and add it to the resolver.
 */
protected static void register(String resourceURL,url.toString() );
    }
}
项目:WBSAirback    文件DigesterFactory.java   
/**
 * Load the resource and add it to the resolver.
 */
protected static void register(String resourceURL,url.toString() );
    }
}
项目:lazycat    文件DigesterFactory.java   
/**
 * Utilities used to force the parser to use local schema,when available,* instead of the <code>schemaLocation</code> XML element.
 */
protected static void registerLocalSchema(SchemaResolver schemaResolver) {
    // J2EE
    register(Constants.J2eeSchemaResourcePath_14,Constants.J2eeSchemaPublicId_14,schemaResolver);

    register(Constants.JavaeeSchemaResourcePath_5,Constants.JavaeeSchemaPublicId_5,schemaResolver);

    register(Constants.JavaeeSchemaResourcePath_6,Constants.JavaeeSchemaPublicId_6,schemaResolver);

    // W3C
    register(Constants.W3cSchemaResourcePath_10,Constants.W3cSchemaPublicId_10,schemaResolver);

    register(Constants.W3cSchemaDTDResourcePath_10,Constants.W3cSchemaDTDPublicId_10,schemaResolver);

    register(Constants.W3cDatatypesDTDResourcePath_10,Constants.W3cDatatypesDTDPublicId_10,schemaResolver);

    // JSP
    register(Constants.JspSchemaResourcePath_20,Constants.JspSchemaPublicId_20,schemaResolver);

    register(Constants.JspSchemaResourcePath_21,Constants.JspSchemaPublicId_21,schemaResolver);

    register(Constants.JspSchemaResourcePath_22,Constants.JspSchemaPublicId_22,schemaResolver);

    // TLD
    register(Constants.TldDtdResourcePath_11,Constants.TldDtdPublicId_11,schemaResolver);

    register(Constants.TldDtdResourcePath_12,Constants.TldDtdPublicId_12,schemaResolver);

    register(Constants.TldSchemaResourcePath_20,Constants.TldSchemaPublicId_20,schemaResolver);

    register(Constants.TldSchemaResourcePath_21,Constants.TldSchemaPublicId_21,schemaResolver);

    // web.xml
    register(Constants.WebDtdResourcePath_22,Constants.WebDtdPublicId_22,schemaResolver);

    register(Constants.WebDtdResourcePath_23,Constants.WebDtdPublicId_23,schemaResolver);

    register(Constants.WebSchemaResourcePath_24,Constants.WebSchemaPublicId_24,schemaResolver);

    register(Constants.WebSchemaResourcePath_25,Constants.WebSchemaPublicId_25,schemaResolver);

    register(Constants.WebSchemaResourcePath_30,Constants.WebSchemaPublicId_30,schemaResolver);

    register(Constants.WebCommonSchemaResourcePath_30,Constants.WebCommonSchemaPublicId_30,schemaResolver);

    register(Constants.WebFragmentSchemaResourcePath_30,Constants.WebFragmentSchemaPublicId_30,schemaResolver);

    // Web Service
    register(Constants.J2eeWebServiceSchemaResourcePath_11,Constants.J2eeWebServiceSchemaPublicId_11,schemaResolver);

    register(Constants.J2eeWebServiceClientSchemaResourcePath_11,Constants.J2eeWebServiceClientSchemaPublicId_11,schemaResolver);

    register(Constants.JavaeeWebServiceSchemaResourcePath_12,Constants.JavaeeWebServiceSchemaPublicId_12,schemaResolver);

    register(Constants.JavaeeWebServiceClientSchemaResourcePath_12,Constants.JavaeeWebServiceClientSchemaPublicId_12,schemaResolver);

    register(Constants.JavaeeWebServiceSchemaResourcePath_13,Constants.JavaeeWebServiceSchemaPublicId_13,schemaResolver);

    register(Constants.JavaeeWebServiceClientSchemaResourcePath_13,Constants.JavaeeWebServiceClientSchemaPublicId_13,schemaResolver);
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。