XSLT 2.0 validation failure under oXygen 9.1

Having trouble installing Oxygen? Got a bug to report? Post it all here.
abcoates
Posts: 26
Joined: Fri Mar 24, 2006 7:45 am
Location: London, UK

XSLT 2.0 validation failure under oXygen 9.1

Post 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.
abcoates
Posts: 26
Joined: Fri Mar 24, 2006 7:45 am
Location: London, UK

Schmatron is affected too

Post 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.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post 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
abcoates
Posts: 26
Joined: Fri Mar 24, 2006 7:45 am
Location: London, UK

XSLT Examples

Post 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.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post 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
abcoates
Posts: 26
Joined: Fri Mar 24, 2006 7:45 am
Location: London, UK

Latest version didn't help

Post 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.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post 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
abcoates
Posts: 26
Joined: Fri Mar 24, 2006 7:45 am
Location: London, UK

Saxon Version Doesn't Match?

Post 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.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Saxon Version Doesn't Match?

Post 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
abcoates
Posts: 26
Joined: Fri Mar 24, 2006 7:45 am
Location: London, UK

Post 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.
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post 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
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post 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
abcoates
Posts: 26
Joined: Fri Mar 24, 2006 7:45 am
Location: London, UK

Post 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.
natuk
Posts: 1
Joined: Wed Jan 05, 2011 11:51 pm

Re: XSLT 2.0 validation failure under oXygen 9.1

Post 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.
Post Reply