XML + Compare Nodes In XSLT Stylesheet
Posted: Mon Sep 03, 2007 8:19 pm
Okay,
Very simple for some of you I'm sure. I want to compare to node values and if they don't match apply a class from my style sheet. I know how to apply the css class, but what I can't do is compare the nodes. Can anyone help me with that. Below is sample data:
In this sample I want to test and see if MentorQty = EBOMQty.
Can anyone help me with this?? Thanks a bunch if you can.[/code]
Very simple for some of you I'm sure. I want to compare to node values and if they don't match apply a class from my style sheet. I know how to apply the css class, but what I can't do is compare the nodes. Can anyone help me with that. Below is sample data:
In this sample I want to test and see if MentorQty = EBOMQty.
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<BOMResolutionReport>
<ComponentList>
<Component>
<Line>
<MentorFindNumber>106</MentorFindNumber>
<MentorQty>1.0</MentorQty>
<MentorComponentName>A-0000200-01</MentorComponentName>
<EBOMFindNumber>106</EBOMFindNumber>
<EBOMQty>1.0</EBOMQty>
<EBOMComponentName>A-0000200-01</EBOMComponentName>
<EBOMDescription>Test Part for Master Mapping</EBOMDescription>
<FormPer>the form per</FormPer>
<SeeView>the note</SeeView>
<SeeNote>the view</SeeNote>
<Caution>this is the caution</Caution>
<Status>Full Match</Status>
<MappingUsed>Master</MappingUsed>
</Line>
</Component>
</BOMResolutionReport>