XTDE0420 Error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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 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">
         <!-- t_uを処理-->
         <xsl:apply-templates select="t_u[bc:isNot類題(.)]">
             <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">
         <!-- 解答・解説の場合fo:region-bodyにヘッダーを出力 -->
         <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 [hidden email]
   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/
   --------------------------------------------------*/


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: XTDE0420 Error

Toshihiko Makita
Dear Michael,

Now this problem has been solved after adding as="attribute()*" to
xsl:with-param.

<xsl:apply-templates select="t_u">
     <xsl:with-param name="prmTestAttr" as="attribute()*">
         <xsl:copy-of select="$testAttr"/>
         <xsl:call-template name="getAttributeSet">
             <xsl:with-param name="prmAttrSetName"
select="'main_text_ans'"/>
         </xsl:call-template>
     </xsl:with-param>
     <xsl:with-param name="prmCt" select="($c正解,$c別解)"/>
     <xsl:with-param name="tu_parent_width" tunnel="yes"
select="$tuSelfWidth"/>
</xsl:apply-templates>

Sorry for bother you.

Regards,

(2012/09/14 23:26), Toshihiko Makita wrote:

> 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">
>           <!-- t_uを処理-->
>           <xsl:apply-templates select="t_u[bc:isNot類題(.)]">
>               <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">
>           <!-- 解答・解説の場合fo:region-bodyにヘッダーを出力 -->
>           <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 [hidden email]
   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/
   --------------------------------------------------*/


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help