How Can I compare ip address with reference of family and name. using XSLT file. In Details, I have one xml file which has list of operatorstation nodes with each operator stati
I think I have finally understood this question.
The following stylesheet will group the OperatorStation
elements by the Family
and Name
elements located inside Nodes/DataNodeBase
. Note that there is another Name
element that is a direct child of OperatorStation
- this is potentially confusing.
For each group, the first IPAddress
element is listed and the others are compared to it. The names of these result elements are taken from the values of the (top) Name
element (just to add some more confusion...).
Pay special attention to the handling of the namespace declared in the source XML document.
Styleheet:
Equal
UnEqual
Source XML:
OS01
NetworkSettings
Internet
111.22.22.3
OS02
NetworkSettings
Internet
111.22.22.3
OS03
NetworkSettings
Internet
111.22.22.4
OS04
NetworkSettings
Internet
111.22.22.4
Result:
NetworkSettings
Internet
111.22.22.3
Equal
UnEqual
UnEqual