Project

Profile

Help

"Unknown extension element" error with SQL

Added by Anonymous over 19 years ago

Legacy ID: #3034946 Legacy Poster: Kevin Rodgers (notorious_kev)

Error at function esd:title-suffix() on line 729 of file:/home/kevinr/Redstone/mb3extract2redstone.xsl: Unknown extension element Transformation failed: Run-time errors were reported Here's the xsl:stylesheet element: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:esd="http://esd.ihs.com/" xmlns:saxon="http://saxon.sf.net/" xmlns:sql="file:///net.sf.saxon.sql.SQLElementFactory" extension-element-prefixes="sql"> And here's my stylesheet, from line 729 on: <xsl:function name="esd:title-suffix"> <xsl:param name="relation"/> <xsl:value-of select="concat('(', $relation/@rel_type, ' ', esd:curr-doc-num($relation), ')')"/> </xsl:function> <xsl:function name="esd:curr-doc-num"> <xsl:param name="fam-id"/> <xsl:variable name="mb3" as="java:java.sql.Connection" xmlns:java="http://saxon.sf.net/java-type"> <sql:connect driver="oracle.jdbc.driver.OracleDriver" database="jdbc:oracle:thin:@host:port:sid" user="user" password="???"> <xsl:fallback> <xsl:message select="'SQL extension is not installed'" terminate="yes"/> </xsl:fallback> </sql:connect> </xsl:variable> <sql:query connection="$mb3" table="curr_doc" column="doc_nbr" where="fam_id=$fam-id"/> <sql:close connection="$mb3"/> </xsl:function> What am I doing wrong there? And why doesn't saxon report the name of the unknown extension element? Thanks, -- Kevin


Replies (2)

RE: &quot;Unknown extension element&quot; error with SQ - Added by Anonymous over 19 years ago

Legacy ID: #3035026 Legacy Poster: Michael Kay (mhkay)

I think the error happened because saxon8-sql.jar isn't on your classpath (e.g. because you invoked the transformation using "java -jar", which ignores the classpath). I'll see what can be done to improve the message. Michael Kay Saxonica Limited

RE: &quot;Unknown extension element&quot; error with SQ - Added by Anonymous over 19 years ago

Legacy ID: #3035139 Legacy Poster: Kevin Rodgers (notorious_kev)

Of course, you're correct abou the classpath (although I use the -classpath option, not -jar). Thanks! -- Kevin

    (1-2/2)

    Please register to reply