cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: [C1.8.2] ESQL question
Date Mon, 05 Feb 2001 18:03:21 GMT
Drasko Kokic <drasko_kokic@yahoo.com> wrote:
>I am having a problem in XSLT layer and am trying to
>find what could possibly cause the error.
>I am trying to process an array (created by ESQL)
>which looks like this (including all white spaces):
>
>                 <TOTAL TIMESTAMP="2001-01-29 00:00">
>
>                         2
>                       </TOTAL><TOTAL
>TIMESTAMP="2001-01-27 00:00">
>
>                         16
>                       </TOTAL><TOTAL
>TIMESTAMP="2001-01-26 00:00">
>
>                         672
>                       </TOTAL><TOTAL
>TIMESTAMP="2001-01-25 00:00">
>
>                         576
>                       </TOTAL>
>
>I would like to know how to get rid of <new-line>
><25-space-chars> <new-line> <25-space-chars> before
>each value and <new-line> <25-space-chars> after each
>value ?!
>
>Here is the ESQL code segment (without 18 space chars
>at the begining):
>
>   <esql:row-results>
>     <TOTAL>
>       <xsp:attribute name="TIMESTAMP"><esql:get-string
>column="PERIOD"/></xsp:attribute>
>       <esql:get-int column="TOTAL"/>
>     </TOTAL>
>   </esql:row-results>
>
>One way to resolve the "problem" is to write the whole
><TOTAL> ... </TOTAL> in one line without any spaces
>and new lines ... but, that doesn't look nice.
>
>MY QUESTION: Is there any way to strip all the white
>spaces before the code is generated so that I get only
>the results values without any formating white spaces?
>
>MORE PRECISE QUESTION:  Is it possible in XSP (and/or
>ESQL taglib) to ignore any text not included in an
>XSP/ESQL nodes?  That way the above mentioned ESQL
>block would generate something like:
><TOTAL TIMESTAMP="2001-01-29 00:00">2</TOTAL>
><TOTAL TIMESTAMP="2001-01-27 00:00">16</TOTAL>
><TOTAL TIMESTAMP="2001-01-26 00:00">672</TOTAL>
><TOTAL TIMESTAMP="2001-01-25 00:00">576</TOTAL>

Use the XSLT normalize-space function in a logicsheet.

>Is this behaviour under the power of XSP/ESQL

Yes, but the spaces might be significant, so esql leaves it to you.

or more
>in the area of the XML serialiser???



_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


Mime
View raw message