title: Dynamic path in document function()
body: <p>The XML file name is specific but I need to build a dynamic path.  I have tried using a variable to build the path but it didn't work:   </p>
  
  <pre><code>&lt;xsl:variable name="path"&gt;
     ...conditional code
  &lt;/xsl:variable&gt;     &lt;xsl:value-of select="document('myXML.xml')/worksheets/$path"/&gt; 
  </code></pre>
  
  <p>2.0 solutions ok.  </p>