Update of /var/cvs/src/org/mmbase/framework
In directory james.mmbase.org:/tmp/cvs-serv380
Modified Files:
ComponentRepository.java
Log Message:
blocktypes xmls where not recognized any more
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/framework
Index: ComponentRepository.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/framework/ComponentRepository.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- ComponentRepository.java 19 Jun 2008 20:47:10 -0000 1.38
+++ ComponentRepository.java 11 Jul 2008 15:59:56 -0000 1.39
@@ -25,7 +25,7 @@
* Components can be configured by placing their configuration in
'config/components/'.
*
* @author Michiel Meeuwissen
- * @version $Id: ComponentRepository.java,v 1.38 2008/06/19 20:47:10 michiel
Exp $
+ * @version $Id: ComponentRepository.java,v 1.39 2008/07/11 15:59:56 michiel
Exp $
* @since MMBase-1.9
*/
public class ComponentRepository {
@@ -33,17 +33,21 @@
public static final String XSD_COMPONENT = "component.xsd";
public static final String NAMESPACE_COMPONENT =
"http://www.mmbase.org/xmlns/component";
- public static final String XSD_FRAMEWORK = "framework.xsd";
- public static final String NAMESPACE_FRAMEWORK =
"http://www.mmbase.org/xmlns/framework";
+ public static final String XSD_BLOCKTYPES = "blocktypes.xsd";
+ public static final String NAMESPACE_BLOCKTYPES =
"http://www.mmbase.org/xmlns/blocktypes";
+ private static final Set<String> RECOGNIZED_NAMESPACES = new
HashSet<String>();
+
static {
XMLEntityResolver.registerSystemID(NAMESPACE_COMPONENT + ".xsd",
XSD_COMPONENT, ComponentRepository.class);
- XMLEntityResolver.registerSystemID(NAMESPACE_FRAMEWORK + ".xsd",
XSD_FRAMEWORK, ComponentRepository.class);
+ XMLEntityResolver.registerSystemID(NAMESPACE_BLOCKTYPES + ".xsd",
XSD_BLOCKTYPES, ComponentRepository.class);
+ RECOGNIZED_NAMESPACES.addAll(Arrays.asList(NAMESPACE_COMPONENT,
NAMESPACE_BLOCKTYPES));
}
private static final Logger log =
Logging.getLoggerInstance(ComponentRepository.class);
private static final ComponentRepository repository = new
ComponentRepository();
+
public static ComponentRepository getInstance() {
return repository;
}
@@ -163,6 +167,8 @@
}
}
+
+
/**
* Reads all component xmls
*/
@@ -178,10 +184,9 @@
if (url.openConnection().getDoInput()) {
String namespace = ResourceLoader.getDocument(url,
false, null).getDocumentElement().getNamespaceURI();
- if (!NAMESPACE_COMPONENT.equals(namespace)) {
- log.debug("Ignoring " + url + " because namespace
is not " + NAMESPACE_COMPONENT + ", but " + namespace);
+ if (namespace == null || !
RECOGNIZED_NAMESPACES.contains(namespace)) {
+ log.debug("Ignoring " + url + " because namespace
is not one of " + RECOGNIZED_NAMESPACES + ", but " + namespace);
continue;
-
}
Document doc = ResourceLoader.getDocument(url, true,
getClass());
Element documentElement = doc.getDocumentElement();
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs