cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart Roebuck <stuart.roeb...@adolos.co.uk>
Subject Current CVS: <xsp:expr> bug?
Date Thu, 21 Feb 2002 17:47:30 GMT
I've just updated to the latest CVS and I notice that it has slightly 
changed the way <xsp:expr> is used.

> <xsp:expr>produceString()</xsp:expr><xsp:expr>produceAnotherString()</xsp:
> expr>

used to produce Java code:

> String.valueOf( (produceString()) + (produceAnotherString()) )

now it produces:

> String.valueOf( produceString() + produceAnotherString() )

which is fine in this case, but causes problems in cases like:

> <xsp:expr></xsp:expr>"String"<xsp:expr>(variable == true) ? "true"
: 
> "false"</xsp:expr>

which becomes:

> String.valueOf( "String" + (variable == true) ? "true" : "false" )

and results in a "Incompatible type for ?:. Can't convert java.lang.String 
to boolean" compile error.

the workaround is to bracket the contents of <xsp:expr /> blocks, but this 
is unintuitive.

Stuart.

            Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck (Adolos)
      Key fingerprint = 89D9 E405 F8B1 9B22 0FA2  F2C1 9E57 5AB1 88DD 65AF
-------------------------------------------------------------------------
Stuart Roebuck                                  stuart.roebuck@adolos.com
Systems Architect                             Java, XML, MacOS X, XP, etc.
ADOLOS                                           <http://www.adolos.com/>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message