title: How to get a string from an XSL 3.0 Map
body: <p>I have an XSL Map</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;!DOCTYPE stylesheet&gt;
  &lt;xsl:stylesheet version=&quot;3.0&quot; 
      xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; 
      xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot; 
      xmlns:functx=&quot;http://www.functx.com&quot;  
      xmlns:map=&quot;http://www.w3.org/2005/xpath-functions/map&quot;&gt;
      
      &lt;xsl:param name=&quot;settings&quot; select=&quot;'https://testurl.com' ||  '/_resources/includes/settings.xml'&quot;/&gt;
      
      &lt;xsl:template name=&quot;sidenav&quot;&gt;
          &lt;map key=&quot;style&quot; xmlns=&quot;http://www.w3.org/2005/xpath-functions&quot;&gt;
              &lt;xsl:choose&gt;
                  &lt;xsl:when test=&quot;doc-available($settings)&quot;&gt;
                      &lt;string key=&quot;navcss&quot; select=&quot;doc($settings)/document/settings/ouc:div[@label='section-menu-type']&quot;/&gt;
                  &lt;/xsl:when&gt;
                  &lt;xsl:otherwise&gt;
                      &lt;string key=&quot;navcss&quot; select=&quot;$nav-css&quot;/&gt;
                  &lt;/xsl:otherwise&gt;
              &lt;/xsl:choose&gt;
          &lt;/map&gt;
          &quot;style&quot; : &lt;xsl:value-of select=&quot;map:get('style')('navcss')&quot;/&gt;
      &lt;/xsl:template&gt;
      &lt;xsl:call-template name=&quot;sidenav&quot;/&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  <p>When I try to get the value with the below code I get: &quot;Fatal Error: Unknown type map&quot;</p>
  <pre><code>&quot;style&quot; : &lt;xsl:value-of select=&quot;map:get('style')('navcss')&quot;/&gt;
  </code></pre>
  <p>If I substitute it with this:</p>
  <pre><code>&lt;xsl:variable name=&quot;map&quot; select=&quot;map {
      'navcss' : if(doc-available($settings)) then doc($settings)/document/settings/ouc:div[@label='section-menu-type'] else 'd3',            
  }&quot;/&gt;
  &lt;xsl:value-of select=&quot;map:get($map, 'navcss')&quot;/&gt;
  </code></pre>
  <p>I get the value.  My question is, can you create a map element and get its key similar to the map function, or do you just have to use the map xpath function?</p>