sql:query
Performs a query, and returns the results of the query as a sequence of elements: each
element in the return value represents one row of the query result.
If you want to process the results in
the stylesheet, you can write the results to a temporary tree by using the
sql:query
instruction as a child of xsl:variable
.
Attributes
|
|
The database connection. The value is an expression, which must evaluate to a database connection object as returned by sql:connect. |
|
|
The table to be queried (the contents of the FROM clause of the select statement). |
|
|
The columns to be retrieved (the contents of the |
|
|
The conditions to be applied (the contents of the |
|
|
The element name to be used to contain each row. Must be a simple name (no
colon allowed); alternatively the value |
|
|
The element name to be used to contain each column. Must be a simple name
(no colon allowed); alternatively the value |
|
|
Default is |
Details
The result of the instruction is a sequence of elements. The local name of the elements will
be the value of the row-tag
expression if supplied, and they will be in no namespace.
In the absence of a row-tag
expression, the element name will be derived from the name
of the table being queried.
Within these elements, there will be one child element representing each column in the result.
If the col-tag
expression is present, this will be used to name all the columns; otherwise,
column names will be formed from the names returned in the SQL query result (which in turn derive from
the column names in the database where available).