On Fri, 4 Jan 2002, Durrant, Peter wrote:

> I'm trying to resolve a problem with java generated from logicsheets.
>
> Suppose I have the following code in a logicsheet
> <xsp:logic>
>       double small_value = 1e-10;
>       double large_value = 1e10;
>       double other_value = 1e+10;
> </xsp:logic>
>
> then Cocoon will generate a java file with the following code in it
>       double small_value = 1e - 10;
>       double large_value = 1e10;
>       double other_value = 1e + 10;
>
> This is obviously incorrect - it should produce "1e-10" and "1e+10" not "1e
> - 10" and "1e + 10". The spaces introduced into these numbers produces a
> syntax error during compilation since the numbers are incorrectly formatted.
> Cocoon returns an "org.apache.cocoon.ProcessingException":
>
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> double_xsp: Line 95, column 52: Invalid floating point format
>
> where Line 95, column 52 corresponds to the first "1" character in the "1e -
> 10".
>
> I'm not entirely sure of the underlying process that generates the java file
> prior to compilation -- I'm guessing this is caused by JstyleFormatter?
> (from the following parameter in my cocoon.xconf)
>          <parameter name="code-formatter"
> value="org.apache.cocoon.components.language.programming.java.JstyleFormatte
> r"/>

It might be the case that Jstyle is formatting the wrong way. IIRC the
code-formatter is optional. You should be able to put it into a comment
(or delete it entirely from the cocoon.xconf.

Giacomo


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to