You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by David Buchmann <da...@liip.ch> on 2013/03/27 02:42:09 UTC
cnd and multiple
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi,
while writing the cnd parser for phpcr, i stumbled over a strange
problem. after it seemed to work, i tried to parse the jackrabbit
builtin_nodetypes.cnd [1] because it is big so i hoped to find bugs. i
found some and fixed them, but now i am stuck.
there is this definition for rep:Group that has a "multiple"
declaration for a rep:members child node. and the same issue on
rep:Members.
from the cnd documentation and also reading the jackrabbit reader [2]
i don't see how this can be valid. is this a bug? is this file never
parsed by jackrabbit? or do you use a different parser that adds this
behaviour?
the nodes look like this:
[rep:Group] > rep:Authorizable
+ rep:members (rep:Members) = rep:Members multiple protected VERSION
- rep:members (WEAKREFERENCE) protected multiple < 'rep:Authorizable'
(this is also an example of having a child node and a property with
the same name, btw.)
[rep:Members]
orderable
+ * (rep:Members) = rep:Members protected multiple
- * (WEAKREFERENCE) protected < 'rep:Authorizable'
would be glad for any input what this means.
thanks,
david
[1]
http://svn.apache.org/viewvc/jackrabbit/branches/2.6/jackrabbit-core/src/main/resources/org/apache/jackrabbit/core/nodetype/builtin_nodetypes.cnd?revision=1437333&view=co
[2]
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/cnd/CompactNodeTypeDefReader.java
- --
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJRUk5tAAoJED/JtliXIA4s7asH/1wgx4Z536kf9np45WFTiILE
088XN+pc5XcEq3pZF9S5c/sDw07dWXmAausBmDKAsApJ3L+Nocpb4lPG3p54gJ6J
Zr1QXExZXnXIHqQiD6S6iQdvW/8I0jmu7hrPho/OP7aHNdEOCKMFNgK7qxB62RAR
NQPAJsuwLsogZ+YMN7BBnzDkCl5Brr1LP+YTtX26bW4BTsBu1aH3YRDyAPS1ywSj
afT+e2GaIWn4WXPopPyHuknps/Vi12LSjWXlr8H+ME3/aK77+YM4GcneHfdVH7JK
DknuKkR6mC87TQLEMLH9p1EgOrAJ6Ec5OrFlO5icrZYJ+29komMFBPjJ78IhLp4=
=uRB0
-----END PGP SIGNATURE-----
Re: cnd and multiple
Posted by David Buchmann <da...@liip.ch>.
ah, ok then i understand.
thanks for the clarification. the php cnd parser is all ready :-)
cheers,david
Am 27.03.2013 05:40, schrieb Jukka Zitting:
> Hi,
>
> On Wed, Mar 27, 2013 at 3:42 AM, David Buchmann <da...@liip.ch> wrote:
>> i don't see how this can be valid. is this a bug? is this file never
>> parsed by jackrabbit? or do you use a different parser that adds this
>> behaviour?
>
> The trick here is that the parser allows "multiple" to be used as a
> synonym of "sns" in child node definitions, see [1]. It's a
> Jackrabbit-specific convention that dates back to before the CND
> format was included (and cleaned up) in the JCR spec.
>
> [1] https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/cnd/Lexer.java#L54
> [2] http://jackrabbit.apache.org/node-type-notation.html
>
> BR,
>
> Jukka Zitting
>
--
Liip AG // Agile Web Development // T +41 26 422 25 11
CH-1700 Fribourg // PGP 0xA581808B // www.liip.ch
Re: cnd and multiple
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Wed, Mar 27, 2013 at 3:42 AM, David Buchmann <da...@liip.ch> wrote:
> i don't see how this can be valid. is this a bug? is this file never
> parsed by jackrabbit? or do you use a different parser that adds this
> behaviour?
The trick here is that the parser allows "multiple" to be used as a
synonym of "sns" in child node definitions, see [1]. It's a
Jackrabbit-specific convention that dates back to before the CND
format was included (and cleaned up) in the JCR spec.
[1] https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/cnd/Lexer.java#L54
[2] http://jackrabbit.apache.org/node-type-notation.html
BR,
Jukka Zitting