title: xslt efficient selector usage
body: <p>One of xslt stylesheets i have created has many usages of for example</p>
  
  <pre><code>&lt;xsl:template match="ProductType"&gt;
   &lt;xsl:value-of select="../../Title"/&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>so my question is would it be more efficient to create a new nodeset manualy including just the data required or perhaps passing in using params?</p>
  
  <p>What would constitute best practice for this case?</p>
  
  <p>the xml would be in the form as below</p>
  
  <pre><code>&lt;product&gt;
  &lt;title&gt;the title&lt;/title&gt;
  &lt;tags&gt;
  &lt;producttype&gt;the product type&lt;/producttype&gt;
  &lt;tags&gt;
  &lt;/product&gt;
  </code></pre>
  
  <p>the actuall template match is as follows</p>
  
  <pre><code>&lt;xsl:template match="ProductType" xml:space="default"&gt;
        &lt;xsl:param name="by" select="by"/&gt;            
        &lt;xsl:choose&gt;
              &lt;xsl:when test="current()='Karaoke MP3+G'"&gt;
                    &lt;div class="product-subhead"&gt;
                          &lt;h3&gt;Karaoke Song&lt;/h3&gt;
                          &lt;h3 class="middle"&gt;MP3+G&lt;/h3&gt;
                          &lt;h3&gt;100% Legal Download&lt;/h3&gt;
                    &lt;/div&gt;
                    The track &lt;xsl:value-of select="../../Title"/&gt; is 100% legally covered by MCPS and PPL ensuring the artist &lt;xsl:value-of select="../../Attribution"/&gt; is paid royalties for every sale! Each karaoke track download from Mastermix Digital contains audio and graphics prompts. The song is provided in MP3+G format. Purchase is available through Paypal with all major credit cards.
              &lt;/xsl:when&gt; 
              &lt;xsl:when test="current()='Track'"&gt;
                    &lt;div class="product-subhead"&gt;
                                &lt;h3&gt;Original Version&lt;/h3&gt;
                                &lt;h3 class="middle"&gt;Available in 320kbps MP3 and WAV&lt;/h3&gt;
                                &lt;h3&gt;100% Legal Download&lt;/h3&gt;
                          &lt;/div&gt;
                          The track &lt;xsl:value-of select="../../Title"/&gt; is 100% legally covered by MCPS and PPL ensuring the artist &lt;xsl:value-of select="../../Attribution"/&gt; is paid royalties for every sale! Each track download from Mastermix Digital is the original artist version and a guaranteed dancefloor filler! The audio is provided in high quality 320kbps mp3 format. Purchase is available through Paypal with all major credit cards.                        
              &lt;/xsl:when&gt;
              &lt;xsl:when test="current()='Extended Floorfillers'"&gt;
                    &lt;div class="product-subhead"&gt;
                                &lt;h3&gt;Extended Version&lt;/h3&gt;
                                &lt;h3 class="middle"&gt;Available in 320kbps MP3 and WAV&lt;/h3&gt;
                                &lt;h3 class="phead3"&gt;100% Legal Download&lt;/h3&gt;
                          &lt;/div&gt;
                          Each extended floorfiller download from Mastermix Digital contains the original artist version mixed to be just that little bit longer! &lt;xsl:value-of select="../../Title"/&gt; is 100% legally covered by MCPS and PPL ensuring the artist &lt;xsl:value-of select="../../Attribution"/&gt; is paid royalties for every sale. The audio is provided in high quality 320kbps mp3 format. Purchase is available through Paypal with all major credit cards.
              &lt;/xsl:when&gt;
              &lt;xsl:otherwise&gt;                        
                    &lt;xsl:value-of select="."/&gt;
              &lt;/xsl:otherwise&gt; 
        &lt;/xsl:choose&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>and a copy of xml is as below</p>
  
  <pre><code>  &lt;Tracks&gt;
      &lt;Track AlbumArtURL="http://api.3.esh-partner.net/GetThumbnail.ashx?ID=07167B09-6365-4908-BFE6-811039D62D5E" IsBundle="true"&gt;
        &lt;ReportingCode&gt;MG00089531&lt;/ReportingCode&gt;
        &lt;Title Language="en-gb"&gt;Complete Number Ones Collection&lt;/Title&gt;
        &lt;ExtendedTitle&gt;Every UK No 1 in one download&lt;/ExtendedTitle&gt;
        &lt;ExplicitContent&gt;false&lt;/ExplicitContent&gt;
        &lt;Attribution&gt;Various Artists&lt;/Attribution&gt;
        &lt;Duration Seconds="0"&gt;00:00:00&lt;/Duration&gt;
        &lt;GRid&gt;A1-0327D-MG00089531-J&lt;/GRid&gt;
        &lt;CatalogNr&gt;MFEG090&lt;/CatalogNr&gt;
        &lt;OriginalReleaseFormat&gt;CD&lt;/OriginalReleaseFormat&gt;
        &lt;OriginalReleaseDate&gt;2009-08-04&lt;/OriginalReleaseDate&gt;
        &lt;ReleaseDate&gt;2009-08-04&lt;/ReleaseDate&gt;
        &lt;Description Language="en-gb"&gt;
          &lt;Long&gt;One amazing collection! This download contains every single number 1 from the Official UK charts, since the charts began back in 1952 right up to the present day (not including the last 2 months)! That's more than 1,000 tracks, all in 320 KBPS (the highest quality, indistinguishable from quality you would get from a CD). 
  Save over £600 compared by buying every download individually!&lt;/Long&gt;
        &lt;/Description&gt;      
        &lt;Tags&gt;
              &lt;ProductType&gt;Track&lt;/ProductType&gt;
        &lt;/Tags&gt;
        &lt;Attributes&gt;
          &lt;Attribute Type="Text" Description="PriceCode"&gt;AA&lt;/Attribute&gt;
          &lt;Attribute Type="LookupValue" Description="Category"&gt;MasterMix&lt;/Attribute&gt;
        &lt;/Attributes&gt;
        &lt;Contributors /&gt;
        &lt;PriceBand&gt;Mid/Front Premium&lt;/PriceBand&gt;
        &lt;RecompilationRights&gt;Yes&lt;/RecompilationRights&gt;
      &lt;/Track&gt;
    &lt;/Tracks&gt;
  </code></pre>