Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 39054 invoked from network); 4 Jul 2006 09:01:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Jul 2006 09:01:20 -0000 Received: (qmail 92124 invoked by uid 500); 4 Jul 2006 09:01:19 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 91932 invoked by uid 500); 4 Jul 2006 09:01:18 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 91923 invoked by uid 99); 4 Jul 2006 09:01:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jul 2006 02:01:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jul 2006 02:01:17 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 70D2571428D for ; Tue, 4 Jul 2006 08:59:32 +0000 (GMT) Message-ID: <21042006.1152003572459.JavaMail.jira@brutus> Date: Tue, 4 Jul 2006 08:59:32 +0000 (GMT+00:00) From: "Jukka Zitting (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-467) CompactNodeTypeReader fails to explain why valid JCR names cause errors In-Reply-To: <20403849.1150802489789.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/JCR-467?page=all ] Jukka Zitting updated JCR-467: ------------------------------ Component: nodetype > CompactNodeTypeReader fails to explain why valid JCR names cause errors > ----------------------------------------------------------------------- > > Key: JCR-467 > URL: http://issues.apache.org/jira/browse/JCR-467 > Project: Jackrabbit > Type: Improvement > Components: nodetype > Versions: 1.0, 1.0.1 > Reporter: Brian Ewins > Assignee: Jukka Zitting > Priority: Minor > Fix For: 1.1 > > for example, you cannot use underscores in node type definitions: > [my:example_breaks2] > In fact only A-Z, a-z, 0-9, : are allowed, unless you quote the name. The error message you see when you make this mistake doesn't give any hint: > Missing ']' delimiter for end of node type name (nodetypes.cnd, line 8) > and the documentation on the website and the javadoc for CompactNodeTypeDefReader both just say: > * unquoted_string ::= ...a string... > ... not helpful. If you made this mistake, you end up needing to look at the source to figure out what you've done wrong. > A few suggested solutions: > - change the documentation to say unquoted string is '[A-Za-z0-9:]+' > - change the error message to mention the token causing the problem, eg: > if (!currentTokenEquals(Lexer.END_NODE_TYPE_NAME)) { > lexer.fail("Missing '" + Lexer.END_NODE_TYPE_NAME + "' delimiter for end of node type name, found " + currentToken); > } > - add "st.wordChars('_','_');" to the lexer, its probably going to be the most common cause, and doesnt conflict with other rules. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira