In the following xml definition:
<nodeType name="xxx:base" isMixin="false" hasOrderableChildNodes="false" 
primaryItemName="">
        <supertypes>
                <supertype>nt:hierarchyNode</supertype>
        </supertypes>
        <propertyDefinition name="prop:creator" requiredType="Reference" 
autoCreated="false" mandatory="false" onParentVersion="VERSION" 
protected="false" multiple="false" >
                <valueConstraints>
                        <valueConstraint>xxx:user</valueConstraint>
                </valueConstraints>
        </propertyDefinition>
        <childNodeDefinition name="Permission" 
defaultPrimaryType="xxx:security" autoCreated="true" mandatory="false" 
onParentVersion="VERSION" protected="false" sameNameSiblings="false">
                <requiredPrimaryTypes>
                        <requiredPrimaryType>xxx:security</requiredPrimaryType>
                </requiredPrimaryTypes>
        </childNodeDefinition>
</nodeType>

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='http://www.e/1.0'>
<prop='http://www.p/1.0'>
[xxx:base] > nt:hierarchyNode
  - prop:creatir (reference)
    version
    < '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.
Helio

Reply via email to