Input XML
<Employer>
<Employeedetail>Sam SR Engineer 10%</ Employeedetail >
<Employeedetail>Sam SR 10%</ Employeedetail >
<Employeedetail>Sam SR</ Employeedetail >
</ Employer >
Below is the Output Input XML
<Employer>
< Employeedetails >
< Employeedetail1>
< Employeedetail >
<Name>Sam</ Name >
<Grade> SR Engineer </ Grade >
<Experience>10</ Experience >
</ Employeedetail >
</ Employeedetail1>
</ Employeedetails>
</ Employer >
<Employer>
< Employeedetails >
< Employeedetail1>
< Employeedetail >
<Name>Sam</ Name >
<Grade>SR</ Grade >
<Experience>10</ Experience >
</ Employeedetail >
</ Employeedetail1>
</ Employeedetails>
</ Employer >
<Employer>
< Employeedetails >
< Employeedetail1>
< Employeedetail >
<Name>Sam</ Name >
<Grade>SR</ Grade >
<Experience>10</ Experience >
</ Employeedetail >
</ Employeedetail1>
</ Employeedetails>
</ Employer >
People from stack overflow they have helped if we have three space sperated node we will get the output
But here there is a slight twist again if you look into the grade Sr Engineer this will come into the grade but the code what I have will display SR into the Grade element and Engineer and 10 (Experience) will come in the Experience element.
If there is no value for Experience it has take by default 10.
In the above Input XML there will be number of Employee details it will come.
Here is the link for that xslt
Please help for the above question
thanks in advance