You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jo...@apache.org on 2001/04/19 21:35:22 UTC
cvs commit: xml-xalan/java/samples/extensions/sql/basic-connection DumpSQL.xsl
johng 01/04/19 12:35:22
Added: java/samples/extensions/sql/basic-connection DumpSQL.xsl
Log:
Example file that dumps the entire result of an SQL query.
To be used as an example of the DTD for the XConnection/XStatement
object.
Revision Changes Path
1.1 xml-xalan/java/samples/extensions/sql/basic-connection/DumpSQL.xsl
Index: DumpSQL.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:sql="org.apache.xalan.lib.sql.XConnection"
extension-element-prefixes="sql">
<xsl:output method="html" indent="yes"/>
<xsl:param name="driver" select="'org.enhydra.instantdb.jdbc.idbDriver'"/>
<xsl:param name="datasource" select="'jdbc:idb:../../instantdb/sample.prp'"/>
<xsl:param name="query" select="'SELECT * FROM import1'"/>
<xsl:template match="/">
<xsl:variable name="db" select="sql:new($driver, $datasource)"/>
<xsl:variable name="table" select='sql:query($db, $query)'/>
<xsl:copy-of select="$table" />
<xsl:value-of select="sql:close($db)"/>
</xsl:template>
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org