Comparing elements in an XML document
I am trying to compare the element names in an XSL document and am having problems getting it done. By the way, I am using XSLT to process the XML document. Here is my situation:
<heading>This is my heading 2-1</heading>
What I need to do is to loop through all of the dfd/field elements that have the same num attribute one at at time and loop through the dfes elements looking for a dfe element with the same name as the dfd/tag with dfe- concatenated on the front of it. If I find the matching element in the dfes elements then I need to ensure there is a text value associated with that element and return either the text value of the element or a boolean true that it was found.
Loop dfd/fields[@num = 2]
set variable dfdele to concat('dfe-', tag)
loop dfes/* elements
if dfes/child[name] contains the value in dfdele
set a variable value to either the text value of the dfe/child
or set a boolean to true so that when this loop is finished
there is a value advising me that the element was found in
the dfes tree
Synopsis - what I need to know is if there is a field element with the same attribute number as the attribute number I am processing and it has a tag value, is there a matching element in the dfes tree that contains the tag value with a dfe- concatenated on the front.
Any help would be muchly appreciated.