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

combining 2 different XML files within the same XSLT

Subject: combining 2 different XML files within the same XSLT
From: "todd binder" <todd_binder@xxxxxxxxxxx>
Date: Tue, 27 Aug 2002 12:32:54 -0400
xslt combine xml files
I have 2 different XML files that have different node structure, but similar
information (both contain date related information)

I am trying to create a NEW list of XML nodes from either file that meet a
certain criteria.

EXAMPLE FILE 1

<events>
<event id='1'>
    <date>20020812</date>
    <name>event1</name>
    <fullname>big time event</fullname>
</event>
<event id='2'>
    <date>20020813</date>
    <name>event2</name>
    <fullname>mid time event</fullname>
</event>
<event id='3'>
    <date>20020815</date>
    <name>event3</name>
    <fullname>small time event</fullname>
</event>
</events>

EXAMPLE FILE 2
<games>
<game id='1'>
    <date>20020813</date>
    <name>game1</name>
    <opponent>team b</opponent>
    <time>14:00</time>
</game>
<game id='2'>
    <date>20020818</date>
    <name>game2</name>
    <opponent>team c</opponent>
    <time>12:00</time>
</game>
</games>

is there a way with a single XSLT file to get all the nodes from each file
that meet a certain criteria and put their information into a new XML node
structure?

EXAMPLE COMBINED CREATED NODELIST (criteria: date between 20020814 and
20020821)

<apps>
<app type="event" id="3">
    <date>20020815</date>
    <name>event3</name>
    <fullname>small time event</fullname>
</app>
<app type="game" id="2">
    <date>20020818</date>
    <name>game2</name>
    <opponent>team c</opponent>
    <time>12:00</time>
</app>
</apps>

this nodelist could then be sorted and displayed (the display XSLT routine
would handle the different @type nodes [game / event] so that even though
there would be different information (ie. fullname, opponent, time) the
combined list could be sorted and displayed

but I can't figure how to create this COMBINED LIST within the XSLT file

- Todd

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.