A compact node type definition is used by JCR (Jackrabbit) to define the possibilities of a JCR node.
The CND is sufficient for using the Hippo JCR repository. Only if you want to use the CMS, which is a GUI to the Hippo JCR repository, you need additional node type definitions, which can be found in the repository under one of the CMS namespace nodes under the hippo:namespaces node.
The complete specification of the compact node type definition of JCR (Jackrabbit) can be found at http://jackrabbit.apache.org/node-type-notation.html.
The CND itself can not be found in the repository, but can be
exported from the web console.
The node type definition defines which items (child nodes and properties) a node
may or must have and of which type. It also defines if multiple values of the
item are allowed. Node type definitions can inherit from other node type
definitions.
The syntax of a CND document is a very compact one, not XML.
A node type name consists of a namespace and a local name. Just like with XML, the namespace is identified by a URL that is supposed to unique in the whole world. Without some environment (like a CND), the namespace is identified by the much shorter namespace prefix. The namespace prefix is coupled to the namespace URL by a namespace declaration at the top of a CND document. Several namespace can be declared. All namespaces of which a prefix is used have to be declared.
Below, you see a simple example of a CND.
Of course, more node types can be defined in a single CND file. Child nodes may be of a type defined in the same namespace. Note that in a CND file the definition of a note type has to come before any use of the node type. The CND specification says: 'Namespace prefixes referenced in a node type definition block must be declared in a preceding namespace declaration block.'
CND's can contain more rules. It is for example possible to define:
Hippo Europe: +31 (0)20 5224466
Hippo North America: +1 (707) 773-4646
© 1999-2010 Hippo B.V., All Rights Reserved