How to report errors to stdout from xslt?
Right now, if there is a semantic error in the XML file, the script passes this along to the other files, and the error is caught by the compiler. This generates a compiler message which does not directly relate to the XML file. I would like to do more semantic checking in my XSLT script, and report the errors there.
What I would like to do in my xslt script is generate an error message to stdout, and then return an error code from the xslt processor, just as if the processor had detected an error. In the Visual C++ build environment, messages written to stdout from an external build tool are displayed in the build output window, just like error messages from the compiler itself. Also, if an external build tool returns a non-zero error code, the build is aborted. (By "returns", I mean returns an error level in the same sense as a batch file returning an error level).
Is there any way to do this? Or any other way to get similar functionality? I can use msxsl or xalan as the xslt processor. There is no problem using jscript or vbscript functions, though I am not well versed in using either scripting language.
Thanks for your help.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format