title: XSLT, xsltproc parameters
body: <p>So, what I want to be able to do, is query an XML file using xsltproc, passing in a parameter for the NAME of the server.  This name is contained within the XML document.  I want to pull the username and password from this file.</p>
  
  <p>So, the Name is a sibling of the User and Pass.  I don't use XSLT or XPath or XQuery all that often (this is the second time in 19 years now).  I'm just lost on how to pull the data from the XML file from the stylesheet.</p>
  
  <p>Here's what I'm passing in from the CLI (I think it's right):<br>
   <code>xsltproc --stringparam site_name "'site2'" style.xsl source.xml</code></p>
  
  <p>Here's the XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="yes" ?&gt;
  &lt;Container&gt;
      &lt;Servers&gt;
          &lt;Folder expanded="1"&gt;
              &lt;Server&gt;
                  &lt;User&gt;username1&lt;/User&gt;
                  &lt;Pass&gt;password1&lt;/Pass&gt;
                  &lt;Name&gt;Site1&lt;/Name&gt;
              &lt;/Server&gt;
              &lt;Server&gt;
                  &lt;User&gt;username2&lt;/User&gt;
                  &lt;Pass&gt;password2&lt;/Pass&gt;
                  &lt;Name&gt;Site2&lt;/Name&gt;
              &lt;/Server&gt;
          &lt;/Folder&gt;
          &lt;Server&gt;
              &lt;User&gt;username3&lt;/User&gt;
              &lt;Pass&gt;password3&lt;/Pass&gt;
              &lt;Name&gt;Site3&lt;/Name&gt;
          &lt;/Server&gt;
          &lt;Server&gt;
              &lt;User&gt;username4&lt;/User&gt;
              &lt;Pass&gt;password4&lt;/Pass&gt;
              &lt;Name&gt;Site4&lt;/Name&gt;
          &lt;/Server&gt;
      &lt;/Servers&gt;
  &lt;/Container&gt;
  </code></pre>
  
  <p>Here's my current XSLT Stylesheet</p>
  
  <pre><code>&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"&gt;
    &lt;xsl:param name="site_name"&gt;Site1&lt;/xsl:param&gt;
    &lt;xsl:output method="text"/&gt;
    &lt;xsl:template match="//Servers"&gt;
      &lt;xsl:value-of select="//Server/Name"/&gt;
    &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>