title: xslt transform multiple data sources
body: <p>I am trying to transform 2 data sources coming from sql stored procedures.  </p>
  
  <p>Is there any way to use the xsl document() function to combine the two sources into something that one xsl:template can use?  Here's the stored procedure calls:</p>
  
  <pre><code>&lt;query name="Products" rowElementName="Product" runif="showproduct"&gt;
  &lt;sql&gt;
  &lt;![CDATA[
  exec dbo.BSI_ProductInfo @ProductID, @CustomerLevelID, 1, 0, @affiliateID
  ]]&gt;
  &lt;/sql&gt;
  &lt;queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" /&gt;
  &lt;queryparam paramname="@CustomerLevelID" paramtype="runtime" requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" /&gt;
  &lt;queryparam paramname="@affiliateID"     paramtype="system"  requestparamname="AffiliateID"     sqlDataType="int" defvalue="0"  validationpattern="" /&gt;
  &lt;/query&gt;
  
  &lt;query name="Features" rowElementName="Feature" runif="showproduct"&gt;
  &lt;sql&gt;
  &lt;![CDATA[ exec dbo.BSI_GetProductCategories @ProductID ]]&gt;
  &lt;/sql&gt;
  &lt;queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" /&gt;
  &lt;/query&gt;
  </code></pre>
  
  <p>My template calls the "product" data first like so:</p>
  
  <pre><code>&lt;xsl:template match="Product"&gt;
  </code></pre>
  
  <p>Now, how can I get the data from the 'Feature" call into the Product dataset?  Something like:</p>
  
  <pre><code> &lt;xsl:variable name="feats" select="document(Features)" /&gt;
   &lt;xsl:value-of select="$feats/Feature" /&gt;
  </code></pre>
  
  <p>Thanks bunches!</p>