cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Lewis <>
Subject Tuning XSP output
Date Mon, 19 Mar 2007 17:04:20 GMT
Hello Cocoon users,

Using Cocoon 2.1.10.

I'm just working on some XSP logic sheets using ESQL to create XML views of my 
MySQL database.

There are two things I'd like to be able to do:

1) Stop it from producing empty elements.

e.g. I have: <duration><esql:get-string column="duration" /></duration>
if the duration field is empty, will create an empty <duration /> element. Is 
there an automatic way to stop these from happening? (I understand I could 
just use an XSLT transformation to get rid of them but its seems a bit of 

2) Some of my fields (e.g. biography) are long textual fields which include 
line spaces. Is there a way to capture those lines and wrap them up in 
elements? At the moment, the XML document includes the line spaces, but it 
would be much easier to work with semantically encoded line spaces.

e.g. the biography field contains the text:
"John Bloggs (b. 1979, Ireland).

Bloggs began his..."

would come out as:
  <l>John Bloggs (b. 1979, Ireland).</l>
  <l>Bloggs began his...</l>

Again, I guess there could be a way of writing some <xsp:logic> to handle 
this, though it would be cool if there was something less hackish. (Also, 
I've no idea how I would go about writing that particular hack anyway!)

Richard Lewis

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message