You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Evgeniy Strokin <ev...@yahoo.com> on 2002/08/07 16:49:54 UTC

Type check error (XSLTC)

Hi,
when I'm trying to compile my XSL (using XSLTC Xalan
2.3.1) I'm getting this error:

Type check error in
cast(variable-ref(sgns_n_page/void), real).

I guess this error coming from this line in XSL:

<xsl:variable name="sgns_n_page"
select="rT:checkPageNumber(string($sgns_n_page),
string(count(/root/Week)),string($sgns_step_page))"/>

here is signature of called method:

public static int checkPageNumber(String numS, String
countS, String stepS)


I can't understand why this error happens,
please help

Thanks, Jenya

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

Re: Type check error (XSLTC)

Posted by Evgeniy Strokin <ev...@yahoo.com>.
oh, yes, I forgot to mention I have parameter with
same name:
<xsl:param name="sgns_n_page">0</xsl:param>
I thought it's ok to override variables. Anyway it
works in regular transformation.
But I tried to remove variable from this string:

<xsl:variable name="temp_n_page"
select="$sgns_n_page"/>
<xsl:variable name="sgns_n_page"
select="rT:checkPageNumber(string($temp_n_page),
string(count(/root/Week)),string($sgns_step_page))"/>

result the same

--- Santiago Pericas-Geertsen
<Sa...@sun.com> wrote:
> On Wednesday 07 August 2002 10:49, Evgeniy Strokin
> wrote:
> > Hi,
> > when I'm trying to compile my XSL (using XSLTC
> Xalan
> > 2.3.1) I'm getting this error:
> >
> > Type check error in
> > cast(variable-ref(sgns_n_page/void), real).
> >
> > I guess this error coming from this line in XSL:
> >
> > <xsl:variable name="sgns_n_page"
> > select="rT:checkPageNumber(string($sgns_n_page),
> >
>
string(count(/root/Week)),string($sgns_step_page))"/>
> 
>  This definition is recursive. The type of
> "sgns_n_page" is not known to 
> XSLTC since this is the variable that you're
> defining. Is there another 
> variable with the same name?
> 
> -- 
> Santiago Pericas-Geertsen
> Sun Microsystems
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

Re: Type check error (XSLTC)

Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
On Wednesday 07 August 2002 10:49, Evgeniy Strokin wrote:
> Hi,
> when I'm trying to compile my XSL (using XSLTC Xalan
> 2.3.1) I'm getting this error:
>
> Type check error in
> cast(variable-ref(sgns_n_page/void), real).
>
> I guess this error coming from this line in XSL:
>
> <xsl:variable name="sgns_n_page"
> select="rT:checkPageNumber(string($sgns_n_page),
> string(count(/root/Week)),string($sgns_step_page))"/>

 This definition is recursive. The type of "sgns_n_page" is not known to 
XSLTC since this is the variable that you're defining. Is there another 
variable with the same name?

-- 
Santiago Pericas-Geertsen
Sun Microsystems