import javax.xml.validation.Validator;
import org.apache.xerces.impl.xs.XSImplementationImpl;
-import org.apache.xerces.impl.xs.util.StringListImpl;
import org.apache.xerces.jaxp.DocumentBuilderFactoryImpl;
import org.apache.xerces.xs.StringList;
import org.apache.xerces.xs.XSAttributeDeclaration;
private SortedMap<QName, Map<QName, CrAttributeType>> types;
private boolean validating = false;
- private boolean creatingXsModel = true;
+ private boolean creatingXsModel = false;
private final static boolean limited = false;
List<StreamSource> sourcesToUse = new ArrayList<>();
for (URL sourceUrl : sources) {
sourcesToUse.add(new StreamSource(sourceUrl.toExternalForm()));
+// try {
+// sourcesToUse.add(new StreamSource(sourceUrl.openStream()));
+// } catch (IOException e) {
+// log.error("Cannot open schema source " + sourceUrl);
+// }
}
schema = schemaFactory.newSchema(sourcesToUse.toArray(new Source[sourcesToUse.size()]));
// for (StreamSource source : sourcesToUse) {
for (URL sourceUrl : sources) {
systemIds.add(sourceUrl.toExternalForm());
}
- StringList sl = new StringListImpl(systemIds.toArray(new String[systemIds.size()]), systemIds.size());
+ StringList sl = xsImplementation.createStringList(systemIds.toArray(new String[systemIds.size()]));
XSModel xsModel = xsLoader.loadURIList(sl);
// types