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

RE: Encoding of xsl:message output

Subject: RE: Encoding of xsl:message output
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 21 May 2010 13:45:24 +0100
RE:  Encoding of xsl:message output
> I understand there are a few things left as >implementation 
> defined< in XSLT 2.0, at the same time I feel I might have 
> overlooked something.
> 
> Can I somehow influence the encoding used by xsl:message output?
> 

By default Saxon sends xsl:message output to a Java OutputStreamWriter over
the standard error output; the Java library, as far as I know, will
typically use the platform default encoding. There's a note in the code that
this has been known to fail on .NET when the default encoding set for the
.NET environment is one that the Java runtime doesn't recognize; if it
fails, Saxon tries again specifying UTF8 as the encoding.

I'm not quite sure how IKVM does this mapping; on .NET System.Console.Error
is a TextWriter, so we should probably be writing character data to it
rather than binary data in an encoding decided by the Java class library.
Perhaps Saxon needs an abstraction layer here.

In the meantime, of course, you can of course take full control of the
destination of message output, as well as its format, by means of various
hooks at the level of the s9api XsltTransformer or the underlying
net.sf.saxon.Controller.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay  

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.