By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,968 Members | 1,572 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,968 IT Pros & Developers. It's quick & easy.

Implementing xsl:message with .Net 1.1

P: n/a
Hi,
I have an XSLT which outputs an <xsl:message>

How can I handle it using .net framework 1.1
I know 2.0 has provided an event to trp the message. Is something similiar
possible in 1.1 also?

Thanks,
Alok
Mar 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Alok Sathaye wrote:
I have an XSLT which outputs an <xsl:message>

How can I handle it using .net framework 1.1


If you have <xsl:message terminate="yes"> then you can use exception
handling e.g. C# alike
try {
xslTransformInstance.Transform(...);
}
catch (System.Xml.Xsl.XsltException e) {
// handle exception here
}
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Mar 24 '06 #2

P: n/a


Martin Honnen wrote:

Alok Sathaye wrote:
I have an XSLT which outputs an <xsl:message>

How can I handle it using .net framework 1.1

If you have <xsl:message terminate="yes"> then you can use exception
handling


xsl:message terminate="no" in a NET 1.1 console application goes to
Console.Out so you could redirect that and read it out e.g.

XslTransform xsltProcessor = new XslTransform();
xsltProcessor.Load(args[0]);
TextWriter standardOut = Console.Out;
StringWriter messages = new StringWriter();
Console.SetOut(messages);
xsltProcessor.Transform(args[1], args[2], null);
Console.SetOut(standardOut);
Console.WriteLine("XSLT messages:\r\n{0}", messages.ToString());
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Mar 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.