jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r390805 - /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
Date Sun, 02 Apr 2006 10:35:05 GMT
Author: jukka
Date: Sun Apr  2 03:35:01 2006
New Revision: 390805

URL: http://svn.apache.org/viewcvs?rev=390805&view=rev
Log:
JCR-383: Add default namespace mappings for CND parsing with JackrabbitNodeTypeManager.registerNodeTypes().

Modified:
    jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewcvs/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java?rev=390805&r1=390804&r2=390805&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
Sun Apr  2 03:35:01 2006
@@ -21,6 +21,7 @@
 import org.apache.jackrabbit.name.QName;
 import org.apache.jackrabbit.name.UnknownPrefixException;
 import org.apache.jackrabbit.util.IteratorHelper;
+import org.apache.jackrabbit.util.name.NamespaceMapping;
 import org.apache.jackrabbit.api.JackrabbitNodeTypeManager;
 import org.apache.jackrabbit.core.nodetype.compact.CompactNodeTypeDefReader;
 import org.apache.jackrabbit.core.nodetype.compact.ParseException;
@@ -356,8 +357,9 @@
                 return registerNodeTypes(new InputSource(in));
             } else if (contentType.equalsIgnoreCase(
                     JackrabbitNodeTypeManager.TEXT_X_JCR_CND)) {
+                NamespaceMapping mapping = new NamespaceMapping(nsResolver);
                 CompactNodeTypeDefReader reader = new CompactNodeTypeDefReader(
-                        new InputStreamReader(in), "cnd input stream");
+                        new InputStreamReader(in), "cnd input stream", mapping);
                 return registerNodeTypes(reader.getNodeTypeDefs());
             } else {
                 throw new UnsupportedOperationException(



Mime
View raw message