title: how to use parameter in xsl?
body: <p>I have a simple xsl file:</p>
  
  <pre><code>        &lt;xsl:for-each select="part"&gt;
              &lt;div class="part"&gt;
              &lt;h2&gt;Part Name:&lt;xsl:value-of select="@partName" /&gt;&lt;/h2&gt;
              &lt;xsl:for-each select="input"&gt;
                  &lt;p&gt;
                  &lt;input&gt;
                      &lt;xsl:attribute name="value"&gt;
                          &lt;xsl:value-of select="." /&gt;
                      &lt;/xsl:attribute&gt;
                      &lt;xsl:attribute name="name"&gt;&lt;xsl:value-of select="@inputName" /&gt;&lt;/xsl:attribute&gt;
                  &lt;/input&gt;
                  &lt;/p&gt;
              &lt;/xsl:for-each&gt;
  
              &lt;/div&gt;
          &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>I want to save partname and use it latter. I tried as the following:</p>
  
  <pre><code>           &lt;xsl:for-each select="part"&gt;
                  &lt;div class="part"&gt;
                  &lt;h2&gt;Part Name:&lt;xsl:value-of select="@partName" /&gt;&lt;/h2&gt;
  **&lt;xsl:param name="part_name"&gt;&lt;xsl:value-of select="@partName" /&gt;&lt;/xsl:param&gt;**
                  &lt;xsl:for-each select="input"&gt;
                      &lt;p&gt;
                      &lt;input&gt;
                          &lt;xsl:attribute name="value"&gt;
                              &lt;xsl:value-of select="." /&gt;
                          &lt;/xsl:attribute&gt;
                          &lt;xsl:attribute name="name"&gt;**&lt;xsl:value-of select="$part_name" /&gt;**-&lt;xsl:value-of select="@inputName" /&gt;&lt;/xsl:attribute&gt;
                      &lt;/input&gt;
                      &lt;/p&gt;
                  &lt;/xsl:for-each&gt;
  
              &lt;/div&gt;
              &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>but it doesn't work. I don't know what should do.</p>