jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angela (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1360) Parsing built-in CND and XML nodetypes does not result in equal nt-definitions
Date Thu, 07 Feb 2008 12:50:10 GMT

    [ https://issues.apache.org/jira/browse/JCR-1360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566574#action_12566574
] 

angela commented on JCR-1360:
-----------------------------

> fine. i will open an jsr 283 issue for that. 

Done... #421

> ... what makes me feel uneasy ...

Ok. I tried some more things...

>From what i've seen and if i'm not totally mistaken:

Registering a nodetype definition similar to those that were unequal in my original test (i.e.
those not specifying nt:base as supertype but defining some other (mixin) supertype) would
fail with the following exception:

org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException: 
all primary node types except nt:base itself must be (directly or indirectly) derived from
nt:base.

So, it seems to me, that we have an issue here... or at least contradictions.
Am I missing something?

angela



> Parsing built-in CND and XML nodetypes does not result in equal nt-definitions
> ------------------------------------------------------------------------------
>
>                 Key: JCR-1360
>                 URL: https://issues.apache.org/jira/browse/JCR-1360
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>            Reporter: angela
>            Priority: Trivial
>         Attachments: 1360.patch
>
>
> i created a test in order to make sure builtin-nodetypes.xml and builtin-nodetypes.cnd
provide the same definitions (actually i only wanted to test my own changes).
> it reveals that the existing built-in NodeTypeDefinitions are not equal due to the following
reason:
> - in the xml-format nt:base is always specified if no other super type extends from nt:base
> - in the cnd notation the nt:base is omitted (see below for quote from appendix of jsr
283) even if other super type(s) are
>   defined and none of them extends from nt:base.
> this affects the following nodetypes (all extending from mix:referenceable only):
> nt:versionHistory
> nt:version
> nt:frozenNode
> nt:resource
> quote from public-review of jsr 283:
> "7.2.2.4 Supertypes [...]
> After the node type name comes the optional list of supertypes. If this element is not
present and the node type is not a mixin (see 7.2.2.5 Options), then a supertype of nt:base
is assumed."
> I'm not totally sure, if according to the quote above the built-in cnd-definitions are
valid at all. since it states, that the nt:base is assumed if no other super type is defined.
In the case of the node types above, mix:referenceable is defined to be the only super type,
which is not totally true... the non-mixin types are always sub types of nt:base.
> In either case: From my understanding the node types resulting from parsing the xml and
the cnd file should be equal.
> If the definitions are valid, we may need to adjust the CompactNodeTypeDefReader.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message