gpt4 book ai didi

org.apache.xerces.impl.xs.XMLSchemaLoader.setFeature()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 15:36:40 28 4
gpt4 key购买 nike

本文整理了Java中org.apache.xerces.impl.xs.XMLSchemaLoader.setFeature()方法的一些代码示例,展示了XMLSchemaLoader.setFeature()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLSchemaLoader.setFeature()方法的具体详情如下:
包路径:org.apache.xerces.impl.xs.XMLSchemaLoader
类名称:XMLSchemaLoader
方法名:setFeature

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

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com