For Example :
Input XML:
<employee>
<name>Ragu</name>
<city>Chennai</city>
<age>25</age>
</employee>
Data type for above request xml element has been defined in request Schema file. name is string, city is string and age is int data type.
Output of transformation should be like:
<employee>
<name type="string">Ragu</name>
<city type="string">Chennai</city>
<age type="int">25</age>
</employee>
Please anyone give the solution for this transformation. Thanks in Advance
You can use
document()
function to read your schema, e.g.:Input XML:
Schema:
XSLT:
Produces desired Output XML: