You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa" <da...@xs4all.nl> on 2004/02/04 15:26:19 UTC

[script] correct syntax expression="x && y"

Hi,

Following a snip from a .script i'm using.
<if-not expression="refresh && dynamicallyExpand">
...
<if-not>

The refresh and dynamicallyExpand variables are used elsewhere in the 
script as well so i know they are ok.
Combining them however throws the following error:

org.apache.tapestry.ApplicationRuntimeException
Unable to parse script classpath:/scripts/treetable/TreeTable.script.
component: 
org.apache.tapestry.html.Script$Enhance_2@537935[TreeTableTestFlexible/treeTableScript]
location: 	classpath:/scripts/treetable/TreeTable.script

org.apache.tapestry.ApplicationRuntimeException
Unable to parse script classpath:/scripts/treetable/TreeTable.script.
location: 	classpath:/scripts/treetable/TreeTable.script

org.apache.tapestry.util.xml.DocumentParseException
Unable to parse 
file:/C:/eclipse3/workspace/ffneuzen2/context/WEB-INF/classes/scripts/treetable/TreeTable.script: 
Illegal character or entity reference syntax.
documentLocation: 	classpath:/scripts/treetable/TreeTable.script
location: 	classpath:/scripts/treetable/TreeTable.script

org.xml.sax.SAXParseException
Illegal character or entity reference syntax.
columnNumber: 	-1
lineNumber: 	40
Stack Trace:

     * org.apache.crimson.parser.Parser2.fatal(Unknown Source)

Looking at this I would say it has something to do with the &&.
What would be the correct syntax for combining the two (assuming my 
intention is clear)?

TIA
Fermin DCG


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [script] correct syntax expression="x && y" (and will do)

Posted by "F. Da Costa" <da...@xs4all.nl>.
Erik Hatcher wrote:

> On Feb 4, 2004, at 9:26 AM, F. Da Costa wrote:
> 
>> Following a snip from a .script i'm using.
>> <if-not expression="refresh && dynamicallyExpand">
>> ...
>> <if-not>
> 
> 
> This is invalid XML, just as the error message said :)
> 
Hmm, that was the reason why my eye was drawn to the & (had to something 
with XML, hmm)
> Use &amp;&amp; or I believe OGNL supports the word "and".
> 
It most certanly does support and (don't like these cryptic thingies ;) )

Thx for the quick reply guys

Fermin


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [script] correct syntax expression="x && y"

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Feb 4, 2004, at 9:26 AM, F. Da Costa wrote:
> Following a snip from a .script i'm using.
> <if-not expression="refresh && dynamicallyExpand">
> ...
> <if-not>

This is invalid XML, just as the error message said :)

Use &amp;&amp; or I believe OGNL supports the word "and".

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [script] correct syntax expression="x && y"

Posted by Harish Krishnaswamy <hk...@comcast.net>.
Did you try this?

<if-not expression="refresh &amp;&amp; dynamicallyExpand">
...
<if-not>

-Harish

F. Da Costa wrote:

> Hi,
>
> Following a snip from a .script i'm using.
> <if-not expression="refresh && dynamicallyExpand">
> ...
> <if-not>
>
> The refresh and dynamicallyExpand variables are used elsewhere in the 
> script as well so i know they are ok.
> Combining them however throws the following error:
>
> org.apache.tapestry.ApplicationRuntimeException
> Unable to parse script classpath:/scripts/treetable/TreeTable.script.
> component: 
> org.apache.tapestry.html.Script$Enhance_2@537935[TreeTableTestFlexible/treeTableScript] 
>
> location:     classpath:/scripts/treetable/TreeTable.script
>
> org.apache.tapestry.ApplicationRuntimeException
> Unable to parse script classpath:/scripts/treetable/TreeTable.script.
> location:     classpath:/scripts/treetable/TreeTable.script
>
> org.apache.tapestry.util.xml.DocumentParseException
> Unable to parse 
> file:/C:/eclipse3/workspace/ffneuzen2/context/WEB-INF/classes/scripts/treetable/TreeTable.script: 
> Illegal character or entity reference syntax.
> documentLocation:     classpath:/scripts/treetable/TreeTable.script
> location:     classpath:/scripts/treetable/TreeTable.script
>
> org.xml.sax.SAXParseException
> Illegal character or entity reference syntax.
> columnNumber:     -1
> lineNumber:     40
> Stack Trace:
>
>     * org.apache.crimson.parser.Parser2.fatal(Unknown Source)
>
> Looking at this I would say it has something to do with the &&.
> What would be the correct syntax for combining the two (assuming my 
> intention is clear)?
>
> TIA
> Fermin DCG
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: [script] correct syntax expression="x && y"

Posted by Jim Menard <ji...@io.com>.
Fermin,

> Following a snip from a .script i'm using.
> <if-not expression="refresh && dynamicallyExpand">

"&" is a magic character in XML. You need to encode it as "&amp;". Your 
expression needs to be

<if-not expression="refresh &amp;&amp; dynamicallyExpand">

Jim
-- 
Jim Menard, jimm@io.com, http://www.io.com/~jimm/
"Slideshow ... boring. Loosing ... consciousness ..." -- The Tick


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org