I have made an XSLT stylesheet, ht6jt.xsl, that imports David's htmlparse.xsl from his website, and also loads two test documents I have made at Google Docs, and transform them to make them well-formed.
The transformation works at the command line using Saxon, but not in XMLSpy using AltovaXML or in Oxygen using Saxon or in Stylus Studio using Saxon.
In XMLSpy the error message is "XSLT instruction stack overflow", in Oxygen the error message is "Too many nested function calls", and in Stylus Studio: "Maximum recusion depth exceeded".
Now, I don't like the idea that XSLT works at the command line but not in advanced XML Editors! Considering that transforming HTML codesoup to XHTML is an important use case, it would be very nice if the XML Editors could solve this problem.
I'm looking forward to a solution from Stylus Studio.
Subject:Maximum recursion depth exceeded Author:Tony Lavinio Date:11 May 2009 09:24 AM
The difference is most likely coming from the optimizer.
When you run Saxon within Stylus Studio (or Oxygen), in order to provide
debugging support we disable the optimizer. The Saxon optimizer will
reorder code, eliminate variables, and push expressions up or down the
stack. It also controls tail-call recursion.
If we didn't disable the optimizer while within the IDE, there is no
way you could follow the code, since the executable path doesn't really
look like the source document anymore.
When run outside an IDE, optimization is enabled.
You could try using smaller input sets while within the IDE environment,
but this is part of the cost of using a high-level language with a