title: Using If Else in XSLT
body: <p>I need to select a node if a condition is matched. I'm totally new in XSLT and tried to search for an answer but can't find a solution that works for me.
  I want to select an adres when there is an AddressType = 'Personal', if there's not an AddressType = Personal, check for 'Second', if not check for 'Office'.
  A normal If Else.
  I tried with  and  and this could work if only one type of AddressType would exist in the XML file. In my case there can be up too 11 addressTypes (in random order) in the XML file and I can only pass one through.</p>
  
  <p>This looks like my source XML:</p>
  
  <pre><code>&lt;Person&gt;
  &lt;address&gt;
  &lt;street&gt;&lt;/street
  &lt;number&gt;&lt;/number&gt;
  &lt;City&gt;&lt;/City&gt;
  &lt;AddressType&gt;Personal&lt;/AddressType&gt;
  &lt;/address&gt;
  &lt;address&gt;
  &lt;street&gt;&lt;/street
  &lt;number&gt;&lt;/number&gt;
  &lt;City&gt;&lt;/City&gt;
  &lt;AddressType&gt;Second&lt;/AddressType&gt;
  &lt;/address&gt;
  &lt;address&gt;
  &lt;street&gt;&lt;/street
  &lt;number&gt;&lt;/number&gt;
  &lt;City&gt;&lt;/City&gt;
  &lt;AddressType&gt;Office&lt;/AddressType&gt;
  &lt;/address&gt;
  &lt;/Person&gt;
  </code></pre>
  
  <p>Any advice? thank you</p>