This bug is now registered, with a source patch, at
Thanks for reporting it.
Michael Kay

From: [] On Behalf Of Marc Pellmann
Sent: 28 January 2005 09:43
Subject: Re: [saxon] error in java calls from xslt script ()

Michael Kay schrieb:
Could you possibly send me an example of this that I can reproduce?
It's not entirely implausible that the behaviour is different with and without a trace listener, since compiling in trace calls is done before the static type analysis. It seems that the type information isn't getting through at the point where the binding decisions are being made.
The Script ---

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet xmlns:xsl="" xmlns:Formatter="com.inubit.ibis.xsltext.Formatter" exclude-result-prefixes="Formatter" version="1.0">
  <xsl:output method="xml" encoding="ISO-8859-1"/>
  <xsl:template match="/">
        <xsl:value-of select="Formatter:out(string(/Bestellung/Kommentar),'%50s')"/>

Example Java Source ---

public class Formatter {

  public static final String out(String data, String formatString) {
    return "string";

  public static final String out(Double data, String formatString) {
    return "double";

And you could add the new XSLTTraceListener() to reproduce.
Viele Grüße / best regards

Marc Pellmann
inubit - the integration experts
inubit AG
Lützowstraße 105-106
D-10785 Berlin
Fon: +49.30. 72 61 12-132
Fax: +49.30. 72 61 12-100
Freecall: 0800-go inubit