|
next
|
Subject: Group Compare Author: Neal Walters Date: 28 Apr 2006 03:11 PM
|
In XSLT, I want to compare the entire group of an element.
For example, I have OriginalProfile and EditedProfile, and if anything is different between the two (such as home phone, work phone, cell phone, email, address, etc... I want to perform an action.
If I just do
<xslt:if test="OriginalProfile != EditedProfile")
I'm thinking it will just compare the text value of the group, not the values of everything under the group.
Is there an easy way to do what I'm asking? Or do I have to have a humungous if statement that compares oldWorkPhone to newWorkPhone, and oldCellPhone to NewCellPhone, etc...
Thanks,
Neal Walters
http://Biztalk-Training.com
|
next
|
Subject: Group Compare Author: Neal Walters Date: 03 May 2006 11:07 AM
|
So what is an elegant solution for this situation?
I have two profiles, a before and after. They have maybe 20 fields, name, addresses, city, state, zip, multiple phones, multiple emails, etc...
I basically want to know if the one profile is equal to the other or not.
Right now we have a map that has a nasty if statement that compares old first name to new first name, old last name to new last name, old address to new address, old city to new city, etc, etc, etc...
So, if we ever add an element to the structure, the if statement is out of date, and also the if statement is just extremely hard to read. When we click the format button in Stylus Studio, the whole if statement goes to one line, which is something like 2000 characters wide. I normally like the reformat button, but in this case it make the code very hard to read.
Any suggestions to improve my ugly XSLT?
Thanks,
Neal Walters
http://Biztalk-Training.com
|
|
|
|