cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Cocoon bug ? XSLT transform before SQL transform
Date Thu, 20 Jun 2002 13:01:27 GMT
> From: Paul Terray [mailto:terray@4dconcept.fr]
> 
> Hello all,

Paul,

You, as user of this list, should not only send questions, but also read
and answer on replies on your questions.

Please, read:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=102449556711953&w=2.


PS CC'ing you so you don't mess it.

Regards,
Vadim

 
> I want to submit a query through the SQL transformer, after a short
> transformation with XSLT. However, each time I do that, I get an error
:
> ---------
> Message : Could not read resource file:/C:/Program Files/Apache Tomcat
> 4.0/webapps/cocoon-dev/sql/sql-page-test.xml
> ---------
> 
> The beginning of the Stack Trace is :
> -----------
> org.apache.cocoon.ProcessingException: Could not read resource
> file:/C:/Program Files/Apache Tomcat
> 4.0/webapps/cocoon-dev/sql/sql-page-test.xml:
java.lang.RuntimeException:
> java.lang.NullPointerException
>          at
>
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:1
55)
>          at
>
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
ngEven
> tPipeline.java:251)
> ----------
> 
> If I just do the XSLT transform, everything work fine, and if I take
the
> result of this transformation and feed it directly to SQL transform,
> everything goes fine as well ! I just cannot have the two working
together...
> 
> Here is my original XML (sql-page-text.xml) :
> ---------
> <?xml version="1.0"?>
> 
> <page>
> 
>   <title>Hello</title>
>   <content>
>           <para>GEDI : Interrogation de la base</para>
> 
> 
>           <test/>
>   </content>
> </page>
> --------------
> 
> The XSL (param-sql.xsl) is :
> --------------
> <?xml version="1.0" encoding="utf-8"?>
> 
> <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>          <xsl:param name="name" select="'cn=paul'"/>
>          <xsl:template
match="*|@*|processing-instruction()|comment()">
>                  <xsl:copy>
>                          <xsl:apply-templates select="@*"/>
>                          <xsl:apply-templates select="node()"/>
>                  </xsl:copy>
>          </xsl:template>
> 
>          <xsl:template match="test">
>            <sql:execute-query>
>             <sql:query>
>               select * from langue
>             </sql:query>
>            </sql:execute-query>
>          </xsl:template>
> </xsl:stylesheet>
> -----------
> 
> and my sitemap is :
> -----------
> <map:match pattern="bdgeditest.xml">
>   <map:generate src="sql/sql-page-test.xml"/>
>   <map:transform src="transforms/param-sql.xsl"/>
>   <map:transform type="sql">
>    <map:parameter name="use-connection" value="gedi_db"/>
>   </map:transform>
>   <map:serialize type="html"/>
> </map:match>
> ----------
> 
> My config :
> - Apache 2.0.36
> - Cocoon 2.0.2-dev
> - Tomcat 4.0.4 final
> 
> Thanks in advance.
> 
> --
> Paul TERRAY - Documents Management Systems Engineer
> email : terray@4dconcept.fr


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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