I'm trying to use the SQL extension for Xalan to generate an XML document from a MySQL database. I have the MySQL J/Connector in my class path, but I get an error with sql:new() trying to load the driver:
$ java -classpath mysql-connector-java-5.1.13/mysql-connector-java-5.1.13-bin.jar -jar xalan-j_2_7_1/xalan.jar -xsl xalan-sql.xsl xalan-sql.xsl; Line #8; Column #129; java.lang.IllegalArgumentException: Invalid Driver Name Specified! According to MySQL's documentation, the driver name is com.mysql.jdbc.Driver. Here is the XSL file I am testing with: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:sql="http://xml.apache.org/xalan/sql" extension-element-prefixes="sql"> <xsl:output method="html"/> <xsl:template match="/"> <xsl:variable name="products" select="sql:new('com.mysql.jdbc.Driver', 'jdbc:mysql://localhost/test', 'user', 'password')"/> </xsl:template> </xsl:stylesheet> Any ideas? I have used J/Connector before with other Java programs. -- Loren M. Lang lor...@north-winds.org http://www.north-winds.org/ Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc Fingerprint: 10A0 7AE2 DAF5 4780 888A 3FA4 DCEE BB39 7654 DE5B
signature.asc
Description: OpenPGP digital signature