<?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="../make-menu.xsl" type="text/xsl"?><html> <head> <this-is section="sql-extension" page="intro" subpage=""/> <!-- Generated at 2011-12-09T20:47:22.916Z--><title>Saxonica: XSLT and XQuery Processing: The Saxon SQL Extension</title> <meta name="coverage" content="Worldwide"/> <meta name="copyright" content="Copyright Saxonica Ltd"/> <meta name="title" content="Saxonica: XSLT and XQuery Processing: The Saxon SQL Extension"/> <meta name="robots" content="noindex,nofollow"/> <link rel="stylesheet" href="../saxondocs.css" type="text/css"/> </head> <body class="main"> <h1>The Saxon SQL Extension</h1> <p>The Saxon distribution includes a set of extension elements providing access to SQL databases. These are not intended as being necessarily a production-quality piece of software (there are many limitations in the design), but more as an illustration of how extension elements can be used to enhance the capability of the processor.</p> <p>To use the SQL extension elements in a stylesheet, you need to define a namespace prefix (for example "sql") in the extension-element-prefixes attribute of the xsl:stylesheet element, and to map this prefix to a namespace URI, conventionally <code>http://saxon.sf.net/sql</code>. This namespace must be bound in the <a class="bodylink" href="../javadoc/net/sf/saxon/Configuration.html"><code>Configuration</code></a> to the class <code>net.sf.saxon.option.sql.SQLElementFactory</code>. This binding can be done either by calling <a class="bodylink" href="../javadoc/net/sf/saxon/Configuration.html#setExtensionElementNamespace"><code>Configuration.setExtensionElementNamespace()</code></a>, or by means of an entry in the <a class="bodylink" href="../configuration/configuration-file.xml">configuration file</a>.</p> <p><i>This changed in Saxon 9.2. In Saxon 9.1 and earlier releases it was necessary to use a namespace ending in "/net.sf.saxon.sql.SQLElementFactory". It is still possible to use the same namespace, but it must now be bound explicitly.</i></p> <p>This extension defines eight new stylesheet elements: <code>sql:connect</code>, <code>sql:query</code>, <code>sql:insert</code>, <code>sql:column</code>, <code>sql:update</code>, <code>sql:delete</code>, <code>sql:execute</code>, and <code>sql:close</code>, described in the following sections.</p> <p><i>Note: this extension is not available on the .NET platform.</i></p> <table width="100%"> <tr> <td> <p align="right"><a class="nav" href="connect.xml">Next</a></p> </td> </tr> </table> </body> </html>