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> which, 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 hack.) 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: <biography> <l>John Bloggs (b. 1979, Ireland).</l> <l>Bloggs began his...</l> </biography> 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!) Cheers, Richard -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard Lewis http://www.richard-lewis.me.uk/ JID: [EMAIL PROTECTED] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
