xsl-list
[Top] [All Lists]

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

2019-03-07 10:27:38
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(_at_)gmail(_dot_)com 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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 <>)
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>