Can anyone please help in wring XSLT for this, I want to substring value of one attribute "UDF/@Value" to first 20 characters and I want to substring all UDF/@Value .
Input XML:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Header FileDate="02/12/2015" InputDateFormat="MM/dd/yyyy"/>
<Body DataType="Account">
<Account Name="XYZ" InceptionDate="03/01/2005" DEPT="USD BU" BusinessUnit="WTC" ClientAccountId="123" ISOCurrency="USD" >
<UDF Name="Product" Value="DUMMY"/>
<UDF Name="QUANTITY" Value="abc def ghi jkl mno pqr stu vwz yz"/>
</Account>
<Account Name="ABC" InceptionDate="03/01/2005" DEPT="USD BU" BusinessUnit="WTC" ClientAccountId="124" ISOCurrency="USD" >
<UDF Name="Comment" Value="abc 10percent and 20 and at xyz"/>
<UDF Name="Product Code" Value="EMMKTOPP"/>
</Account>
</Body>
<Trailer RecordCount="2"/>
</root>
Output xml :
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Header FileDate="02/12/2015" InputDateFormat="MM/dd/yyyy"/>
<Body DataType="Account">
<Account Name="XYZ" InceptionDate="03/01/2005" DEPT="USD BU" BusinessUnit="WTC" ClientAccountId="123" ISOCurrency="USD" >
<UDF Name="Product" Value="DUMMY"/>
<UDF Name="QUANTITY" Value="abc def ghi jkl mno "/>
</Account>
<Account Name="ABC" InceptionDate="03/01/2005" DEPT="USD BU" BusinessUnit="WTC" ClientAccountId="124" ISOCurrency="USD" >
<UDF Name="Comment" Value="abc 10percent and 20"/>
<UDF Name="Product Code" Value="EMMKTOPP"/>
</Account>
</Body>
<Trailer RecordCount="2"/>
</root>