F
Frank
Hi, is there a way to use XSL to compare two XML files to verify if a
"record"
in an XML file has changed of parent in another XML file ?
I am trying to implement a template in an XSL stylesheet that would be able
to compare the two files below
and indicate if a client has changed of category (ex.: from "corp" to
"prvt").
Any help would be gladly appreciated, I am desparatly trying to find a
solution to this.
In the above example, client number 0067 has changed
from "corp" (in file1.xml) to "prvt" (in file2.xml).
file1.xml:
-----------
<root>
<clients cat="corp">
<client>
<number>0098</number>
<lastname>Smith</lastname>
<frstname>John</frstname>
<email>[email protected]</email>
</client>
<client>
<number>0067</number>
<lastname>Carter</lastname>
<frstname>Gary</frstname>
<email>[email protected]</email>
</client>
</clients>
<clients cat="prvt">
<client>
<number>0076</number>
<lastname>Lavigne</lastname>
<frstname>Avril</frstname>
<email>[email protected]</email>
</client>
<client>
<number>0055</number>
<lastname>Donnely</lastname>
<frstname>Al</frstname>
<email>[email protected]</email>
</client>
</clients>
</root>
file2.xml:
-----------
<root>
<clients cat="corp">
<client>
<number>0098</number>
<lastname>Smith</lastname>
<frstname>John</frstname>
<email>[email protected]</email>
</client>
</clients>
<clients cat="prvt">
<client>
<number>0076</number>
<lastname>Lavigne</lastname>
<frstname>Avril</frstname>
<email>[email protected]</email>
</client>
<client>
<number>0055</number>
<lastname>Donnely</lastname>
<frstname>Al</frstname>
<email>[email protected]</email>
</client>
<client>
<number>0067</number>
<lastname>Carter</lastname>
<frstname>Gary</frstname>
<email>[email protected]</email>
</client>
</clients>
</root>
THANKS!
"record"
in an XML file has changed of parent in another XML file ?
I am trying to implement a template in an XSL stylesheet that would be able
to compare the two files below
and indicate if a client has changed of category (ex.: from "corp" to
"prvt").
Any help would be gladly appreciated, I am desparatly trying to find a
solution to this.
In the above example, client number 0067 has changed
from "corp" (in file1.xml) to "prvt" (in file2.xml).
file1.xml:
-----------
<root>
<clients cat="corp">
<client>
<number>0098</number>
<lastname>Smith</lastname>
<frstname>John</frstname>
<email>[email protected]</email>
</client>
<client>
<number>0067</number>
<lastname>Carter</lastname>
<frstname>Gary</frstname>
<email>[email protected]</email>
</client>
</clients>
<clients cat="prvt">
<client>
<number>0076</number>
<lastname>Lavigne</lastname>
<frstname>Avril</frstname>
<email>[email protected]</email>
</client>
<client>
<number>0055</number>
<lastname>Donnely</lastname>
<frstname>Al</frstname>
<email>[email protected]</email>
</client>
</clients>
</root>
file2.xml:
-----------
<root>
<clients cat="corp">
<client>
<number>0098</number>
<lastname>Smith</lastname>
<frstname>John</frstname>
<email>[email protected]</email>
</client>
</clients>
<clients cat="prvt">
<client>
<number>0076</number>
<lastname>Lavigne</lastname>
<frstname>Avril</frstname>
<email>[email protected]</email>
</client>
<client>
<number>0055</number>
<lastname>Donnely</lastname>
<frstname>Al</frstname>
<email>[email protected]</email>
</client>
<client>
<number>0067</number>
<lastname>Carter</lastname>
<frstname>Gary</frstname>
<email>[email protected]</email>
</client>
</clients>
</root>
THANKS!