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

Re: How to transform multiple XML docs with XSLT 2.0 i

Subject: Re: How to transform multiple XML docs with XSLT 2.0 into single doc
From: Jack Bush <netbeansfan@xxxxxxxxxxxx>
Date: Tue, 22 Jun 2010 20:37:45 -0700 (PDT)
Re:  How to transform multiple XML docs with XSLT 2.0 i
Hi Martin,
B 
Below is the 2 XML documents I would like to transform into one
as an example:c
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:html="http://www.w3.org/1999/xhtml" >
<head>
b&b&
</head>
<body
onload="loadMapLocation(-46.1240, 149.543, 49, 1); setClockTime(2008, 01, 19,
12, 36, 01); setInterval('updateTime()', 2000);" onunload="GUnload();" >
B  <a
shape="rect" name="top" />
B B B  <div id="container" >
B B B  <div
id="header" >
B B B  <div id="postmark" />
B B B  <a shape="rect"
class="imglink" href="http://www.abc.com/" >
B B B  <img id="logoimg"
src="http://www.abc.com/images/world-cup.gif" width="192" height="33"
alt="World Cup Logo" />
B  </a>
B  <hr/>
B  </div>
B  <h1>World Cup
Competition</h1>
B  <p>
B  </p>
B  <p>
B B B  <strong>World Cup Team:</strong>
B B B B <br clear="none" />
B B B  <a shape="rect"
href="http://www.abc.com/team/brasil.html?aid=427231" >Brasil</a> (30 goals)
B B B  <br clear="none" />
B B B  <a shape="rect" href="
www.abc.com/team/argentina.html?aid=427231" >Argentina</a>(25 goals)
B B B 
<br clear="none" />
B B B  <a shape="rect" href="
www.abc.com/team/Germany.html?aid=427231" >Germany</a>(22 goals)
B B B  <br
clear="none" />
B B B  <a shape="rect" href="
www.abc.com/team/usa.html?aid=427231" >United States of America</a>(15 goals)
B B B  <br clear="none" /> 
B B B  b&b&
B B B  </p>
B B B  <p>
B B B  </p>
B B B  </div>
B  </body>
</html>
c
<html
xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"
>
B  <head>
B B B  </div>
B B B  <h1>World Cup Player</h1>
B B B  <p>
B B B B B  <strong>World Cup Player:</strong>
B B B B B  <br clear="none" />
B B B B B  <a shape="rect"
href="http://www.abc.com/team/brasil.html?aid=427231" >Brasil</a> (250
players)
B B B B B  <br clear="none" />
B B B B B  <a shape="rect" href="
www.abc.com/team/argentina.html?aid=427231" >Argentina</a>(500 players)
B B B B B  <br clear="none" />
B B B B B  <a shape="rect" href="
www.abc.com/team/Germany.html?aid=427231" >Germany</a>(350 players)
B B B B B 
<br clear="none" />
B B B B B  <a shape="rect" href="
www.abc.com/team/usa.html?aid=427231" >United States of America</a>(300
players)
B B B B B  <br clear="none" />
B B B B B  b&b&
B B B  </p>
B 
</div>
</head>
<body onload="loadMapLocation(-23.4210, 43.324, 42, 0);
setClockTime(2008, 01, 20, 31, 36, 01); setInterval('updateTime()', 5000);"
onunload="GUnload();" >
......
</body>
</html>
B Desire output
<team>Brasil
(250 players with 30 goals)<team>
<team>Argentina (500 players with 25
goals)<team>
<team>Germany (350 players with 22 goals)<team>
<team>USA (300
players with 15 goals)<team>

Thanks in advance,
cJack



----- Original
Message ----
From: Martin Honnen <Martin.Honnen@xxxxxx>
To:
xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Sent: Tue, 22 June, 2010 11:48:23 PM
Subject:
Re:  How to transform multiple XML docs with XSLT 2.0 into single doc
Jack Bush wrote:

> I would like to find out how to use XSLT to transform
multiple XML
> documents into a single one, each document would have their own
> stylesheets. 

Can you give an example on how exactly you want to combine
the output from different stylesheets into a single result document? Do you
simply want to wrap all results into a single common root element?

-- 
B B B 
Martin Honnen
B B B  http://msmvps.com/blogs/martin_honnen/

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.