[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to report errors to stdout from xslt?

Subject: How to report errors to stdout from xslt?
From: Don McClimans <dmcxslt@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 25 Jul 2004 08:51:07 -0400
xsl stdout
I am using xslt as part of the build process for a C++ application, under Windows. I manually edit an xml file (it is the "source code"). As part of the build, the xml file gets run through various XSLT scripts that produce .rc and .h and .cpp files. Those files are then compiled into the application.

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.

Don

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.