Hi,

All was well with J2RE 1.3.1_06 and Xalan 2.4 but broke on J2RE 1.4.x with
the now fixed XPath bug.


Now with the latest Xalan 2.4.1 the transformation works but the SQL
extension does not return any elements. It does not seem to be a JDBC driver
problem as I've tried the same code with JDBC-ODBC and the Northwind
database with the same results:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sql PUBLIC "-//ALTMOBILE//DTD SQL 1.1//EN"
"http://www.altMobile.com/DTD/xalanSQL10.dtd";>
<sql jdbc-driver="ORG.as220.tinySQL.dbfFileDriver"
jdbc-datasource="jdbc:dbfFile:./store/db"
system-dtd="http://www.wapforum.org/DTD/xhtml-mobile10.dtd";
public-dtd="-//WAPFORUM//DTD XHTML Mobile 1.0//EN" jdbc-query="select * from
MOVIES" formatParam="LIST" multiple-cards=""/>

There should be 100 or so elements transformed from the database but only
those created via LRE or via <xsl:element> in the XSL are generated to the
output.



My edited config is as follows:


#---- BEGIN writeEnvironmentReport($Revision: 1.14 $): Useful stuff
found: ----

version.DOM.draftlevel=2.0fd

version.JAXP=1.1

version.xerces2=Xerces-J 2.2.0

version.xerces1=not-present

version.xalan2_2=Xalan Java 2.4.1

version.xalan1=not-present

version.ant=not-present

java.version=1.4.1_01

version.DOM=2.0

version.crimson=present-unknown-version

xercesImpl.jar-apparent.version=xercesImpl.jar from xalan-j_2_4_1 from
xerces-2_2

xml-apis.jar-apparent.version=xml-apis.jar from xalan-j_2_4_1,
lotusxsl-j_2_3_4 or lotusxsl-j_2_3_5 from factoryfinder-build of xml-commons
RIVERCOURT1

version.SAX=2.0

version.xalan2x=Xalan Java 2.4.1

#----- END writeEnvironmentReport: Useful properties found: -----

# YAHOO! Your environment seems to be OK.



********************************


Here is the XSL but the same errors occur using the sample from the web site
with different JDBC drivers:


<?xml version="1.0"?>
 <xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="1.0"
  xmlns:sql="http://xml.apache.org/xalan/sql";
  extension-element-prefixes="sql"
 >
  <xsl:output method="xml"
    doctype-system="http://www.altMobile.com/DTD/xalanSQL10.dtd";
    doctype-public="-//ALTMOBILE//DTD SQL 1.1//EN"
    indent="yes"/>

  <xsl:param name="driver" select="'ORG.as220.tinySQL.dbfFileDriver'"/>
  <xsl:param name="datasource" select="'jdbc:dbfFile:./store/db'"/>
  <xsl:param name="query" select="'select * from MOVIES'"/>


  <xsl:param
   name="generated-system-dtd"
   select="'http://www.wapforum.org/DTD/xhtml-mobile10.dtd'"/>
  <xsl:param
   name="generated-public-dtd"
   select="'-//WAPFORUM//DTD XHTML Mobile 1.0//EN'"/>

  <xsl:param name="formatParam" select="'LIST'"/>

  <xsl:param name="multiple-cards"/>

  <xsl:template match="/">
   <xsl:variable name="db" select="sql:new($driver, $datasource)"/>
   <xsl:variable name="table" select='sql:query($db, $query)'/>
   <xsl:variable name="sqlDocElementVar" select="$table/sql"/>
   <xsl:element name="sql">
    <xsl:attribute name="jdbc-driver">
     <xsl:value-of select="$driver"/>
    </xsl:attribute>
    <xsl:attribute name="jdbc-datasource">
     <xsl:value-of select="$datasource"/>
    </xsl:attribute>
    <xsl:attribute name="system-dtd">
     <xsl:value-of select="$generated-system-dtd"/>
    </xsl:attribute>
    <xsl:attribute name="public-dtd">
     <xsl:value-of select="$generated-public-dtd"/>
    </xsl:attribute>
    <xsl:attribute name="jdbc-query">
     <xsl:value-of select="$query"/>
    </xsl:attribute>
    <xsl:attribute name="formatParam">
     <xsl:value-of select="$formatParam"/>
    </xsl:attribute>
    <xsl:attribute name="multiple-cards">
     <xsl:value-of select="$multiple-cards"/>
    </xsl:attribute>

<!-- the relevant code is here -->
    <xsl:copy-of select="$table/sql/metadata" />
    <xsl:copy-of select="$table/sql/row-set" />
   </xsl:element>

   <xsl:value-of select="sql:close($db)"/>
  </xsl:template>
 </xsl:stylesheet>




thanks--

Zaid

Reply via email to