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

FW: XSLT newbie

Subject: FW: XSLT newbie
From: "Thimmegowda, Balaji" <balaji_thimmegowda@xxxxxxxxx>
Date: Tue, 26 Dec 2006 17:17:27 -0500
 FW: XSLT newbie
Hi,

I am trying to achieve the following using XSLT :

I apply a XSLT on my source XML to get a path - say, books/author/name

Now, I want to see if this node exists in another xml. Is there a way by
which this can be achieved using XSLT ?


Sample Source XML : The dots are used as delimiters and will later be
replaced to slashes in the XSLT.

Paths.xml

<Paths>
	<path1>books.book.author.name</path1>
	<path2>books.book.name</path2>
</Paths>

------------------------------------------------------------------------
-------------

Sample Input XML.

Input.xml

<books>
	<book>
		<name>a1</book>
		<price>10</price>
		<author>
			<name>b1</name>
			<gender>m</gender>
		</author>
	</book>
	<book>
		<name>a2</book>
		<price>10</price>
		<author>
			<name>b2</name>
			<gender>f</gender>
		</author>
	</book>
</books>


The XSLT should first get the path from the paths.xml and search the
Input.xml to see if the node specified by the path exists. Can somebody
please let me know how to go about solving this.

Regards,
BT


-----------------------------------------------------------------------------
-
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is
available at http://www.merck.com/contact/contacts.html) that may be
confidential, proprietary copyrighted and/or legally privileged. It is
intended solely for the use of the individual or entity named on this
message. If you are not the intended recipient, and have received this
message in error, please notify us immediately by reply e-mail and then
delete it from your system.

-----------------------------------------------------------------------------
-

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-2007 All Rights Reserved.