Connecting Tech Pros Worldwide Help | Site Map

Re: Merge 2 XML into one

  #1  
Old September 16th, 2008, 06:15 PM
fj
Guest
 
Posts: n/a
Thanks Martin.
I am still get stuck in one thing... I am using the xslt in my code. So
these two source xml documents will be represented as variables in my code,
such as XmlDocument in .net.

How can I pull in the second xml into the xslt template?

-fj


  #2  
Old September 17th, 2008, 11:55 AM
Martin Honnen
Guest
 
Posts: n/a

re: Re: Merge 2 XML into one


fj wrote:
Quote:
I am still get stuck in one thing... I am using the xslt in my code. So
these two source xml documents will be represented as variables in my code,
such as XmlDocument in .net.
>
How can I pull in the second xml into the xslt template?
Use an XsltArgumentList and call
XsltArgumentList xsltArgs = new XsltArgumentList();
xsltArgs.AddParam("paramName", "", yourXmlDocument)
on it, the pass that XsltArgumentList to the Transform method (as the
second argument usually).
In your stylesheet you need
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

<xsl:param name="paramName"/>

<xsl:variable name="products"
select="$paramName/Products/Product"/>


--

Martin Honnen
http://JavaScript.FAQTs.com/
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to cram into one DataGrid results from more than 1 queries? antonyliu2002@yahoo.com answers 5 January 25th, 2006 08:55 PM
How to serialize two different objects into one XML file ALI-R answers 1 November 16th, 2005 03:30 PM
XML transfrom: merge 2 or more different XML file into one Jacinle Young answers 3 July 20th, 2005 08:27 AM
merging 2 xml into 1 Mael Guillemot answers 1 July 20th, 2005 06:48 AM