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: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
---------------------------------------------------------------------
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>