Hi, I'm looking for a way to include the complete content of a text file into an XSP page. This is an example page :
<?xml version="1.0" encoding="ISO-8859-1"?> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:esql="http://apache.org/cocoon/SQL/v2" xmlns:xsp-request="http://apache.org/xsp/request/2.0" xmlns:xsp-session="http://apache.org/xsp/session/2.0" create-session="true"> <html> <esql:connection> <esql:pool>pierrefabre</esql:pool> <esql:execute-query> <esql:query> HERE COMES THE CONTENT OF THE FILE WITH NAME mySQLQuery.sql </esql:query> <esql:results> <!-- Handle results --> </esql:results> <esql:no-results> <!-- Handle no results --> </esql:no-results> </esql:execute-query> </esql:connection> </html> </xsp:page> This would allow me to create one template for executing all my queries. I can then store them into single .sql files. When I ever need a different interaction with my database (handling errors, no results, ...), I only need to modify one template instead of a set of XSP files. I wrote code in Java, to open an InputStream and create the file. That worked. Porting my code to Cocoon didn't. I always get some error. Some code example would be great. --------------------------------------------------------------------- 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]>