Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 2nd, 2012, 06:14 PM
Authorized User
 
Join Date: Apr 2008
Posts: 70
Thanks: 17
Thanked 1 Time in 1 Post
Send a message via Yahoo to iceandrews
Default Native XSLT Appended Error Log

We have an adapter that's in a multi-threaded container running many messages in and out simultaneously. We have a desire to do some error catching in this adapter and build a constantly growing error file (without actually halting the execution of the adapter).

If it were not multi-threaded, we could just pull in the current Error Log, copy its contents and then add on the errors from the current message at the bottom and dump it back into itself. However, being multi-threaded, we don't have that option.

Is there any native XSLT instructions/function that build a growing error log by just writing/appending to an existing static document? I couldn't find anything directly that would achieve this kind of dynamic error logging. I know there are other ways to handle this kind of thing outside of XSLT or in other OOLs, but is there any native way to do this purely in XSLT? My gut says it's outside the scope of what XSLT is designed to do, but wanted to check with the experts!
 
Old February 3rd, 2012, 05:12 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

This kind of thing is going to be very environment dependent. You don't tell us anything about your environment - Java, .NET, IIS, Apache - or wht XSLT processor you are using. You might be able to interface to the logging services of the host environment using xsl:message, but it all depends.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old February 3rd, 2012, 10:33 AM
Authorized User
 
Join Date: Apr 2008
Posts: 70
Thanks: 17
Thanked 1 Time in 1 Post
Send a message via Yahoo to iceandrews
Default

I figured as much. We're using a ESB product called Sonic (which I don't know a ton about since it's outside my responsibility), but it is a java based ENV. It runs Saxon 8.9 and we are allowed to use saxon extension.
 
Old February 3rd, 2012, 10:46 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I don't know too much about Sonic either, though I had some contact with the developers years ago. Saxon 8.9 is a little old now but still viable. If you're prepared to explore the Saxon Java APIs, you'll find interfaces that allow you to redirect xsl:message output to a destination of your choice, and no doubt if you explore the Sonic APIs you'll find something that allows you to write to log files. Sorry I can't give you any more detailed help than that.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
The Following User Says Thank You to mhkay For This Useful Post:
iceandrews (February 3rd, 2012)
 
Old February 3rd, 2012, 12:06 PM
Authorized User
 
Join Date: Apr 2008
Posts: 70
Thanks: 17
Thanked 1 Time in 1 Post
Send a message via Yahoo to iceandrews
Default

Thanks for your help. We thought we'd have to go to that level to get the kind of error logging that we're looking to do. We were already using the <xsl:message/> instruction, so nice to know you can force output restrictions through the APIs. We'll look into it!





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to extract appended xml's into single xml's using XSL veeka01 XSLT 1 July 30th, 2011 08:22 PM
Log in page error zhugeliang ASP.NET 2.0 Basics 0 July 16th, 2006 04:14 PM
Log In error on another machine lpastor Crystal Reports 2 April 18th, 2005 09:15 AM
"An error log is being created"... where? MelissaEvans Beginning VB 6 5 January 14th, 2005 06:39 AM
AppException Class -Log Error to Event Log bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 7 December 7th, 2004 01:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.