Project

Profile

Help

JavaScript errors from Saxon-CE 1.1

Added by David Cramer about 11 years ago

Hi there, I'm attempting to use Saxon-CE with some xslt 1.0 stylesheets that render an xsd as human-readable documentation. Here's an example of the way they work without Saxon-CE, just letting the browser do an xslt 1.0 transformation: http://docs.rackspace.com/servers/api/v1.0/xsd/server.xsd

Here's what happens when I use Saxon-CE:

http://162.209.12.245/saxoncedemo/xsd/server.xsd

In Chrome, the page is partially loaded, but stumbles on "Uncaught SyntaxError: Unexpected token ILLEGAL 6D08C01821381D35BD12009B44D2D65D.cache.html:112". In Firefox, the page doesn't render at all and fails with "InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable. Saxoncache.js (line 17)"

The wrapper xslt is: http://162.209.12.245/saxoncedemo/xslt/schema.xslt

The real xslt is here: http://162.209.12.245/saxoncedemo/xslt/schema-original.xslt

I'm at a loss for figuring out what part of the xslt Saxon-CE is choking on.

Thanks, David


Replies (10)

Please register to reply

RE: JavaScript errors from Saxon-CE 1.1 - Added by Michael Kay about 11 years ago

I'll take a look at it. For what it's worth, on Safari it seems to work with no problems.

MK

RE: JavaScript errors from Saxon-CE 1.1 - Added by David Cramer about 11 years ago

Thanks for looking at it. To make it more convenient, I put the whole dir up into a git repo:

https://github.com/dwcramer/saxoncedemo

Regards, David

RE: JavaScript errors from Saxon-CE 1.1 - Added by Syd Bauman about 11 years ago

In case it helps, I'm hitting the same error ("InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable. Saxoncache.js (line 17)") in FireFox. FWIW, did not work in Arora at all, works fine in Chrome. (I'm on an Ubuntu system.) This happens with the absolute simplest of stylesheets, attached.

RE: JavaScript errors from Saxon-CE 1.1 - Added by Michael Kay about 11 years ago

Which version of Firefox?

Unfortunately Firefox seems very unstable. New releases come out every couple of weeks and each one has different bugs.

RE: JavaScript errors from Saxon-CE 1.1 - Added by David Cramer about 11 years ago

I'm seeing the same "InvalidStateError" error in Firefox 24.0 on Ubuntu and Mac.

In IE Version: 8.0.6001.18702, I get warning asking if I want to stop the script on the page. When I say no, I eventually get the error pasted here in a "Logging" window in the page: http://pastebin.com/mQx1v3rW

In Safari and Chrome, the page loads, but features involving the document() function aren't working. Perhaps I should try changing these to use doc() and making it an xslt 2.0 stylesheet.

  • Safari 6.0.5
  • Chrome 30.0.1599.101 on Mac and
  • Chromium 28.0.1500.71 Ubuntu 13.04 (28.0.1500.71-0ubuntu1.13.04.1)

I've also tested with a simple "Hello World" xslt. It works fine in Safari and Chrome. In Firefox, I get the same "InvalidStateError". In IE, in the Logging window, it shows "Sat Oct 19 10:51:58 GMT-500 2013 Xstl20Processor INFO: Saxon-CE API initialised", but it does not show the "Hello World" text: http://162.209.12.245/saxoncedemo/test/foo.xml (which invokes a wrapper that invokes http://162.209.12.245/saxoncedemo/test/test.xsl)

Regards, David

RE: JavaScript errors from Saxon-CE 1.1 - Added by Stefan Sechelmann almost 11 years ago

Hi, is there any progress on this issue? Best regards Stefan

RE: JavaScript errors from Saxon-CE 1.1 - Added by Michael Kay almost 11 years ago

I haven't checked, but we know that one short-lived Firefox release, probably 24 IIRC, was broken as far as running Saxon-CE was concerned.

RE: JavaScript errors from Saxon-CE 1.1 - Added by Stefan Sechelmann almost 11 years ago

I'm getting this error in Firefox 27.0.1 on Mac using a boot stylesheet to directly transfrom a source xml. Best Stefan

RE: JavaScript errors from Saxon-CE 1.1 - Added by Stefan Sechelmann almost 11 years ago

After fiddeling around for some time, it seems to me that firefox produces this error when Saxonce.nocache.js is loaded after the page has been inserted by Firefox' XSLT engine. On the other hand there is no error when directly loading the html content of the transform into Firefox. So this minimalistic example does not work on the current Firefox 27.0.1 on Mac:

XML source:





XSLT test2.xsl:




       
       
           
               
                   
                   <script type="text/javascript" src="lib/saxonce/Saxonce.nocache.js"/>
               
               
               		check.
               
               
       

RE: JavaScript errors from Saxon-CE 1.1 - Added by Stefan Sechelmann almost 11 years ago

Maybe compiling saxonce with the latest GWT helps. There has been some progress on the GWT side since the saxonce 1.1 release.

    (1-10/10)

    Please register to reply