Menu

XTDE0420 Error

Help
2012-09-14
2012-10-08
  • Toshihiko Makita

    Dear Michael,

    I am struggling with XTDE0420 Error with Saxon HE 9.2 (& also 9.4). The error
    occures in the xsl:choose instruction. The log is as follows:

    Saxon-HE 9.4.0.3J from Saxonica
    Java version 1.6.0_24
    ---snip---
    Error at xsl:choose on line 79 of tpl_test.xsl:
    XTDE0420: Cannot create an attribute node whose parent is a document node
    at xsl:apply-templates (file:/D:/MyDocu%7E1/XML2012/Benesse/DEV_RS/stylesheet/
    kou_teite_RS_YcTyMr.xsl#80)
    processing /test
    Transformation failed: Run-time errors were reported

    The correspomding stylesheet source code is:

    <fo:flow flow-name="xsl-region-body">
    <xsl:choose>
    <xsl:when test="$glIsMondai">

    <xsl:apply-templates select="t_u">
    <xsl:with-param name="prmTestAttr" select="$testAttr"/>
    <xsl:with-param name="tu_parent_width" tunnel="yes" select="$tuSelfWidth"/>
    </xsl:apply-templates>
    </xsl:when>
    <xsl:when test="$glIsKaikai">

    <xsl:call-template name="genHeader">
    <xsl:with-param name="prmTest" select="$glTest"/>
    </xsl:call-template>
    <xsl:choose> <===== THIS IS LINE 79
    <xsl:when test="$glSubject eq $cSubject社会">

    <xsl:call-template name="outputAnsTitleBar"/>
    <fo:block>
    <xsl:call-template name="getAttributeSet">
    <xsl:with-param name="prmAttrSetName" select="'ans'"/>
    </xsl:call-template>
    --snip--

    As you can see I output <fo:flow> and descendant <fo:block> in "genHeader"
    template.
    So I cannot understand why this error occurs.

    Do you have any ideas to avoid this error?
    This is very urgent problem because the project deadline is next week.

    Regards,

    --
    /--------------------------------------------------
    Toshihiko Makita
    Development Group. Antenna House, Inc. Ina Branch
    E-Mail tmakita@antenna.co.jp
    8077-1 Horikita Minamiminowa Vil. Kamiina Co.
    Nagano Pref. 399-4511 Japan
    Tel +81-265-76-9300 Fax +81-265-78-1668
    Web site:
    http://www.antenna.co.jp/
    http://www.antennahouse.com/
    --------------------------------------------------
    /

     
  • Michael Kay

    Michael Kay - 2012-09-14

    Have you tried with the -T trace output option? The trace is very voluminous,
    but right at the end I would expect to see the instructions that cause the
    problem.