OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Error in Docbook XSL stylesheets?

Hi Bob.

I have now identified the problem. I have been using xi:include to
include program listings in my document, like so:

  <title>Test A-1 (1a) Input Files</title>
  <tgroup cols="1">
        <entry>The following input file was used.</entry>
        <entry><programlisting format="linespecific"><xi:include
          xmlns:xi="http://www.w3.org/2001/XInclude"; /></programlisting></entry>

To allow xi:includes within program listings I had to extend the DOCTYPE using.

<!ENTITY % local.para.char.mix "| xi:include">

The problem occurs when the file referenced by the xi:include is
empty. Including a single space in the file prevents the error in this

We also include console output that's redirected to file in the
document, which, in certain cases, could involve empty files. So this
bug might come back to bite us again and I'd be grateful if a fix
could be found.

Thank you,


2008/8/7 Bob Stayton <bobs@sagehill.net>:
> This is a strange error that I've not seen before.  Those templates have a
> lot of mileage, so I don't think it is a bug there.  Does this occur with
> all documents?  Can you post a very short document that illustrates the
> problem?
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
> ----- Original Message ----- From: "Paul Suckling" <paul.suckling@gmail.com>
> To: "apps docbook" <docbook-apps@lists.oasis-open.org>
> Sent: Wednesday, August 06, 2008 8:51 AM
> Subject: [docbook-apps] Error in Docbook XSL stylesheets?
>> 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, '&#x200A;') and
>> $space.hairspace.width != ''">
>>     <xsl:value-of select="substring-before($string, '&#x200A;')"/>
>>     <fo:leader leader-length="{$space.hairspace.width}"/>
>>     <xsl:call-template name="space.200A.subst">
>> <xsl:with-param name="string" select="substring-after($string,
>> '&#x200A;')"/>
>>     </xsl:call-template>
>>   </xsl:when>
>>   <xsl:otherwise>
>>     <xsl:value-of select="$string"/> <!-- LINE 267 -->
>>   </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
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

Nashi Power.
Registered address: 7 Trescoe Gardens, Harrow, Middx., U.K.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]