Re: [xsl] Xsl stylesheet version =1 with saxon 9.x

Subject: Re: [xsl] Xsl stylesheet version =1 with saxon 9.x
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 7 Mar 2019 16:27:33 -0000
The effect of having version="1.0" is that the stylesheet runs in "backwards
compatibility mode", meaning that some constructs behave as described in XSLT
1.0 / XPath 1.0 rather than as defined in 2.0/3.0. For example, xsl:value-of
applied to a sequence of several nodes displays the first in 1.0 mode, but
throws an error in 2.0 / 3.0 mode.

I don't think that making random changes is generally an effective strategy to
problem solving; I prefer to work from the code and the failure symptoms. Even
if the failure symptoms appear random, there will be some kind of pattern that
gives clues. It would help, however, to try it on the latest Saxon release in
case it's a known bug.

Sometimes the problem is not with the XSLT code, but with the way you are
running it (e.g. from the Java API).

I suggest you raise a report, with as much information as possible, at
saxonica.plan.io. If it's a simple stylesheet then it should be possible to
put together a repro so we can try and replicate the problem; if you don't
want to share your code you're welcome to send it privately.

Michael Kay
Saxonica

> On 7 Mar 2019, at 16:01, Vasu Chakkera vasucv@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> We have an xslt that has stylesheet version as 1.0 and we are using saxon
9.7.x. it isn't doing much , just running one xpath.. so it has been there
since ever and no one challenged that xslt. In the past 6 months , very
randomly the system is throwing a random exception , which is pointing in the
direction of stylesheet xpath not returning anything .. when same file is run
again, it works just fine..I could well change the version to 3.0 and fingers
crossed it won't happen again. But wanted to know if there is any benefit in
doing so. Clearly the dev team could not find any other issue.
>
> Having an xslt with version 1.0 and saxon 9.7 .. how does it treat the
stylesheet ...
>
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://lists.mulberrytech.com/unsub/xsl-list/293509> (by
email <>)

Current Thread