本文整理了Java中org.apache.xerces.impl.xs.XMLSchemaLoader.setFeature()
方法的一些代码示例,展示了XMLSchemaLoader.setFeature()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSchemaLoader.setFeature()
方法的具体详情如下:
包路径:org.apache.xerces.impl.xs.XMLSchemaLoader
类名称:XMLSchemaLoader
方法名:setFeature
[英]Sets the state of a feature.
[中]设置要素的状态。
代码示例来源:origin: deegree/deegree3
schemaLoader.setFeature( SCHEMA_FULL_CHECKING_FEATURE_ID, true );
schemaLoader.setFeature( HONOUR_ALL_SCHEMA_LOCATIONS_ID, false );
schemaLoader.setEntityResolver( new RedirectingEntityResolver() );
代码示例来源:origin: org.wso2.bpel/ode-utils
schemaLoader.setFeature("http://apache.org/xml/features/honour-all-schemaLocations", true);
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
fXMLSchemaLoader.setFeature(name, value);
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
BaseSchemaFactory(String xsdVersion) {
fErrorHandlerWrapper = new ErrorHandlerWrapper(DraconianErrorHandler.getInstance());
fDOMEntityResolverWrapper = new DOMEntityResolverWrapper();
fXMLGrammarPoolWrapper = new XMLGrammarPoolWrapper();
fXMLSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, true);
fXMLSchemaLoader.setProperty(XMLGRAMMAR_POOL, fXMLGrammarPoolWrapper);
fXMLSchemaLoader.setProperty(XML_SCHEMA_VERSION, xsdVersion);
fXMLSchemaLoader.setEntityResolver(fDOMEntityResolverWrapper);
fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper);
fXSDVersion = xsdVersion;
fUseGrammarPoolOnly = true;
}
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
setFeature(name, state);
} catch (Exception e) {
String msg =
代码示例来源:origin: com.rackspace.apache/xerces2-xsd11
SchemaGrammar parseXMLSchema(XMLInputSource is)
throws IOException {
XMLEntityResolver resolver = getEntityResolver();
if(resolver != null) {
fSchemaLoader.setEntityResolver(resolver);
}
if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
}
fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);
String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
String propName = propPrefix + Constants.SCHEMA_LOCATION;
fSchemaLoader.setProperty(propName, getProperty(propName));
propName = propPrefix + Constants.SCHEMA_NONS_LOCATION;
fSchemaLoader.setProperty(propName, getProperty(propName));
propName = Constants.JAXP_PROPERTY_PREFIX+Constants.SCHEMA_SOURCE;
fSchemaLoader.setProperty(propName, getProperty(propName));
fSchemaLoader.setFeature(SCHEMA_FULL_CHECKING, getFeature(SCHEMA_FULL_CHECKING));
// Should check whether the grammar with this namespace is already in
// the grammar resolver. But since we don't know the target namespace
// of the document here, we leave such check to XSDHandler
SchemaGrammar grammar = (SchemaGrammar)fSchemaLoader.loadGrammar(is);
// by default, hand it off to the grammar pool
if (grammar != null) {
fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
new Grammar[]{grammar});
}
return grammar;
} // parseXMLSchema(XMLInputSource) : SchemaGrammar
内容来源于网络,如有侵权,请联系作者删除!