cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: jx:text
Date Fri, 20 Jan 2006 13:00:25 GMT
Daniel Fagerstrom wrote:
> The functionality seem useful, but I don't think that it should be 
> implemented as an attribute. An attribute template language would be 
> cool, but, for JXTG, I think that all instructions should be elements. 
> Mixing element and attribute instructions makes the template language 
> confusing IMO.
we already have <root jx:cache-key=""/>

Thing is jx:strip-whitespace is not really an instruction. It's more 
like a processing directive. With <jx:strip-whitespace/> being a tag the 
syntax is awful:

<xyz jx:strip-whitespace="true">
   ${abc.name}
   <nested-tag jx:strip-whitespace="false"> ${abc.description} 
    </nested-tag>
</xyz>

vs.

<xyz>
   <jx:strip-whitespace>
   ${abc.name}
   <nested-tag><jx:preserve-whitespace>     ${abc.description} 

             </jx:preserve-whitespace></nested-tag>
   </jx:strip-whitespace>
</xyz>

Recursive space stripping is also very useful when do you not generate 
html output but use jxtg to generate views for a self made client (not 
web browser).

> 
>  From architectural stand point I would prefer letting the strip 
> whitespace element just work on its immediate children. Striping 
> whitespace recursively means that we need to make the Template 
> architecture more complicated and less reusable, I'm not convinced that 
> it would be worthwhile.

The architectural issues are to be discussed further but I do not think 
that this functionality will impact jxtg core much.

There are lots of comments from users (mainly using jx-macros for 
cforms) that whitespace is problematic. So I think it's worthwhile.

-- 
Leszek Gawron                                      lgawron@mobilebox.pl
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

Mime
View raw message