XTDE0420 Error

  • 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 from Saxonica
    Java version 1.6.0_24
    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/
    processing /test
    Transformation failed: Run-time errors were reported

    The correspomding stylesheet source code is:

    <fo:flow flow-name="xsl-region-body">
    <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:when test="$glIsKaikai">

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

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

    As you can see I output <fo:flow> and descendant <fo:block> in "genHeader"
    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.


    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:

  • 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


Log in to post a comment.