[xep-support] Scant Error Messages

G. Ken Holman gkholman at CraneSoftwrights.com
Tue Aug 4 12:30:57 PDT 2009


At 2009-08-04 13:53 -0400, Harvey, Paul wrote:
>I'm frequently running into situations where I run a transform and get
>an error message like:
>
>(document [system-id file:/F:/2010-MSR/data.xml]
>   (validate
>     [error] Element 'fo:block' cannot be a child of 'fo:list-block'.
>Only 'list-item', 'marker' and change bar elements are permitted in this
>context.
>     [validation total: 1 error]
>...
>
>But I have no idea where, in the FO, the error is occurring. In fact,
>when I output the FO itself and poke around in it, I can find no
>instances of the supposed validation error.

I wouldn't "poke around" because that relies on human eyeballs and 
mine aren't very good.

>Any suggestions as to what I can do about this? Is there a way to tease
>out of RenderX more detailed info as to where the error is occuring?

Remember that an XSL-FO document is XML ... won't this find it for 
you right away?  It took about 30 seconds to write:

<?xml version="1.0" encoding="US-ASCII"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version="1.0">

<xsl:output method="text"/>

<xsl:template match="/">
   <xsl:for-each select="//fo:list-block[fo:block]">
     <xsl:for-each select="ancestor-or-self::*">
       <xsl:text/>/<xsl:value-of select="name(.)"/>
       <xsl:text/>[<xsl:number/>]<xsl:text/>
     </xsl:for-each>
   </xsl:for-each>
</xsl:template>

</xsl:stylesheet>

I hope this helps.

. . . . . . . . . . Ken

--
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman at CraneSoftwrights.com
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list