Hi Madhura,
you didn't mention your progress in converting XSD to DTD, as I had suggested. Is your .xsd file really so complicated that it cannot be transformed to / written in form of a DTD? If you *had* the DTD, you had the easiest and most straightforward approach: Using the built-in DTD validator if the CL_IXML parser.
Instead, you went another route, but your JavaScript approach seems to be a mere wrapper of Microsoft's XSD validator - which of course is not available in a Unix system. So... nope.
I would therefore propose to abandon that JavaScript route. But Java could be another option. One of the best XSD validators, supporting a maximum set of XSD features, seems to be Xerces. Adrian Mouat has written a runnable xsdv.jar based on Xerces which can do the validation on any operating system.
You can create an OS command for XSD validation in transaction SM69 and execute it with the function module SXPG_COMMAND_EXECUTE.
Regards,
Rüdiger