title: XSL: How to change attribute X when attribute Y is 'A', B' or 'F'?
body: <p>I'm working with a XML requests whereby I need to change the attribute value of an element <em>if</em> another attribute value is equal to one or more values.  Xpath can't update the XML itself (so I understand) and I have been looking at XSL but it's quite complicated and I don't normally work in XML.</p>
  
  <p>This is a cut down version of the XML I'm working wth :</p>
  
  <pre><code>&lt;t6:Catalogue xmlns:t6="http://xxx.yy.com"&gt;
      &lt;t6:Items&gt;
          &lt;t6:Item /&gt;
          &lt;t6:Item /&gt;
          &lt;t6:Item /&gt;
      &lt;/t6:Items&gt;
      &lt;t6:Mappings&gt;
          &lt;t6:Mapping action="ADD_NEW" type="MAP"&gt;&lt;/t6:Mapping&gt;
          &lt;t6:Mapping action="ADD_NEW" type="FOO"&gt;&lt;/t6:Mapping&gt;
          &lt;t6:Mapping action="ADD_NEW" type="CAR"&gt;&lt;/t6:Mapping&gt;
          &lt;t6:Mapping action="ADD_NEW" type="PLANE"&gt;&lt;/t6:Mapping&gt;
          &lt;t6:Mapping action="ADD_NEW" type="MAP"&gt;&lt;/t6:Mapping&gt;
      &lt;/t6:Mappings&gt;
  &lt;/t6:Catalogue&gt;
  </code></pre>
  
  <p>I need to change the action from ADD_NEW to UPDATE_OLD in the Mappings block if type equals PLANE or CAR.</p>
  
  <p>I have been looking at peoples' other examples of XSL and trying to wrap my head around how to start it but cannot.  The tool I am using supports XSL and has a custom piece of software where I can drop an XSL template into it and it will apply it to the XML message I specify.  </p>
  
  <p>But I'm not sure where to start -- at risk of sounding like, "Please do my work for me, SO users", if someone could give me at least a starting point of how I first point to my structure and then how to change a value IF x = y.</p>
  
  <p>Thanks everyone.</p>