0
votes

I'm trying to use Saxon 9.1.0.8 HE to apply (recent) Docbook XSL, and getting this:

Don't know how to chunk with SAXON 9.1.0.8 from Saxonica 
Processing terminated by xsl:message at line 46 in chunker.xsl

Docbook XSL source claims that:

<!-- This stylesheet works with XSLT implementations that support -->
<!-- exsl:document, saxon:output, or Xalan's redirect:write -->
<!-- Note: Only Saxon 6.4.2 or later is supported. -->

...and a visit to line 46 mentioned in the error message (which tests for element-available('saxon:output')), and to Saxon documentation, shows that the root of the problem is that Saxon no longer recognizes the saxon:output extension.

This source suggests that to make Saxon 9.4 compatible with XSLT 1.0 (which is what the stylesheets are in, and what saxon:output used to be good for in the first place), some kind of "backward compatible behavior" must be enabled. But why, and how?

(The docbook stylesheet in question does specify <xsl:stylesheet version="1.0" xmlns:saxon="http://icl.com/saxon">.)

3
This is really a question for the Saxon Help mailing list, although Michael Kay does occasionally hang out here. - Jim Garrison
It's more a question about docbook really. - Michael Kay
Thanks everybody for very useful answers. My docbook related practical problem is solved. (I am gathering from @MichaelKay's answer that newer versions of Saxon are not intended to be that much backward compatible, as far as XSLT 1.0 or legacy extension elements go; this part of the question seems to me to be about Saxon and thus about XML programming tools which was why I chose to ask here.) - Jirka Hanika
My general policy with Saxon is that when a Saxon extension is superseded by a facility in the standard XSLT language, I generally withdraw the proprietary extension after a couple of releases to provide time for transition. This is particularly true where the rules aren't exactly the same and the old facility is likely to be support-intensive because of environment dependencies. Of course some applications never make the transition, and they are then stuck on the older Saxon release. - Michael Kay
@MichaelKay - Thank you, this gives me a lot of light. - Jirka Hanika

3 Answers

4
votes

I'm no expert in DocBook, but I believe the Docbook 1.0 stylesheets probably work best with Saxon 6.5.5, and if you want to use the latest Saxon releases (e.g. for performance) then you're probably better off using the Docbook 2.0 stylesheets: see

http://norman.walsh.name/2011/08/25/docbook-xslt-2

2
votes

If you want to run XSLT 1.0 stylesheets trying to access extensions in the namespace xmlns:saxon="http://icl.com/saxon" then you should use the lastest version of Saxon 6 which is 6.5.5 I think.

Saxon 9 is an XSLT 2.0 processor and I don't think that comment talking about "Saxon 6.4.2 or later" has Saxon 9 in mind, it is solely talking about the Saxon 6.x releases of the XSLT 1.0 processor.

Other than that I agree with Ken, if you want to use Saxon 9 then edit the stylesheets to use the XSLT 2.0 xsl:result-document.

1
votes

Saxon 9 supports XSLT 2.0, so just use <xsl:result-document> to create multiple result trees.