Hello All, I am using xslt first time. I have to create an element based on some criteria.
here is i/p xml:
<FirstUser>
<User id="2" description="ABC" Type="HR"/>
</FirstUser>
<SecondUser>
<User id="3" description="ABC" Type="HR"/>
<User id="4" description="xyz" Type="Admin"/>
<User id="5" description="LMN" Type="Payroll"/>
</SecondUser>
Final O/P
<AllUsers isFromHR='true'>
<User id="2" description="ABC" Type="HR"/>
<User id="3" description="ABC" Type="HR"/>
<User id="4" description="xyz" Type="Admin"/>
<User id="5" description="LMN" Type="Payroll"/>
</AllUsers>
Business Rule: AllUsers element has 1 attribute isFromHR -
Its value w'd be true if value in type attribute of <FirstUser>
or <SecondUser>
is HR else it will be false
How to populate the value of isFromHR ? Rest of xml creation I am done.
Thanks in advance.