Page 1 of 1

XSLT 2.0 validation failure under oXygen 9.1

Posted: Mon Jan 14, 2008 1:48 pm
by abcoates
My XSLT 2.0 stylesheets (but not 1.0) are failing to validate under oXygen XML Editor 9.1, build 2007121417 (Windows XP, JDK 1.6.0_03-b05). When I try to validate an XSLT 2.0 stylesheet, I get an error like:

SystemID: C:\xslt\build-examples.xsl
Description: net.sf.saxon.expr.Expression.simplify(Lnet/sf/saxon/expr/StaticContext;)Lnet/sf/saxon/expr/Expression;

This wasn't a problem under 9.0. Note that I am able to run the same stylesheet under Saxon 9B using Ant, so it doesn't appear to be a problem with the stylesheet or Saxon 9B. Any suggestions? Any extra debugging information needed? Thanks a lot in advance,

Cheers, Tony.

Schmatron is affected too

Posted: Mon Jan 14, 2008 1:57 pm
by abcoates
This problem is affecting Schematron too. When I tried to validate some XML files against a Schematron schema, the following error was logged (many times):

SystemID: C:\sch\sap.sch
Description: net.sf.saxon.expr.Expression.simplify(Lnet/sf/saxon/expr/StaticContext;)Lnet/sf/saxon/expr/Expression;

Cheers, Tony.

Posted: Mon Jan 14, 2008 4:26 pm
by sorin_ristache
Hello,

Please post a short sample of your XSLT 2.0 stylesheet for reproducing the problem. We have not encountered that error yet in oXygen.


Thank you,
Sorin

XSLT Examples

Posted: Mon Jan 14, 2008 5:51 pm
by abcoates
Here is an XSLT 1.0 example which validates correctly:

----
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="myvariable"/>
<xsl:template match="/">
<document/>
</xsl:template>
</xsl:stylesheet>
----

Here is a similar XSLT 2.0 example which does not validate correctly:

----
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:variable name="myvariable"/>
<xsl:template match="/">
<document/>
</xsl:template>
</xsl:stylesheet>
----

The problem seems to be the "xsl:variable" declaration. If that is removed, the XSLT 2.0 example validates correctly.

Cheers, Tony.

Posted: Mon Jan 14, 2008 6:44 pm
by sorin_ristache
I tried with the latest build (2007122116) and it was validated without errors. The error may be caused in your oXygen build by the last bug fixed by the build 2007122116. Please install the latest build over the current one so that the current one is upgraded to the latest one.


Regards,
Sorin

Latest version didn't help

Posted: Mon Jan 14, 2008 8:04 pm
by abcoates
I tried installing the latest version of oXygen, but that didn't help. Can you tell me which version of Saxon 9 is supplied with the latest version of oXygen? I tried overwriting the supplied versions with the JARs from Saxon-SA 9.0.0.1 and 9.0.0.2, but that didn't help.

Cheers, Tony.

Posted: Tue Jan 15, 2008 11:50 am
by sorin_ristache
Saxon version 9.0.0.2 as you can see in the Help -> About dialog, the Components tab.
abcoates wrote:Here is a similar XSLT 2.0 example which does not validate correctly:

----
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:variable name="myvariable"/>
<xsl:template match="/">
<document/>
</xsl:template>
</xsl:stylesheet>
----
abcoates wrote:I tried installing the latest version of oXygen, but that didn't help.
I get no validation errors for this stylesheet with the latest build. Can you send us the stylesheet in a zip archive in order to preserve the encoding of your file?


Regards,
Sorin

Saxon Version Doesn't Match?

Posted: Tue Jan 15, 2008 12:36 pm
by abcoates
In the "Components" tab of the "About" dialog box, my installation of oXygen says

Saxon9SA | 8.9.0.4

which seems different from the 9.0.0.2 that you mentioned. Is it possible that I have a setting that wasn't upgraded properly from an earlier version of oXygen?

I will put my example XSLT stylesheets and a screenshot in a ZIP and send them to you.

Cheers, Tony.

Re: Saxon Version Doesn't Match?

Posted: Tue Jan 15, 2008 12:51 pm
by sorin_ristache
abcoates wrote:In the "Components" tab of the "About" dialog box, my installation of oXygen says

Saxon9SA | 8.9.0.4

which seems different from the 9.0.0.2 that you mentioned. Is it possible that I have a setting that wasn't upgraded properly from an earlier version of oXygen?
That is an older version of oXygen. Is it "<oXygen/> XML Editor 9.1" in your Help -> About dialog? Of course you have to restore the original saxon 9 jar files and restart the application because you replaced some jar files in the [oXygen-install-folder]/lib folder.


Regards,
Sorin

Posted: Tue Jan 15, 2008 1:19 pm
by abcoates
The version is

<oXygen/> XML Editor 9.1, build 2007122116

(I copied and pasted that from the "About" dialog). The version of the Saxon JAR files that I last copied into the oXygen "lib" directory is Saxon-SA 9.0.0.2; they are the same ones that you distributed, aren't they?

Cheers, Tony.

Posted: Tue Jan 15, 2008 1:37 pm
by sorin_ristache
No, oXygen 9.1 comes with Saxon 9.0.0.2 B (the Basic version, not the Schema Aware version for which you need a separate license). I replaced saxon9.jar with saxon9sa.jar and I added saxon9sa-jaxp.jar but I get no validation errors with Saxon 9 SA.


Regards,
Sorin

Posted: Tue Jan 15, 2008 1:45 pm
by sorin_ristache
Can you send us a screenshot with all the Java properties displayed in the System properties tab of the Help -> About dialog?


Regards,
Sorin

Posted: Tue Jan 15, 2008 1:47 pm
by abcoates
OK, I fixed the problem by completely uninstalling oXygen 9.1 and re-installing it. I did notice that my old installation had both Saxon 8 and Saxon 9 JAR files, the new installation only has Saxon 9 JAR files, so either it was an upgrade issue, or at some time in the past I copied the wrong version of Saxon into the "lib" directory.

Cheers, Tony.

Re: XSLT 2.0 validation failure under oXygen 9.1

Posted: Wed Jan 05, 2011 11:54 pm
by natuk
I had similar problems with XPath 2.0 (oXygen 9.3) which were sorted as soon as I removed earlier versions of saxon.jar from the /lib directory.