code: function(feature, node) {
          if (feature.state) {
              var state = null;
              switch(feature.state) {
                  case OpenLayers.State.UPDATE:
                      state = "modify";
                  case OpenLayers.State.DELETE:
                      state = "delete";
              }
              if (state) {
                  node.setAttribute("action", state);
              }
          }    
      }
docs: Method: setState
  OpenStreetMap has a convention that 'state' is stored for modification or deletion.
  This allows the file to be uploaded via JOSM or the bulk uploader tool.
  
  Parameters:
  feature - {<OpenLayers.Feature.Vector>}
  node - {DOMNode}