> From: Durrant, Peter [mailto:[EMAIL PROTECTED]]
> 
> 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>

What does:

<xsp:logic>
  double small_value = double(1e-10);
</xsp:logic>

generate?

> 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.
> 
> 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"/>
> 
> If this is the case then are there other code formatters that 
> could be used?

Does it work OK if you don't use a code formatter? (I don't know
of any others)

> Or perhaps this is a known bug that has been fixed since the 
> release of
> Cocoon 2.

I don't think this is a known bug - try searching the bug database.

J.


=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

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

Reply via email to