[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: comparing nodesets to each other
Hello, David, Thanks for the response. The errors you mentioned already have happened, that's why I'm currently clueless how to solve it. 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) So I need to extract all differences like attribute change, missing nodes, altered nodes, added nodes. To identify a node I use the findnumber Attribute node of each relation node. A missing node is one, where the corresponding Findnumber Attribute value is missing in nodelist 'b'. An added node is one where the corresponding Findnumber Attribute value is missing in nodelist 'a'. An altered node means the Findnumber Attribute value is there in bothe nodelists, but the Attribute nodes or the object/Attribute nodes are different. I think a simple text compare would be enough for the test of alternation. Regards, Kai
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|