CMElementDeclaration ed = getDeclaration();
CMNamedNodeMap attrMap = null;
if (ed != null) {
attrMap = ed.getAttributes();
CMNamedNodeMapImpl allAttributes = new CMNamedNodeMapImpl(attrMap);
ModelQuery modelQuery = ModelQueryUtil.getModelQuery(fNode.getOwnerDocument());
if(modelQuery != null) {
List nodes = modelQuery.getAvailableContent((Element) fNode, ed, ModelQuery.INCLUDE_ATTRIBUTES);
for (int k = 0; k < nodes.size(); k++) {
CMNode cmnode = (CMNode) nodes.get(k);
if (cmnode.getNodeType() == CMNode.ATTRIBUTE_DECLARATION) {
allAttributes.put(cmnode);
}