Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 68001 invoked by uid 500); 11 Jan 2002 10:06:08 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 67989 invoked from network); 11 Jan 2002 10:06:08 -0000 Message-ID: <3C3EB994.6060809@anyware-tech.com> Date: Fri, 11 Jan 2002 11:08:20 +0100 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.7) Gecko/20011221 X-Accept-Language: fr, en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: XSP bug? References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Torsten Curdt wrote: >>>Referring to some old C1 documentation http://xml.apache.org/cocoon1/xsp.html >>>(paragraph "logic tags") this should work. >>>And I think this should work the same way in C2! >>> >>You need to open a new inside : the scope of Java >>code in is limited to text nodes that are its _direct_ >> children. Also, "o.getName()" should be enclosed by an . So >>the above snippet should be written as follows : >> > >[snip] > >Right. > >>So I'm not sure there is a wrong behaviour in the engine. >>Sylvain >> >If you look at the provided C1 docs this was different before. > How is this different ? The examples do not embed markup as far as your example, but they state that " the || element allows for the arbitrary nesting of other markup without the need to "prematurely" close it" And the example below this sentence clearly shows that text nodes in embedded markup aren't Java code : for (int i = 0; i < countries.length; i++) { }
countries[i].getName() countries[i].getCurrency()
Notice the inside the : if they weren't present, "countries[i]..." wouldn't be considered as Java code and thus inserted as is in the produced document. And this is what makes XSP more XML-ish than other dynamic page languages : in the XML tree, the in the above sample are _inside_ the , which is more in accordance with the page logic than what you would do with JSP, where there would be 2 java code blocs _at the same level_ as the . > >So question is: > >1) is this still C1 behaviour or is the docu outdate (well, always ;) > This both C1 & C2 behaviour, and docu is up to date (well, at least on this point ;) > >2) what says the xsp spec (is there one?) > There's a 2-year old working draft at http://xml.apache.org/cocoon1/wd-xsp.html The before-last chapter "Page readability" explains just the same as above on JSP. > >3) what's the more desired behaviour > IMO the desired behaviour is the one we have today : as soon as you put markup in an , you leave Java code to go back to XML content. > >4) what will break if we change it > Again, IMO nothing's wrong... or maybe our example ;-) Sylvain --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org