Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 84772 invoked by uid 500); 12 Apr 2000 20:18:29 -0000 Delivered-To: apmail-xml-cocoon-cvs@apache.org Received: (qmail 84768 invoked by uid 1037); 12 Apr 2000 20:18:29 -0000 Date: 12 Apr 2000 20:18:29 -0000 Message-ID: <20000412201829.84767.qmail@locus.apache.org> From: balld@locus.apache.org To: xml-cocoon-cvs@apache.org Subject: cvs commit: xml-cocoon/xdocs sqltaglib.xml balld 00/04/12 13:18:29 Added: xdocs sqltaglib.xml Log: Added beginnings of taglib docs. Revision Changes Path 1.1 xml-cocoon/xdocs/sqltaglib.xml Index: sqltaglib.xml ===================================================================
SQL Taglib

SQL Taglib is an XSP taglibrary that performs sql queries and serializes their results as XML. This allows you to work with data from a wide variety of different sources when using Cocoon.

Check your cocoon.properties for this line and add it if it's not already there:

processor.xsp.logicsheet.sql.java = resource://org/apache/cocoon/processor/xsp/library/java/sql.xsl

Map the

http://www.apache.org/1999/SQL

namespace to the sql prefix (FIXME - how do we avoid doing this now?). Elements in the sql taglib namespace will be interpreted as input to the sql taglib and will be stripped from the output.

This is typically done like this:

. . . ]]>

The only element in the sql taglib namespace that may appear as a descendent of an element in another namespace is the execute-query element. It indicates that a sql query should be executed. The result XML will replace this element.

The execute-query element will contain child elements in the sql taglib namespace which specify parameters for the query. It is an error if it contains children (not necessarily descendents) in another namespace. No other element in the sql taglib namespace may contain children in the sql taglib namespace.

The list of valid sql taglib configuration elements is:

driver mandatory
The fully qualified class name of the JDBC driver
dburl mandatory
The JDBC URL to the data source
doc-element
The name of the element which will wrap the entire resultset, if there are any results. If this is not set, there will be no top-level wrapper.
row-element
The name of the element which will wrap each row in the resultset. If this is not set, there will be no row-level wrapper.