hi all,
I am new to this forum
Right now I am working on XML & XSLT
Below is my Input XMl file
**<?xml version="1.0" encoding="UTF-8"?>
<Employer>
<Employees>
<EmployeesDetails>van ind 26%</EmployeesDetails>
</Employees>
<Employees>
<EmployeesDetails>van ind</EmployeesDetails>
</Employees>
</Employer>**
and I need output as
<?xml version="1.0" encoding="UTF-8"?>
<Employer>
<Employees>
<Names>van</Names>
<Location>ind</Location>
<Weather>26</Weather>
</Employees>
<Employees>
<Names>van</Names>
<Location>ind</Location>
<Weather>100</Weather>
</Employees>
</Employer>
The twist is XSLT Should check for whether element it has value or not first checking for example
if i have the value <weather>26%</weather> the output should be <weather>26</weather> else if there is no weather element in the given xml file it has crate <weather>100</weather>.
Can any help me here how to do it in XSLT 1.0
Thanks in advance
M