jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r475669 - /jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
Date Thu, 16 Nov 2006 09:59:04 GMT
Author: stefan
Date: Thu Nov 16 01:59:04 2006
New Revision: 475669

URL: http://svn.apache.org/viewvc?view=rev&rev=475669
Log:
JCR-637: only allow namespace declarations at the top of cnd file to work around ambiguity
of '<' token

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

Modified: jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java?view=diff&rev=475669&r1=475668&r2=475669
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
Thu Nov 16 01:59:04 2006
@@ -49,9 +49,9 @@
  * node type definition format and returns a list of NodeTypeDef objects that
  * can then be used to register node types.
  * <p/>
- * The BNF grammar of the compact node type definition:<br>
+ * The EBNF grammar of the compact node type definition:<br>
  * <pre>
- * cnd ::= {ns_mapping | node_type_def}
+ * cnd ::= ns_mapping* node_type_def+
  *
  * ns_mapping ::= "&lt;" prefix "=" namespace "&gt;"
  *
@@ -194,9 +194,11 @@
      */
     private void parse() throws ParseException {
         while (!currentTokenEquals(Lexer.EOF)) {
-            if (doNameSpace()) {
-                continue;
+            if (!doNameSpace()) {
+                break;
             }
+        }
+        while (!currentTokenEquals(Lexer.EOF)) {
             NodeTypeDef ntd = new NodeTypeDef();
             ntd.setOrderableChildNodes(false);
             ntd.setMixin(false);



Mime
View raw message