cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo Rivera <agalla...@agsoftware.dnsalias.com>
Subject Re: XSP Indentation and Whitespace
Date Wed, 11 Sep 2002 08:20:23 GMT
Try this:

<esql:execute-query>
      <esql:query>
	SELECT template_id, name
	FROM template
	ORDER BY name
      </esql:query>
	<esql:results>
         <esql:row-results>
	 <option>
               <xsp:attribute name="value"><esql:get-string 
column="template_id"/></xsp:attribute>
               <esql:get-string column="name"/>
            </option>
         </esql:row-results>
      </esql:results>
 </esql:execute-query>

Antonio Gallardo


El Miércoles, 11 de Septiembre de 2002 02:08, Martin Schimak escribió:
> Hi folks!
>
> I am relatively new to cocoon, but so far I am VERY IMPRESSED and I have a
> strong feeling that I will spend a considerable amount of forthcoming
> lifetime using/exploring/developing :-)
>
> However, on my exploring way, I encountered a small, but annoying issue, I
> could not solve myself so far... it's concerning whitespace:
>
> <esql:execute-query>
>      <esql:query>SELECT template_id, name FROM template ORDER BY
> name</esql:query> <esql:results>
>         <esql:row-results>
>            <xsp:element name="option">
>               <xsp:attribute name="value">
>                  <esql:get-string column="template_id"/>
>               </xsp:attribute>
>               <esql:get-string column="name"/>
>            </xsp:element>
>         </esql:row-results>
>      </esql:results>
> </esql:execute-query>
>
> After processing this fragment, I would like to end up with something like
>
> <option value="1">Template1</option>
> <option value="2">Template2</option>
>
> but instead I end up with something like
>
> <option value="
> 1			">		Template1		</option>
> <option value="
> 2			">		Template2		</option>
>
>
> Of course, if I avoid indentation within the original xsp fragment like
>
> <xsp:element name="option"><xsp:attribute name="value"><esql:get-string
> column="template_id"/></xsp:attribute><esql:get-string
> column="name"/></xsp:element>
>
> then I get what I want. But I get illegible xml quite soon...
>
> Of course, the preservation of the original indentation in some cases could
> be what the user actually wanted, therefore my question: Is there a way to
> tell cocoon/xsp-processing to change behaviour in this respect?
>
> Not a big problem,
> but I found no bigger problem so far :-)
>
> Martin.
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message