Rank: Member
Joined: 5/26/2016 Posts: 19 Location: Maplewood USA
|
I want to check if CompDate has an Op code =E or A OR if TimeStampChange node is the only node with Op code =E AND if there are no Op codes on any other child nodes? i.e. CaseEvent\TimeStampChange Op="E" and there are no Op codes on any other child elements.
If statement will be True when TimeStampChange is the only node in CaseEvent that have Op code=E If statement will also be true if CompDate Op code =E or A but when TimeStampChange has no Op code.
Here is the xml that I am reading
<CaseEvent Op="E"> <EventDate>08/06/2019</EventDate> <Comment Op="E">no rain</Comment> <Deleted>false</Deleted> <RevDate Op="E">08/08/2020</RevDate> <CompDate Op="E">08/06/2019</CompDate> <TimestampChange Op="E">08/06/2019 07:11:28:317</TimestampChange> <EventType Word="NOPERWELL">Personal</EventType> </CaseEvent>
Here is my xslt code. I need help adding and condition to check if any other child nodes in CaseEvent have Op code
<xsl:if test="(@Op='E') and ((EventType/@Word='NOPERWELL') or (EventType/@Word='NORIGHTS')) and ((CompDate[@Op='A']) or (CompDate[@Op='E']) or ((TimestampChange[@Op='E']) and (//CaseEvent[not(@Op)]/*)))">
|