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

Re: comparing nodesets to each other

Subject: Re: comparing nodesets to each other
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Tue, 12 Apr 2005 03:56:46 +0000
meaning of last names
Kai, this is slightly better, but please see below:


I try to be more exact in my definition:
- two nodes 'relation' are different, if they have the same value in
relation/Attribute[@Name='FindNumber']/Value but the text value of both
node's children at all is different.

I get the part about 2 <relation> elements being comparable if the Value of both contain the same text. However, do you really mean to compare just the "text value" of their descendent nodes to determine changes? I interpret "text value" to mean only those descendent nodes that are text() nodes, and I suspect you mean something else. Also, does this mean your "unit of difference" is the <relation> element, and it's suffucient to stop "differencing" at that level? (Meaning, if a relation element is deemed to be "added", it and contained nodes will be shown, with no effort to determine which contained nodes changed.)


Using your samples below, would you provide a "result document" that you're after? Actually seeing a result, with annotations if necessary, would help in making this more concrete.

Regards,

--A

> >I try to show the structure of the recipe (eased):
> >
> ><object>
> >   <relation>
> >     <Attribute Type="string" Name="FindNumber">
> >       <Value><![CDATA[0005]]></Value>
> >     <Attribute>
> >     <Attribute Type="float" Name="...
> >     <object>
> >       <Attribute Type="string" Name="PartNumber">
> >         <Value><![CDATA[Part1]]></Value>
> >       </Attribute>
> >     </object>
> >   </relation>
> >   <relation>
> >     <Attribute Type="string" Name="FindNumber">
> >       <Value><![CDATA[0010]]></Value>
> >     <Attribute>
> >     <Attribute Type="float" Name="...
> >     <object>
> >       <Attribute Type="string" Name="PartNumber">
> >         <Value><![CDATA[Part2]]></Value>
> >       </Attribute>
> >     </object>
> >   </relation>
> >   <relation>
> >     <Attribute Type="string" Name="FindNumber">
> >       <Value><![CDATA[0015]]></Value>
> >     <Attribute>
> >     <Attribute Type="float" Name="...
> >     <object>
> >       <Attribute Type="string" Name="PartNumber">
> >         <Value><![CDATA[Part3]]></Value>
> >       </Attribute>
> >     </object>
> >   </relation>
> ></object>
> >
> >needs to be compared against a similar structure:
> ><object>
> >   <relation>
> >     <Attribute Type="string" Name="FindNumber">
> >       <Value><![CDATA[0005]]></Value>
> >     <Attribute>
> >     <Attribute Type="float" Name="...
> >     <object>
> >       <Attribute Type="string" Name="PartNumber">
> >         <Value><![CDATA[Part1]]></Value>
> >       </Attribute>
> >     </object>
> >   </relation>
> >   <relation>
> >     <Attribute Type="string" Name="FindNumber">
> >       <Value><![CDATA[0015]]></Value>
> >     <Attribute>
> >     <Attribute Type="float" Name="...
> >     <object>
> >       <Attribute Type="string" Name="PartNumber">
> >         <Value><![CDATA[Part3b]]></Value>
> >       </Attribute>
> >     </object>
> >   </relation>
> ></object>
> >
> >(Attribute nodes are more than one per object or relation node)

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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.