- public synchronized void registerTypes(String defaultPrefix, String namespace, String xsdSystemId) {
- if (prefixes.containsKey(defaultPrefix))
- throw new IllegalStateException(
- "Prefix " + defaultPrefix + " is already mapped with " + prefixes.get(defaultPrefix));
- prefixes.put(defaultPrefix, namespace);
-
- sources.add(new StreamSource(xsdSystemId));
- reload();
+ public void registerTypes(String defaultPrefix, String namespace, String xsdSystemId) {
+// if (prefixes.containsKey(defaultPrefix))
+// throw new IllegalStateException(
+// "Prefix " + defaultPrefix + " is already mapped with " + prefixes.get(defaultPrefix));
+// prefixes.put(defaultPrefix, namespace);
+ RuntimeNamespaceContext.register(namespace, defaultPrefix);
+
+ if (xsdSystemId != null) {
+ sources.add(new StreamSource(xsdSystemId));
+ reload();
+ log.debug(() -> "Registered types " + namespace + " from " + xsdSystemId);
+ }