本文整理了Java中org.apache.xerces.parsers.XMLGrammarPreparser.setGrammarPool()
方法的一些代码示例,展示了XMLGrammarPreparser.setGrammarPool()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLGrammarPreparser.setGrammarPool()
方法的具体详情如下:
包路径:org.apache.xerces.parsers.XMLGrammarPreparser
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!