View Single Post
  #2 (permalink)  
Old March 28th, 2012, 11:26 AM
samjudson's Avatar
samjudson samjudson is offline
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Well you can load another XML document using the document() function.

http://www.w3schools.com/xsl/func_document.asp

Often when using multiple files you need to keep a reference to your original document handy as well.
Store the result in a variable, and the refer to it using normal XPath:

e.g.

Code:
<xsl:variable name="original" select="/"/>
<xsl:variable name="file2" select="document('file2.xml')"/>
<xsl:apply-templates select="$file2//ProductGroup[Id=$original//Product/Id]"/>
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
The Following User Says Thank You to samjudson For This Useful Post:
jonnyuk3 (March 29th, 2012)