docbook-apps

Error in Docbook XSL stylesheets?

  • 1.  Error in Docbook XSL stylesheets?

    Posted 08-06-2008 15:51
    Dear all.

    I was turning a fairly large DocBook XML document into PDF just fine
    for some time using DocBook XML and Apache FOP. I am currently using
    the latest DocBook XSL files (1.74.0) and Apache FOP 0.94.

    Then, after some changes to the document (I haven't been able to
    identify exactly what yet), I tried to create a new PDF and got the
    following error.

    runtime error: file /usr/share/docbook-xsl-latest/fo/spaces.xsl line
    267 element value-of
    Internal error in xsltValueOf(): failed to cast an XPath object to string.

    Line 267 is the line I have marked with a comment in the following
    template block:

    <xsl:template name="space.200A.subst">
    <xsl:param name="string"/>

    <xsl:choose>
    <xsl:when test="contains($string, ' ') and
    $space.hairspace.width != ''">
    <xsl:value-of select="substring-before($string, ' ')"/>
    <fo:leader leader-length="{$space.hairspace.width}"/>
    <xsl:call-template name="space.200A.subst">
    <xsl:with-param name="string" select="substring-after($string, ' ')"/>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:value-of select="$string"/>
    </xsl:otherwise>
    </xsl:choose>
    </xsl:template>


    I haven't yet been able to figure out what the problem is. I don't
    know if there is an error in the document or if his is an error in the
    XSL stylesheets. I don't know enough about the stylesheets and XSLT to
    know what this block is supposed to be doing.

    Can someone help me out here please?

    Thank you,

    Paul