* This special limit considers access to
* importing http://www.w3.org/2001/xml.xsd
* in top of common xml schema file.
- * If HTTP access controll is needed, customize resolver yourself.
*
- * @param resolver Custom resolver for reading xml schema.
- * Resolve reference to nothing if null.
* @return schema factory
*/
- public static SchemaFactory newSchemaFactory(
- LSResourceResolver resolver ){
+ public static SchemaFactory newSchemaFactory(){
SchemaFactory schemaFactory;
schemaFactory = SchemaFactory.newInstance(
XMLConstants.W3C_XML_SCHEMA_NS_URI);
assert false;
}
+ LSResourceResolver resolver = buildXmlXsdResolver();
schemaFactory.setResourceResolver(resolver);
schemaFactory.setErrorHandler(BotherHandler.HANDLER);
*
* <p>任意のリゾルバを指定可能
*
- * @param resolver リゾルバ
* @param resArray ローカルスキーマ情報並び
* @return スキーマ
*/
- public static Schema newSchema(
- XmlResourceResolver resolver,
- LocalXmlResource... resArray){
- XmlResourceResolver totalResolver = buildXmlXsdResolver();
- totalResolver.putRedirected(resolver);
-
- for(LocalXmlResource resource : resArray){
- totalResolver.putRedirected(resource);
- }
-
+ public static Schema newSchema(LocalXmlResource... resArray){
Source[] sources;
try{
sources = toLocalSourceArray(resArray);
throw new AssertionError(e);
}
- SchemaFactory schemaFactory = newSchemaFactory(totalResolver);
+ SchemaFactory schemaFactory = newSchemaFactory();
Schema result;
try{