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

how to solve this - unique- identifying the unique ite

Subject: how to solve this - unique- identifying the unique items set in the sets.
From: "Ram San" <lak_ram@xxxxxxxxx>
Date: Fri, 06 Jul 2001 13:27:50 -0500
unique identifying
Hi all,

What i want to do is 
1.  select  a book which has the bookproperty element and try matching each of the other book with the same Name and ID value. If it matches I should print the book block with the the bookproperty. discard the other book with the matching Name and ID without the bookproperty element.
2. If the book element block is without the matching book subelement Name and ID  value with the subelement bookproperty print the book element block as such.
3.  If the book element block is with the subelement bookproperty  and with no matching Name and ID Value then print the  book block with the  subelement
bookproperty.

If I have not explained clearly see the example below.

Thanks in advance for any direction to solve this.
Ram

Here is the input xml.
<!-- Input -->
<?xml version="1.0" encoding="UTF-8"?>
<Item>
	<book>
		<Name>t </Name>
		<ID>t1</ID>
		<bookproperty>
			<lang>en </lang>
			<text>string1</text>
		</bookproperty>
	</book>
	<book>
		<Name>t </Name>
		<ID>t1</ID>
	</book>
	<book>
		<Name>x</Name>
		<ID>x1</ID>
		<bookproperty>
			<lang>tn</lang>
			<text>string2</text>
		</bookproperty>
	</book>
.....
</Item>


<!--OUtPUT-->

<Item>
	<book>
		<Name>t</Name>
		<ID>t1</ID>
		<bookproperty>
			<lang>en </lang>
			<text>string1</text>
		</bookproperty>
	</book>
	<book>
		<Name>x</Name>
		<ID>x1</ID>
		<bookproperty>
			<lang>tn</lang>
			<text>string2</text>
		</bookproperty>
	</book>
....
</Item>


Get 250 color business cards for FREE!
http://businesscards.lycos.com/vp/fastpath/

 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.