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

Node comparison

Subject: Node comparison
From: Kevin_Gutch@xxxxxxxxxxx
Date: Sat, 14 Apr 2001 19:12:16 -0400
xml node comparison
Having two different XML's  joined  on an entity reference I need to
compare values underneath two different parent nodes without having to use
a $Position Variable. The reason being is that I may not have a one to one
relationship.  So
with an example below  I would like to use my XSLT to base the values of
Parent 2 on the like values in Parent 1.

<?xml version="1.0" encoding="UTF-8"?>
<Parent 1>
  <Value 1>1</Value 1>
  <Value 2>0</Value 2>
  <Value 3>1</Value 3>
  <Value 4>0</Value 4>
</Parent 1>
<Parent 2>
  <Value 1> </Value 1>
  <Value 2> </Value 2>
  <Value 2> </Value 2>
  <Value 3> </Value 3>
  <Value 4> </Value 4>
</Parent 2>

I would like the following results:

<Parent 1>
  <Value 1>1</Value 1>
  <Value 2>0</Value 2>
  <Value 3>1</Value 3>
  <Value 4>0</Value 4>
</Parent 1>
<Parent 2>
  <Value 1>1</Value 1>
  <Value 2> 0</Value 2>
  <Value 2> 0</Value 2>
  <Value 3> 1</Value 3>
  <Value 4> 0</Value 4>
</Parent 2>

Any ideas on how to do this?



 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.