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

mixing two XMLs

Subject: mixing two XMLs
From: "Felix Garcia" <fnmtool@xxxxxxxxxxx>
Date: Fri, 08 Nov 2002 11:37:46 +0000
mixing xmls
I have two XML and I want to mix them depending on a element value , like two tables with a relation in a relational database

My XMLs are:

<books>
	<book>
		<id_book>2</idbook>
		<tittle>title1</tittle>
		<Edition>2000</Edition>
		<chapters>
			<number>12</number>
		</chapters>
	</book>
	<book>
		<id_book>7</idbook>
		<tittle>title2</tittle>
		<Edition>2001</Edition>
		<chapters>
			<number>19</number>
		</chapters>
	</book>
	<book>
		<id_book>9</idbook>
		<tittle>title3</tittle>
		<Edition>2001</Edition>
		<chapters>
			<number>9</number>
		</chapters>
	</book>
</books>

<pages>
	<page>
		<id_book>2</id_book>
		<n_page>765</n_page>
		<topic_data>
			<ocurrences>34</ocurrences>
			<value>tree</value>
		</topic_data>
	</page>
	<page>
		<id_book>9</id_book>
		<n_page>1023</n_page>
		<topic_data>
			<ocurrences>21</ocurrences>
			<value>bird</value>
		</topic_data>
	</page>
<pages>

And I want to generate next xml.The element used as 'key' is id_book:

<books>
	<book>
		<id_book>2</idbook>
		<tittle>title1</tittle>
		<Edition>2000</Edition>
		<chapters>
			<number>12</number>
		</chapters>
		<page>
			<n_page>765</n_page>
			<topic_data>
				<ocurrences>34</ocurrences>
				<value>tree</value>
			</topic_data>
		</page>
	</book>
	<book>
		<id_book>7</idbook>
		<tittle>title2</tittle>
		<Edition>2001</Edition>
		<chapters>
			<number>19</number>
		</chapters>
	</book>
	<book>
		<id_book>9</idbook>
		<tittle>title3</tittle>
		<Edition>2001</Edition>
		<chapters>
			<number>24</number>
		</chapters>
		<page>
			<n_page>1023</n_page>
			<topic_data>
				<ocurrences>21</ocurrences>
				<value>bird</value>
			</topic_data>
		</page>
	</book>
</books>

How could I do this?

Thanks in advance

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



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.