It's a long time ago, but I do have a recollection that there was a problem at one stage that you could create two instances of the objects representing built-in atomic types such as xs:string, and they didn't compare equal to each other. It might be that problem.

I would recommend at the very least moving to the latest maintenance release in the 9.0.0 series, which I think was, released on 2008-09-01. The current release is

Michael Kay

On 12/02/2013 09:47, Ritter, Daniel / Kuehne + Nagel / Ham GI-EI / external wrote:



we are using Saxon in one of our XSLT server products.

Sometimes after a restart of the XSLT server Saxon fails to execute the transformation and displays error message like:


"Cannot compare xs:string to xs:string"


This error message is display when stylesheet code like this is executed:

<xsl:when test="xs:string(number(sum(current-group()/G2ShipmentOrderLineGoodsItemLevel/KP/KPAQAC))) != 'NaN'">



The same transformation is running fine when we restart the XSLT server again.

Is there a known race condition in Saxon which can lead to such issues?


Mit freundlichen Grüßen / best regards
Kühne + Nagel (AG & Co.) KG

Daniel Ritter
external IT-Consultant / GI-EI
Großer Grasbrook 11 - 13
20457 Hamburg
Tel. Nummer: +49 (40) 30333-3332
Fax Nummer: +49 (40) 30333-443332

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius, Reiner Heiken, Holger Ketz (Stellv.), Jan-Hendrik Köstergarten (Stellv.), Bruno Mang, Christian Marnetté, Jens Wollesen, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Karl Gernandt

Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.

saxon-help mailing list archived at