You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Bob Stayton <bo...@sco.COM> on 2000/11/08 00:24:52 UTC

problem with xsl:fallback?

I've been trying to use Xalan-Java 1.2 with the latest
version 1.23 of Norm Walsh's Docbook XSL stylesheets.
The basic docbook.xsl stylesheet works, once I
upgraded xerces to version 1.2.1.

But the chunk.xsl stylesheet that uses extensions
for outputting multiple HTML files fails. It
looks like the <xsl:fallback> element is not being
handled correctly by Xalan.  Saxon anx XT handle this
stylesheet properly, so I suspect a bug in Xalan 1.2.

The chunk.xsl stylesheet tries
to support multiple XSL processor extensions by
using the <xsl:fallback> element, like so:

  <xt:document method="html" href="{$base.dir}{$chunkfn}">
    <xsl:call-template name="chunk-element-content">
      <xsl:with-param name="prev" select="$prev"/>
      <xsl:with-param name="next" select="$next"/>
    </xsl:call-template>
    <xsl:fallback>
      <xalanredirect:write file="{$base.dir}{$chunkfn}">
        <xsl:call-template name="chunk-element-content">
          <xsl:with-param name="prev" select="$prev"/>
          <xsl:with-param name="next" select="$next"/>
        </xsl:call-template>
        <xsl:fallback>
          <saxon:output method="html" file="{$base.dir}{$chunkfn}">
            <xsl:call-template name="chunk-element-content">
              <xsl:with-param name="prev" select="$prev"/>
              <xsl:with-param name="next" select="$next"/>
            </xsl:call-template>
            <xsl:fallback>
              <xsl:call-template name="chunk-element-content">
                <xsl:with-param name="prev" select="$prev"/>
                <xsl:with-param name="next" select="$next"/>
              </xsl:call-template>
            </xsl:fallback>
          </saxon:output>
        </xsl:fallback>
      </xalanredirect:write>
    </xsl:fallback>
  </xt:document>

When processed with Xalan 1.2, the stylesheet is parsed
without error, but the transformation fails with:

Transforming...
Writing index.html for book
Call to extension element failed:  File "http://www.jclark.com/xt" not found.
Writing pr01.html for preface
Call to extension element failed:  File "http://www.jclark.com/xt" not found.

then it just hangs and no output is produced.
If I rearrange the fallback sequence so xalanredirect
is outermost, it still fails with this message, even though
it should not even be looking for the XT extensions.

Has anyone successfully processed Docbook XSL 1.23 chunk.xsl
with Xalan 1.2?  If so, what was your trick?

bobs
Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The Santa Cruz Operation, Inc.              fax:   (831) 429-1887
                                            email: bobs@sco.com

Re: problem with xsl:fallback?

Posted by Gary L Peskin <ga...@firstech.com>.
Bob Stayton wrote:
> 
> I've been trying to use Xalan-Java 1.2 with the latest
> version 1.23 of Norm Walsh's Docbook XSL stylesheets.
> The basic docbook.xsl stylesheet works, once I
> upgraded xerces to version 1.2.1.
> 
> But the chunk.xsl stylesheet that uses extensions
> for outputting multiple HTML files fails. It
> looks like the <xsl:fallback> element is not being
> handled correctly by Xalan.  Saxon anx XT handle this
> stylesheet properly, so I suspect a bug in Xalan 1.2.

I uploaded a change to CVS last night which fixed this problem.  You'll
need to rebuild Xalan 1.2 from the source.  If you need help with this,
please let us know.

Gary