Rajarshi
Rajarshi

Reputation: 1

XSLT transformation is stuck after migrating from saxon 8 to 10.6 EE

My customer has an input xml file of size 28 MB (~7L+ lines of code) to be transformed using Saxon. Transformation was working while in Saxon 8. After migrating to Saxon 10.6 EE, the transformation gets stuck and does not complete processing.

Additional observations- The culprit could be in the XSLT Stylesheet having an Xpath as below: /array/object[number[@name='DATA']=1]

changing it to either /array/object[number[@name='DATA']='1'] or /array/object[number(number[@name='DATA'])=1] seems to work and provides results in ~1.5 seconds.

Please support.

Upvotes: 0

Views: 104

Answers (1)

Michael Kay
Michael Kay

Reputation: 163595

It's hard to provide concrete advice on this. Saxon 8 was a long time ago; in fact it was not one release but a series of major releases from Saxon 8.0 in 2004 through to 8.9 in 2007. During that time the XSLT 2.0 specification was under development in W3C, and Saxon implemented new features of that specification as the spec evolved; XSLT 2.0 was finalised only in 2007, so during the lifetime of Saxon 8.x, the spec was constantly changing. One of the areas of change was the exact rules for comparing values of different types, like strings and integers (as in your example).

In addition, new optimizations were constantly being introduced in Saxon; the construct you have highlighted is likely to be significantly faster if supported by indexing, and indexing is notoriously difficult if your expression involves mixed types.

So the conclusion is that it's not at all surprising that Saxon today should should have evolved both in functionality and in its performance profile from the product released 16-19 years ago.

Upvotes: 0

Related Questions