#951 err:XTTE0570 in functions.xsl at compile time

other
closed-fixed
nobody
XSL2 (13)
5
2008-02-27
2007-11-04
Florent Georges
No

Hi

In the function f:refentry-section-level(), in the module
xsl2/base/common/functions.xsl, the variable $levelinRE is
defined as following:

<xsl:variable name="levelinRE" as="xs:integer">
<xsl:choose>
<xsl:when test="$section/self::db:refsynopsisdiv">1</xsl:when>
<xsl:when test="$section/self::db:refsect1">1</xsl:when>
<xsl:when test="$section/self::db:refsect2">2</xsl:when>
<xsl:when test="$section/self::db:refsect3">3</xsl:when>
<xsl:when test="$section/self::db:refsection">
<xsl:value-of select="count($section/ancestor::db:refsection)+1"/>
</xsl:when>
</xsl:choose>
</xsl:variable>

This results in an err:XTTE0570 error at compile time with
Saxon 9. You can see the thread in the XSL-List archives
posted by me (Florent Georges) at 2007-11-04T22:35:50+01:00
with the subject "XTTE0570 at compilation, depending on
runtime conditions?" (sorry, the list archives are not
updated yet, I can't give a direct link). The November's
archives are there:

http://www.biglist.com/lists/xsl-list/archives/200711/threads.html

Adding the following should solve the problem:

<xsl:otherwise>
<xsl:sequence select="error(xs:QName('err:XTTE0570'))"
xmlns:err="http://www.w3.org/2005/xqt-errors"/>
</xsl:otherwise>

Best regards,

--drkm

Discussion

  • Logged In: YES
    user_id=582041
    Originator: NO

    A fix for this issue has been added to the current codebase.
    Please test the fix with the latest snapshot from:

    http://docbook.sourceforge.net/snapshots/

     
  • Logged In: YES
    user_id=582041
    Originator: NO

    Norm fixed this by adding
    <xsl:otherwise>1</xsl:otherwise> <!-- this can't happen -->

     
    • status: open --> pending-fixed
     
    • status: pending-fixed --> closed-fixed