Hi,

I'm just wondering if I've found a bug with the above method, or if I just don't understand the way it should work.

I have the following content type defined (stripped down a little):

<nodeType name="article" isMixin="false" hasOrderableChildNodes="true" primaryItemName=""> <childNodeDefinition name="*" defaultPrimaryType="paragraph" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false" sameNameSiblings="true" /> <childNodeDefinition name="*" defaultPrimaryType="attachment" autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false" sameNameSiblings="true" />
  </nodeType>

When i run the following code (where nt is the article NodeType):

NodeDefinition[] defs = (NodeDefinition[]) nt.getChildNodeDefinitions();
for (int i=0; i<defs.length; i++) {
    System.out.println(defs[i].getDefaultPrimaryType().getName());
}

I get:
attachment
attachment

rather than:
paragraph
attachment

Is this expected?

Many thanks in advance,

Digby

Reply via email to