-
1. Re: Custom Node Definitions w/o namespace
elvisisking Jun 2, 2017 9:18 AM (in response to dharrison)Hi David,
Yes you can define node properties without a namespace in your CNDs. Properties defined like this are said to have the default namespace. The default namespace is also called the "empty" namespace. For properties that have the default namespace, org.modeshape.jcr.AbstractJcrProperty.getNamespaceURI() will return the empty string (never null). Keep in mind, even though you might define all your properties to not have a namespace, your nodes may still have inherited properties that do have namespaces. For instance, all nodes have the jcr:primaryType property.
Namespaced properties is a way to organize your properties into logical groups. This could help you when querying as you could search for nodes with specific namespace(s). Also, namespaces allow properties to have the same local part. Here's an example:
[a:myNode]
- a:value (string)
- b:value (string)
Hth,
Dan