[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Work with two xmls and combine them using xsl

Subject: RE: Work with two xmls and combine them using xsl
From: sudheshna iyer <sudheshnaiyer@xxxxxxxxx>
Date: Wed, 14 May 2008 02:45:02 -0700 (PDT)
RE:  Work with two xmls and combine them using xsl
Thank you Mike.
--- Michael Kay <mike@xxxxxxxxxxxx> wrote:

> Your example documents aren't well-formed (no outer
> element) so you'll have
> to adapt this code. But try something like this:
> 
> <xsl:template match="/">
> <result>
>   <xsl:apply-templates select="* |
> document('Second.xml')/*"/>
> </result>
> </xsl:template> 
> 
> so when you process the document node of first.xml,
> it causes the outermost
> elements of both first.xml and second.xml to be
> processed.
> 
> Michael Kay
> http://www.saxonica.com/
> 
> > -----Original Message-----
> > From: sudheshna iyer
> [mailto:sudheshnaiyer@xxxxxxxxx] 
> > Sent: 14 May 2008 10:34
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject:  Work with two xmls and combine them
> using xsl
> > 
> > I have the feed from two different sources.I need
> to combine 
> > both of them and produce a common list.
> > 
> > 
> > How do I read from two xml files in xsl and
> produce the list 
> > of events?
> > For eg: 
> > 
> > First.xml
> > 
> > <?xml version=1.1>
> > <eventname>first-eve</eventname>
> > <eventtitle>first-title<eventtitle>
> > ..
> > 
> > Second.xml
> > <?xml version=1.1>
> > <eventname>second-eve</eventname>
> > <eventtitle>second-title<eventtitle>
> > ..
> > 
> > Now after applying xsl transformation of both of
> the above 
> > xmls, I should get:
> > 
> > EventName: 	first-eve
> > Event Title:	first-title
> > 
> > EventName: 	second-eve
> > Event Title:	second-title

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.