cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Conover <scono...@groundswell.net>
Subject RE: second try -- trying to make sql evaluate instead of just p assingthru sql tags
Date Fri, 11 Aug 2000 16:52:35 GMT
ok that worked.  I changed the order of the stylesheets...I have no idea why
that cured the weird error I was getting (and would like to understand why
if someone knows).

Then I put my query back in the taglib, adjusted the namespace order in the
taglib, but I'm getting the same error as before:

java.lang.Exception: XSP Java Compiler: Compilation failed for
_uploadform.java
66: Undefined variable, class, or package name: org

    org.apache.cocoon.processor.xsp.library.sql.XSPSQLLibrary

    ^

1 error



here's my tablib now (the sql statement wraps because of the email format -
it's all one line in my file)

<?xml version="1.0"?>

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


  <xsl:template match="xsp:page">
    
    <xsl:processing-instruction
name="cocoon-process">type="xsp"</xsl:processing-instruction>
    <xsl:processing-instruction
name="cocoon-process">type="xslt"</xsl:processing-instruction>
    <xsl:processing-instruction name="xml-stylesheet">href="upload.xsl"
type="text/xsl"</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>



> -----Original Message-----
> From: Sebastien Koechlin [mailto:skoechlin@ivision.fr]
> Sent: Friday, August 11, 2000 10:46 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: second try -- trying to make sql evaluate instead of just
> passingthru sql tags
> 
> 
> Steve Conover wrote:
> 
> > I tried putting everything in the same document, and I get 
> this error:
> >
> > Error found handling the request.
> > java.lang.Exception: XSP Java Compiler: Compilation failed for
> > _uploadform.java
> 
> You have a problem with
>     xmlns:user="http://www.groundswell.net/2000/XSP/User"
> 
> 
> > <?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"
> >       xmlns:sql="http://www.apache.org/1999/SQL"
> > >
> 
> Can you remove the 'user' namespace, you don't need it anymore.
> Also think about swapping xsp and sql as stylesheet are applied
> one by one in order.
> 
> 
> >         <sql:query>select fname, lname from employee_t where
> > 
> empid=<xsp:expr>request.getParameter("userid")</xsp:expr></sql:query>
> 
> Make sure you wrote your query on a single line as Java does
> not allow multi-line string.
> 
> --
> S├ębastien Koechlin
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

Mime
View raw message