cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Morrison, John" <John.Morri...@uk.experian.com>
Subject RE: Logic and Java
Date Fri, 04 Jan 2002 11:32:52 GMT
> From: Durrant, Peter [mailto:Peter.Durrant@COGNOS.com]
> 
> 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: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message