org.apache.xerces.parsers.XMLGrammarPreparser.setGrammarPool()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(92)

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

XMLGrammarPreparser.setGrammarPool介绍

[英]Sets the grammar pool.
[中]设置语法池。

代码示例

代码示例来源:origin: org.opengis.cite/cite1-utils

public static Grammar parseGrammar(String baseUri, Reader in,
    XMLGrammarPool grammarPool, XMLErrorHandler errorHandler)
    throws IOException {
  String encoding = null;
  XMLGrammarPreparser grammerParser = getGrammarParser();
  if (grammarPool != null) {
    grammerParser.setGrammarPool(grammarPool);
  }
  if (errorHandler != null) {
    grammerParser.setErrorHandler(errorHandler);
  }
  grammerParser.setEntityResolver(getXmlEntityResolver(encoding));
  return grammerParser.preparseGrammar(
      "http://www.w3.org/2001/XMLSchema", new XMLInputSource(baseUri,
          baseUri, baseUri, in, encoding));
}

代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator

grammarPreparser.setGrammarPool(grammarPool);

代码示例来源:origin: org.eclipse/org.eclipse.wst.wsi

grammarPreparser.setGrammarPool(grammarPool);

代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator

grammarPreparser.setGrammarPool(grammarPool != null ? grammarPool : new XMLGrammarPoolImpl()); 
grammarPreparser.setErrorHandler(errorHandler);
if (entityResolver != null)

代码示例来源:origin: com.thaiopensource/jing

XMLGrammarPool grammarPool = new XMLGrammarPoolImpl();
preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
preparser.setGrammarPool(grammarPool);
ErrorHandler eh = properties.get(ValidateProperty.ERROR_HANDLER);
SAXXMLErrorHandler xeh = new SAXXMLErrorHandler(eh);

代码示例来源:origin: org.daisy.libs/jing

XMLGrammarPool grammarPool = new XMLGrammarPoolImpl();
preparser.registerPreparser(XMLGrammarDescription.XML_SCHEMA, null);
preparser.setGrammarPool(grammarPool);
ErrorHandler eh = properties.get(ValidateProperty.ERROR_HANDLER);
SAXXMLErrorHandler xeh = new SAXXMLErrorHandler(eh);

相关文章