title: How do I use BizTalk factoid to process this value
body: <p>I have inherited a BizTalk application that takes input from a Dynamics CRM change event and uses Inline XSLT in a map.</p>
  
  <p>I am using VS 2013 and using Test Map (where you right click the map in Visual Studio).</p>
  
  <p>I have this input:</p>
  
  <pre><code>&lt;ns0:DynamicsChangeMessage xmlns:ns0="http://XXXXXX"&gt;
  &lt;ns0:entity&gt;entity_0&lt;/ns0:entity&gt;
  &lt;ns0:operation&gt;operation_0&lt;/ns0:operation&gt;
  &lt;ns0:userId&gt;userId_0&lt;/ns0:userId&gt;
  &lt;ns0:Changes&gt;
     &lt;ns0:Change&gt;
        &lt;ns0:Key&gt;gcs_universalcredit&lt;/ns0:Key&gt;
        &lt;ns0:Value&gt;true&lt;/ns0:Value&gt;
     &lt;/ns0:Change&gt;
  &lt;/ns0:Changes&gt;
  </code></pre>
  
  <p></p>
  
  <p>and I've added this to the existing XSLT:</p>
  
  <pre><code>&lt;xsl:choose&gt;
       &lt;xsl:when test="gcs_universalcredit = 'true'"&gt;
           &lt;UniversalCredit&gt;Yes&lt;/UniversalCredit&gt;
       &lt;/xsl:when&gt;
       &lt;xsl:otherwise&gt;
           &lt;UniversalCredit&gt;No&lt;/UniversalCredit&gt;
       &lt;/xsl:otherwise&gt;
  &lt;/xsl:choose&gt;
  </code></pre>
  
  <p>I get this output:</p>
  
  <pre><code>&lt;ns3:Person mlns:ns3="http://XXXXXX/Schemas/Canonical/Person/1.0" 
  xmlns:ns1="http://XXXXXX/Schemas/Canonical/Person/1.0"
  xmlns:ns4="http://XXXXXX/Schemas/Canonical/Address/1.0"
  xmlns:ns2="http://XXXXXX/Schemas/Canonical/PersonRecord/1.0"
  xmlns:ns0="http://XXXXXX/Schemas/Canonical/ProcessHeader/1.0"&gt;
  &lt;ProcessHeader&gt;
     &lt;Source&gt;DynamicsOnline&lt;/Source&gt;
     &lt;ProcessName&gt;ChangeProcessing&lt;/ProcessName&gt;
     &lt;ProcessType&gt;Update&lt;/ProcessType&gt;
     &lt;ResubmissionCount&gt;0&lt;/ResubmissionCount&gt;
     &lt;TrackingId&gt;3920dcdc-99e5-44c7-bd7a-d0039e60f235&lt;/TrackingId&gt;
  &lt;/ProcessHeader&gt;
     &lt;PersonType&gt;
         &lt;ADUserId&gt;NotApplicable&lt;/ADUserId&gt;
         &lt;TypeOfPerson&gt;Tenant&lt;/TypeOfPerson&gt;
     &lt;/PersonType&gt;
     &lt;PersonRecord&gt;
         &lt;UniversalCredit&gt;No&lt;/UniversalCredit&gt;
     &lt;/PersonRecord&gt;
  </code></pre>
  
  <p></p>
  
  <p>I've looked at the web and tried a variety of expressions for </p>
  
  <pre><code>&lt;xsl:when test="gcs_universalcredit = 'true'"&gt;
  </code></pre>
  
  <p>but I always get </p>
  
  <pre><code>&lt;UniversalCredit&gt;No&lt;/UniversalCredit&gt;
  </code></pre>
  
  <p>and never Yes.</p>
  
  <p>What am I doing wrong?</p>