cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Conover <scono...@groundswell.net>
Subject trying to make sql evaluate instead of just passing thru sql tags
Date Thu, 10 Aug 2000 21:36:11 GMT
here's my content file:

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page
    language="java"
    xmlns:user="http://www.groundswell.net/2000/XSP/User"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>

    <page>
        <title>Upload a document to the repository  </title>
        <p>Click on "browse" to select a file from your computer to
upload.</p>
        <uploadbox/>
        <p>Click "submit" to continue</p>
        <continuebutton/>
        <user:basicprofile userid="" /> 
    </page>

</xsp:page>



here's my taglib:

<?xml version="1.0"?>
<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:template match="page">
    
    <xsl:processing-instruction
name="cocoon-process">type="xsp"</xsl:processing-instruction>

    <xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:sql="http://www.apache.org/1999/SQL">
        <test>
            <xsl:apply-templates/>
        </test>
    </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=<xsp:expr>request.getParameter("userid")</xsp:expr></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>

All it does is dump the sql tags into my content file...how to I get it to
execute the query and replace those tags with a rowset?

Regards,
Steve

Mime
View raw message