Project

Profile

Help

Support #1703 ยป language.xsl

Tony Slosar, 2013-02-19 17:22

 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://saxon.sf.net/java-type"
xmlns:sql="java://net.sf.saxon.sql.SQLElementFactory"
extension-element-prefixes="sql">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<!-- Database Parameters -->
<xsl:param name="database" select="'jdbc:mysql://localhost/MySQL'"/>
<xsl:param name="driver" select="'com.mysql.jdbc.Driver'"/>
<xsl:param name="user" select="root"/>
<xsl:param name="password" select="motive2013"/>
<xsl:template match="/">
<xsl:message>Connecting to <xsl:value-of select="$database"/>.</xsl:message>
<xsl:variable name="connection" as="java:java.sql.Connection">
<sql:connect database="{$database}" driver="{$driver}" user="{$user}" password="{$password}"/>
</xsl:variable>
<xsl:value-of select="$connection"/>
</xsl:template>
</xsl:stylesheet>
    (1-1/1)