saveElementIDRef((EObject)value, entryFeature);
saveElementIDRef(o, (EObject)value, entryFeature);
  protected boolean saveElementFeatureMap(EObject o, EStructuralFeature f)  {    List values = (List)helper.getValue(o, f);    int size = values.size();    for (int i = 0; i < size; i++)    {      FeatureMap.Entry entry = (FeatureMap.Entry)values.get(i);      EStructuralFeature entryFeature = entry.getEStructuralFeature();      Object value = entry.getValue();      if (entryFeature instanceof EReference)      {        if (value == null)        {          saveNil(o, entryFeature);        }        else         {          EReference referenceEntryFeature = (EReference)entryFeature;          if (referenceEntryFeature.isContainment())          {            saveElement((EObject)value, entryFeature);          }          else if (referenceEntryFeature.isResolveProxies())          {            saveElementReference((EObject)value, entryFeature);          }          else          {            saveElementIDRef((EObject)value, entryFeature);          }        }      }      else      {        if (entryFeature == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_Text())        {          String svalue = value.toString();          if (escape != null)          {            svalue =  escape.convertText(svalue);          }                  if (!toDOM)          {                doc.addText(svalue);          }          else          {            currentNode.appendChild(document.createTextNode(svalue));            if (DEBUG_DOM)            {              System.out.println("-->"+currentNode.getLastChild()+"; feature: "+f.getName());            }          }        }        else if (entryFeature == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_CDATA())        {          String stringValue = value.toString();          if (escape != null)          {            stringValue = escape.convertLines(stringValue);          }          if (!toDOM)          {            doc.addCDATA(stringValue);          }          else          {            currentNode.appendChild(document.createCDATASection(stringValue));          }        }        else if (entryFeature == XMLTypePackage.eINSTANCE.getXMLTypeDocumentRoot_Comment())        {          String stringValue = value.toString();          if (escape != null)          {            stringValue = escape.convertLines(stringValue);          }          if (!toDOM)          {            doc.addComment(stringValue);          }          else          {            // TODO comments are not recorded            currentNode.appendChild(document.createComment(stringValue));          }        }        else        {          saveElement(o, value, entryFeature);        }      }    }    return size > 0;  }