cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Bourdeau" <bourd...@ciesin.columbia.edu>
Subject RE: Multiple conditions in an XSP if statement
Date Mon, 01 Jul 2002 22:36:12 GMT
I'm very very new to XML, and enjoying it thoroughly, but I have to admit that
I find the   
	&amp;&amp;
encoding for a logical-and in Java to be extremely nasty looking. It really
obfuscates the intended meaning of the statement, requiring the reader to
view the "Java"-code contained within a little more indirectly. I have to 
think 
    " '&amp;&amp;' looks like two ampersands, which would read as 'AND'."
Maybe you get used to this, but it does begin to spoil the syntax of the
underlying programming language.

I'll now truly reveal my ignorance. Is it not possible to define an
ENTITY such that  &&   can be used legally? Perhaps not, since it cannot
end with the semi-colon. But I can't help but think there MUST be someway to
preserve the notational syntax of the Java code.

Needless to say, 
	<![CDATA[&&]]>
leaves me breathless.

--- Bob





> Beth,
>     Thanks for the reply. I just found the answer after a search on
> goggle:
> http://lists.w3.org/Archives/Public/www-xpath-comments/1999JulSep/0032.h
> tml
> 
> 
> Either:
>   if( <xsp-session:get-attribute name="state"/> == null &amp;&amp;
> <xsp-request:get-parameter name="state"/> == null )
> 
> Or:
>   if( <xsp-session:get-attribute name="state"/> == null <![CDATA[&&]]>
> <xsp-request:get-parameter name="state"/> == null )
> 
> works fine.
> 
> When I tried putting <![CDATA[ ...if statement with tags... ]]>
> 
> it failed with the following error:
> 
> org.apache.cocoon.ProcessingException: Language Exception:
> org.apache.cocoon.components.language.LanguageException: Error compiling
> form_xsp:
> ERROR 1 (D:\apps\Tomcat
> 4.1\work\Standalone\localhost\cocoon\cocoon-files\org/apache/cocoon/www/
> eval/logic\form_xsp.java):
> ...


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message