Hi Abhishek,
I believe you are trying to test this in eclispe and not in PI/PO.
- you need to make sure the eclipse has the correct xslt processor jar files for java extensions.
- i am using xalan and the same code works for me in eclipse.
- add your java project to the classpath in your test configuration
And if you use the code provided by Evgeniy in PI/PO it will work