Project

Profile

Help

Using saxon:next-in-chain with Saxon 9.7?

Added by David Sewell over 8 years ago

I've just purchased and installed Saxon-PE 9.7.0.2J and am attempting to run a stylesheet that works under 9.6. It uses @saxon:next-in-chain on xsl:output/ to chain a second stylesheet.

Command-line invocation produces a runtime error:

saxon:next-in-chain is ignored when using an Xslt30Transformer [...] Fatal error during transformation: java.lang.NullPointerException: (no message)

From poking around in source code I can see that 9.7 is creating a Xslt30Transformer which it seems disallows next-in-chain, rather than creating the older XsltTransformer.

I can just use 9.6 for this transform until such time as I rewrite things to avoid saxon:next-in-chain, but is there a way to get 9.7 to process the extension attribute?

(Also, what's the best practice now using 9.7 to accomplish the same thing?)

David


Replies (5)

Please register to reply

RE: Using saxon:next-in-chain with Saxon 9.7? - Added by O'Neil Delpratt over 8 years ago

Hi David,

Thanks for your post. Is it possible that you can send us your stylesheet and maybe simple source document so that we can investigate the problem at our end. If the files are critical you can send them using the email address

Thanks regards, O'Neil

RE: Using saxon:next-in-chain with Saxon 9.7? - Added by David Sewell over 8 years ago

Yes, a very simple test case fails for me. With the attached source XML and two XSLT stylesheets linked via @saxon:next-in-chain, I get the error when I run


java -cp /PATH/TO/saxonpe9-7/saxon9pe.jar net.sf.saxon.Transform -xsl:trans1.xsl -s:doc.xml

It works fine using saxonpe9-6 instead of saxonpe9-7.

David

saxon-next-in-chain-bug.zip (1.37 KB) saxon-next-in-chain-bug.zip XML and XSLT to demonstrate saxon:next-in-chain problem

RE: Using saxon:next-in-chain with Saxon 9.7? - Added by David Sewell over 8 years ago

Are there any updates on this issue? Should it be filed in the issue tracker?

David

RE: Using saxon:next-in-chain with Saxon 9.7? - Added by Michael Kay over 8 years ago

Sorry we dropped the ball on this one. It's always better to raise things like this in the bug tracker rather than as a forum post. It can now be tracked here:

https://saxonica.plan.io/issues/2782

RE: Using saxon:next-in-chain with Saxon 9.7? - Added by David Sewell over 8 years ago

I've just updated to Saxon-PE 9.7.0.6J and my old code with @saxon:next-in-chain is now running fine again. Thanks for the quick bugfix,

David

    (1-5/5)

    Please register to reply