Re: Optimizing XSLT usage

>      [java] Error at xsl:value-of on line 43 of
> file:/Volumes/Rapture/srowen/Documents/Development/mobileOKBasic/ 
> 2007/mobileok-ref/build/org/w3c/mwi/mobileok/basic/xslt/functions.xsl:
>      [java]   XPST0008: XPath syntax error at char 44 on line 43 in
> {...moki:msgI18n($name,$languag...}:
>      [java]     Variable $language has not been declared
>
> I have still taken the liberty of checking it in (you can comment out
> this target if you need to) even though it doesn't run properly.
> Roland do you know of a way around this?
Yes.
The problem is the language parameter that is defined in the test  
XSLT and don't exist in the function.xsl.
The test XSLT include the function.xsl, so the parameter is defined.

The way around this is to define the parameter globally ONLY in the  
function.xsl.

I have added this parameter to the function.xsl, inside the template  
name="result".
This don't break any test (only the lang parameter is now static).
If this works, I'll move the parameter globally in the function.xsl  
and we must remove the parameter from all other XSLT.

Cheers,
  Roland

Received on Tuesday, 23 October 2007 06:16:44 UTC