Project

Profile

Help

Bug #1620

closed

xsl:function call intermittently returns no results

Added by David Webber about 12 years ago. Updated about 12 years ago.

Status:
Rejected
Priority:
High
Assignee:
Category:
Performance
Sprint/Milestone:
-
Start date:
2012-09-05
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Calls to the function <xsl:function name="w2e:type-to-example"> in the attached code fail to return correct results (e.g. system datetime() value - intermittently.

Notice several other system functions are called too - such as random.

This may be some timing issue and could be present in early versions of Saxon - but this particular version release seems to repeatedly fail.

Problem occurs both with OxygenXML v14 and with CAM Editor - both are using Xerces for XML parsing.


Files

Saxon-function-bug-example.zip (72.4 KB) Saxon-function-bug-example.zip David Webber, 2012-09-05 17:53
Actions #1

Updated by Michael Kay about 12 years ago

  • Status changed from New to In Progress

First, I'll capture here some of the information that has arrived in direct email.

=====

DRRW:

I just ran the template on my Ubuntu 12.04 system with Oxygen 14 and Saxon 9.4.0.3 and it worked perfectly!

OMG - so my hunch appears correct - that this is a Windows platform issue then - must be something to do with timings and calls to external Java functions for date/time and random, wait until those return before processing continues.

=====

Radu Coravu, oXygen:

Both on Windows and Linux an Oxygen kit is available either with the Java VM 64-bit or with the Java VM 32-bit.

David, if you are using the 64-bit Oxygen kit on Windows, could you also try to install the 32-bit kit and try to reproduce the same problem?

About 2 months ago I noticed some strange behavior in which the FO processor RenderX XEP was started from Oxygen using the 64-bit Java VM and parsed using SAX an XSL-FO file, it randomly did not correctly report certain attribute values for certain elements. The Java 64-bit VM tries to optimize code which is run very often and there have been situations in the past in which these optimizations made the code not predictable.

=====

Dave, could I confirm what I am looking for here?

I'm transforming HospitalStatus-lookups-new.cxf using cam-2-example.xsl. This generates a primary result file and three secondary result documents called testexample-1.xml, testexample-2.xml, and testexample-3.xml. I tried comparing testexample-1.xml with the supplied corrrect-testexample-1.xml and error-2-testexample-1.xml and it doesn't seem to be the same as either.

However, I have established that testexample-1 is different depending on whether I run with Saxon 9.4.0.4 or with 9.1.0.8, so I guess this means I am seeing the problem. The first significant difference is that on the element, 9.1.0.8 gives different attributes (both names and values differ). So I'll try and investigate that.

Actions #2

Updated by Michael Kay about 12 years ago

I have confirmed that 9.4.0.4 gives different results depending on whether this is run with the JDK internal parser (com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl) or the Apache Xerces parser (org.apache.xerces.jaxp.SAXParserImpl).

So it seems to be down to the buggy JDK parser.

Actions #3

Updated by Michael Kay about 12 years ago

  • Status changed from In Progress to Rejected
  • Found in version changed from 9.4.0.3 to 9.4

Closing this on the basis that it appears to be caused by a bug in the JDK XML parser, which can be avoided by using the Apache Xerces parser instead.

(Please re-open if the issue is not resolved)

Please register to edit this issue

Also available in: Atom PDF