Community
Participate
Working Groups
For a multiplicity-many eAttribute attr of an instance of eClass class, with any number of entries above one, the following xpath expression ALWAYS results in 1, when it should provide the number of attribute nodes. This is due to the fact XML attributes only hold single values. Hence, the EMF model loader must implicitly transform from an attribute to a reference. <c:get select="count($instance/@attr)"/> This also means that iteration over the ignored nodes is not possible. Further, you can observe that the bug is in the model loader, as any <c:dump select="$instance"/> will only show the first value of attr, rather than the whole set. The patch below has been suggested, but does not help with this: <eStructuralFeatures xsi:type="ecore:EAttribute" name="attr" unique="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"> <!-- start of hack --!> <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData"> <details key="kind" value="element"/> </eAnnotations> <!-- end of heck --!> </eStructuralFeatures>