jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hsp" <piccina...@ibest.com.br>
Subject CND x XML compatibility for custom node definition.
Date Thu, 27 Apr 2006 20:41:29 GMT
In the following xml definition:
<nodeType name="xxx:base" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
	<propertyDefinition name="prop:creator" requiredType="Reference" autoCreated="false" mandatory="false"
onParentVersion="VERSION" protected="false" multiple="false" >
	<childNodeDefinition name="Permission" defaultPrimaryType="xxx:security" autoCreated="true"
mandatory="false" onParentVersion="VERSION" protected="false" sameNameSiblings="false">

I defined that the prop:creator is a property that may only refers to a node of type xxx:user
(restriction), and a node with the name "Permission" of type xxx:security will autocreate
with the creation of the node of type xxx:base. Registering this file, the repository works
as expected.

I have defined the same structure in a file with the cnd format, so the file is like this:
[xxx:base] > nt:hierarchyNode
  - prop:creatir (reference)
    < 'xxx:user'
  + Permission (xxx:security)
    = xxx:security
    autocreated version
[xxx:user] > nt:hierarchyNode
[xxx:security] > nt:hierarchyNode

Why when trying to register the nodetype, it gets me two errors ?:
1 - About to the restriction for the value in the prop:creator only may refers to xxx:user:
javax.jcr.RepositoryException: [{http://www.e/1.0}base#{http://www.e/1.0}creator] invalid
REFERENCE value constraint '{http://www.e/1.0}user' (unknown node type)

2 - About the name the node will autocreate, if I keep like "Permission" it says me that the
name is invalid for jcr, it must be "xxx:Permission".

How to do the register in cnd format recognize all I declared like I did in xml format? I
thought the cnd format has all the parameters that xml format has.

View raw message