} else if (xmlMapping instanceof FragmentMapping) {
mappingNodeValue = new XMLFragmentMappingNodeValue((FragmentMapping)xmlMapping);
} else if (xmlMapping instanceof FragmentCollectionMapping) {
mappingNodeValue = new XMLFragmentCollectionMappingNodeValue((FragmentCollectionMapping)xmlMapping);
} else if (xmlMapping instanceof CollectionReferenceMapping) {
CollectionReferenceMapping xmlColMapping = (CollectionReferenceMapping)xmlMapping;
List fields = xmlColMapping.getFields();
Field xmlColMappingField = (Field) xmlColMapping.getField();
XPathNode branchNode;
if(null == xmlColMappingField) {
if(fields.size() > 1 && !xmlColMapping.usesSingleNode()) {
addChild(XPathFragment.SELF_FRAGMENT, new XMLCollectionReferenceMappingMarshalNodeValue(xmlColMapping), xmlDescriptor.getNamespaceResolver());
}
branchNode = rootXPathNode;
} else {
branchNode = addChild(((Field) xmlColMapping.getField()).getXPathFragment(), new XMLCollectionReferenceMappingMarshalNodeValue(xmlColMapping), xmlDescriptor.getNamespaceResolver());
}
int containerIndex = -1;
for (int i = 0, size = fields.size(); i < size; i++) {
Field xmlFld = (Field)fields.get(i);