xsl-list
[Top] [All Lists]

RE: [xsl] Encoding of xsl:message output

2010-05-21 07:45:48

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  


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>