Recursive logicsheets
Hello, I'm using logicsheets extensively in my cocoon application. I don't know - maybe I use them for the things that should be done in some other way - but that does not bother me for now (I'm trying to grok cocoon). Here's the problem: Let's say I have a template in my logicsheet called . I would like to create another template in my logicsheet called which uses . The following (naive?) approach does not seem to work: I can use other logicsheets' elements in my logicsheet - but seems like I just can't use definitions from the logicsheet that is applied at the time (don't know how to call it - template-time? ;). My guess is that XSP processor applies every logicsheet needed just once and does not care that there might be a need to make another run. I'd like to know what you guys do in those situations? For now I'm using quite an ugly hack - I name templates so I could call them later: That rapidly becomes more ugly when I need to pass parameters to those templates. I guess I could also use . Any ideas would be appreciated, -- Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IF - ELSE expression into an XSP with ESQL
Josep Riudavets Aguilo wrote: > Hi all ... [ skipped ] > If "solicitat" is true, no more database access are allowed, and the > XSP must ignore the second query. > > How can I implement this IF-ELSE expression? I know about > taglib for implementing java code, but I don't know if > ESQL taglibs can be placed into taglib. Yes, you certainly can use with esql, here's how your XSP might look like: SELECT solicitat FROM expedients WHERE nom='nom' AND cognoms='cognoms' AND dni='dni'; boolean soli = ; if (soli) { SELECT mail FROM expedients WHERE nom='nom' AND cognoms='cognoms' AND dni='dni'; ... } Hope that helps, -- Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Serializing document in UTF-16 encoding
Yury Mikhienko <[EMAIL PROTECTED]> writes: > in serializers section I have: > name="UTF_16_text" src="org.apache.cocoon.serialization.TextSerializer"> > UTF-16 > > > > in pipeline section: > > > > > > > > > my test.xml file: > > > тест test > > > my test.xsl file: > > http://www.w3.org/1999/XSL/Transform";> > > > > > > after serializing I get the following document (binary dump) > ff fe 0a 00 20 00 42 04 35 04 41 04 42 04 20 00 74 00 65 00 73 00 74 00 0a 00 > ^^^- WHY? That's the magic bytes that say that this is UTF_16 - i.e. Unicode. 16-bit (unicode) characters follow: 0x000a - '\n' 0x0020 - ' ' 0x0442 - russian 'т' 0x0435 - russian 'е' 0x0441 - russian 'с' 0x0442 - russian 'т' 0x0020 - ' ' 0x0074 - t 0x0065 - e 0x0073 - s 0x0074 - t 0x000a - '\n' Try to open this file(binary dump) under WindowsNT/XP notepad and it will show it nicely for you. -- Ed - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]