Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > 914b483ce689435c18830da7120bfeb1 > files > 5

xercesjarv-0-2.mga3.src.rpm

--- src/org/kohsuke/jarv/xerces/XercesVerifierFactory.java	2003-05-30 17:56:56.000000000 +0200
+++ src/org/kohsuke/jarv/xerces/XercesVerifierFactory.java-gil	2011-08-04 16:20:30.330774446 +0200
@@ -10,11 +10,14 @@
 import java.io.IOException;
 import java.util.Vector;
 
+import org.apache.xerces.impl.Constants;
 import org.apache.xerces.impl.XMLErrorReporter;
 import org.apache.xerces.impl.xs.SchemaGrammar;
 import org.apache.xerces.impl.xs.XSDDescription;
 import org.apache.xerces.impl.xs.XSGrammarBucket;
 import org.apache.xerces.impl.xs.traversers.XSDHandler;
+import org.apache.xerces.impl.xs.opti.SchemaParsingConfig;
+import org.apache.xerces.impl.validation.ValidationManager;
 import org.apache.xerces.util.DefaultErrorHandler;
 import org.apache.xerces.util.SymbolTable;
 import org.apache.xerces.util.XMLGrammarPoolImpl;
@@ -69,8 +72,13 @@
         
         // initialize the schema compiler.
         // TODO: what about other parameters?
-        handler.reset(errorReporter,this,symbolTable,
-            new XMLGrammarPoolImpl(),true,false);
+        SchemaParsingConfig config = new SchemaParsingConfig(
+            symbolTable, new XMLGrammarPoolImpl());
+        config.setProperty(XercesConstants.ERROR_REPORTER, errorReporter);
+        config.setProperty(XercesConstants.ENTITY_RESOLVER, this);
+        config.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.VALIDATION_MANAGER_PROPERTY, new ValidationManager());
+        config.setFeature(Constants.XERCES_FEATURE_PREFIX+Constants.ALLOW_JAVA_ENCODINGS_FEATURE, true);
+        handler.reset(config);
         
         // prepare XSDDescription.
         XSDDescription xdecl = new XSDDescription();