title: need to replace map with variable value
body: <p>I have xslt and below code works fine, however I need to replace &quot;map{&quot;abc&quot;: &quot;yes&quot;,&quot;dDEF&quot;: &quot;Yes&quot;,&quot;RMT&quot;: &quot;dsfdf&quot;,&quot;PPAS&quot;: &quot;Yes&quot;,&quot;UNITE&quot;: &quot;Yes&quot;}&quot;  with variable</p>
  <pre><code>&lt;xsl:variable name=&quot;var_res&quot;&gt;
          &lt;xsl:value-of select='map:for-each(map{&quot;abc&quot;: &quot;yes&quot;,&quot;dDEF&quot;: &quot;Yes&quot;,&quot;RMT&quot;: &quot;dsfdf&quot;,&quot;PPAS&quot;: &quot;Yes&quot;,&quot;UNITE&quot;: &quot;Yes&quot;}, function($k, $v){ 
            {
              if($v!=&quot;Yes&quot; and $v!=&quot;No&quot;)
              then $k else &quot;&quot;})' /&gt;             
          &lt;/xsl:variable&gt;  
  </code></pre>
  <p>as below :</p>
  <pre><code>        &lt;xsl:variable name=&quot;var_mapValue&quot; &gt;
              &lt;xsl:value-of select=&quot;/root/input/collective_barg&quot;&gt;&lt;/xsl:value-of&gt;
              
          &lt;/xsl:variable&gt;
  
  
  
        &lt;xsl:variable name=&quot;var_res&quot;&gt;
          &lt;xsl:value-of select='map:for-each(map(var_mapValue)}, function($k, $v){ 
            {
              if($v!=&quot;Yes&quot; and $v!=&quot;No&quot;)
              then $k else &quot;&quot;})' /&gt;             
          &lt;/xsl:variable&gt;  
  </code></pre>
  <p>map(var_mapValue) doesn't work not sure what is missing here</p>
  <p>and my input xml</p>
  <pre><code> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;root&gt;
  &lt;input&gt;
  &lt;collective_barg&gt;
  {&quot;abc&quot;: &quot;yes&quot;,&quot;dDEF&quot;: &quot;Yes&quot;,&quot;RMT&quot;: &quot;dsfdf&quot;,&quot;PPAS&quot;: &quot;Yes&quot;,&quot;UNITE&quot;: 
  &quot;Yes&quot;}
  &lt;/collective_barg&gt;
  &lt;/input&gt;
  &lt;/root&gt;
  </code></pre>