cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Conover <scono...@smtp.groundswell.net>
Subject my taglib & sql xsp taglib problems
Date Thu, 10 Aug 2000 16:34:55 GMT
I have my own taglib that has sql taglib calls (pasted in at the end of this
email).  When I call user:basicprofile in my main xml file, all it does is
return the sql tags directly, instead of evaluating the sql call first.  Why
is that - I think I'm missing something big in terms of why and when tags
get processed by the various processors.

Regards,
Steve




<?xml version="1.0"?>

<?cocoon-process type="xsp"?>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:user="http://www.groundswell.net/2000/XSP/User"
  xmlns:sql="http://www.apache.org/1999/SQL"
>
  <xsl:param name="empid"/>

  <xsl:template match="xsp:page">
    <xsp:page>
        <page>
            <xsl:apply-templates/>
        </page>
    </xsp:page>
  </xsl:template>

  <xsl:template match="user:basicprofile">
     <sql:execute-query>
	<sql:driver>oracle.jdbc.driver.OracleDriver</sql:driver>
	<sql:dburl>jdbc:oracle:thin:@pls-prod-01:1521:prod01</sql:dburl>
        <sql:username>portal</sql:username>
        <sql:password>portal</sql:password>
	<sql:doc-element>users</sql:doc-element>
	<sql:row-element>user</sql:row-element>
	<sql:tag-case>lower</sql:tag-case>
	<sql:null-indicator>yes</sql:null-indicator>
	<sql:id-attribute>empid</sql:id-attribute>
	<sql:id-attribute-column>empid</sql:id-attribute-column>
	<sql:query>select fname, lname from employee_t where
empid=<xsl:value-of select="($empid)"/></sql:query>
        <sql:count-attribute>count</sql:count-attribute>
     </sql:execute-query>
  </xsl:template>

  <xsl:template match="@*|node()" priority="-1">
    <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy>
  </xsl:template>

</xsl:stylesheet>



Mime
View raw message