You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jin Wei Yong <jw...@yahoo.com> on 2002/12/08 04:45:44 UTC

SQL query cannot be read.

Hi, 
I am still exploring the use of SQLTranformer. I am
using a book, Cocoon:Building XML Application by
Matthew Langham and Carsten Ziegeler. If you have the
book, you can refer to Chapter 7. The this SQL-related
example does not use XSP at all. The query is written
in the xsl file.

In the example, I use subsitemap, which is the only
difference from Langham's example. 

I write the following in the xsl file:

<user>    
 <execute-query
xmlns="http://apache.org.cocoon/SQL/2.0">
 <use-connection>personnel</use-connection>
 <query>
    INSERT INTO DEPARTMENT_TABLE VALUES(18,'jinwei2') 
      	
 </query>        
 </execute-query>
<user>

however, the SQL statement cannot be executed.

When I check the Cocoon.log file, Langham's example is
as follows:

/JaxpParser: Looking up
org.apache.cocoon.components.resolver.Resolver
/JaxpParser: SAXParserFactory: null
/JaxpParser: DocumentBuilderFactory: null
/JaxpParser: SAXParser: null
/SQLTransformer: PUBLIC ID: null
/SQLTransformer: SYSTEM ID:
file:/C:/jakarta-tomcat-3.3a/webapps/cocoon/sqlexample.xml
/SQLTransformer: RECEIVED CHARACTERS: 
/SQLTransformer: RECEIVED START ELEMENT execute-query
/SQLTransformer: RECEIVED CHARACTERS:  
/SQLTransformer: RECEIVED START ELEMENT use-connection
/SQLTransformer: RECEIVED CHARACTERS: personnel
/SQLTransformer: RECEIVED END ELEMENT
use-connection(http://apache.org/cocoon/SQL/2.0)
/SQLTransformer: SETTING VALUE ELEMENT name
{use-connection} value {personnel}
/SQLTransformer: RECEIVED CHARACTERS: 
/SQLTransformer: RECEIVED START ELEMENT query
/SQLTransformer: RECEIVED CHARACTERS: 
  INSERT INTO DEPARTMENT_TABLE VALUES(19,'jinwei2')
/SQLTransformer: RECEIVED END ELEMENT
query(http://apache.org/cocoon/SQL/2.0)
/SQLTransformer: QUERY IS "
  INSERT INTO DEPARTMENT_TABLE VALUES(19,'jinwei2')
	"
/SQLTransformer: RECEIVED CHARACTERS: 
/SQLTransformer: RECEIVED END ELEMENT
execute-query(http://apache.org/cocoon/SQL/2.0)
/SQLTransformer: SQLTransformer executing query nr 0
/SQLTransformer$Query: EXECUTING 
  INSERT INTO DEPARTMENT_TABLE VALUES(19,'jinwei2')
/DefaultPool: Retrieving a
org.apache.avalon.excalibur.datasource.JdbcConnection
from the pool

whereas my log is something like:

JaxpParser: Looking up
org.apache.cocoon.components.resolver.Resolver
/JaxpParser: SAXParserFactory: null
/JaxpParser: DocumentBuilderFactory: null
/JaxpParser: SAXParser: null
/SQLTransformer: RECEIVED CHARACTERS: personnel
/SQLTransformer: RECEIVED CHARACTERS: 
  INSERT INTO DEPARTMENT_TABLE VALUES(19,'jinwei2')
/URLFactoryImpl: Making URL from
file:/C:/jakarta-tomcat-3.3a/webapps/cocoon/boac/stylesheets/../documents/toc.xml
/URLFactoryImpl: Making URL from
file:/C:/jakarta-tomcat-3.3a/webapps/cocoon/boac/stylesheets/../documents/toc.xml
/DefaultComponentFactory: ComponentFactory
decommissioning instance of
org.apache.cocoon.components.parser.JaxpParser.
/DefaultPool: Returning a
org.apache.cocoon.components.sax.XMLByteStreamCompiler
to the pool
/CachingEventPipeline: Recycling of
CachingEventPipeline
/DefaultPool: Returning a
org.apache.cocoon.generation.FileGenerator to the pool

One thing to note is that the start/end elements are
not being read. Have I missed out anything in the
configuration?

Thanks very much.



__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: SQL query cannot be read.

Posted by Gabriele Domenichini <ga...@fastmail.fm>.
Don't Know try to use the same namespace qualifiers (sql:)...

Jin Wei Yong wrote:

>Hi, 
>I am still exploring the use of SQLTranformer. I am
>using a book, Cocoon:Building XML Application by
>Matthew Langham and Carsten Ziegeler. If you have the
>book, you can refer to Chapter 7. The this SQL-related
>example does not use XSP at all. The query is written
>in the xsl file.
>
>In the example, I use subsitemap, which is the only
>difference from Langham's example. 
>
>I write the following in the xsl file:
>
><user>    
> <execute-query
>xmlns="http://apache.org.cocoon/SQL/2.0">
> <use-connection>personnel</use-connection>
> <query>
>    INSERT INTO DEPARTMENT_TABLE VALUES(18,'jinwei2') 
>      	
> </query>        
> </execute-query>
><user>
>
>however, the SQL statement cannot be executed.
>
>When I check the Cocoon.log file, Langham's example is
>as follows:
>
>/JaxpParser: Looking up
>org.apache.cocoon.components.resolver.Resolver
>/JaxpParser: SAXParserFactory: null
>/JaxpParser: DocumentBuilderFactory: null
>/JaxpParser: SAXParser: null
>/SQLTransformer: PUBLIC ID: null
>/SQLTransformer: SYSTEM ID:
>file:/C:/jakarta-tomcat-3.3a/webapps/cocoon/sqlexample.xml
>/SQLTransformer: RECEIVED CHARACTERS: 
>/SQLTransformer: RECEIVED START ELEMENT execute-query
>/SQLTransformer: RECEIVED CHARACTERS:  
>/SQLTransformer: RECEIVED START ELEMENT use-connection
>/SQLTransformer: RECEIVED CHARACTERS: personnel
>/SQLTransformer: RECEIVED END ELEMENT
>use-connection(http://apache.org/cocoon/SQL/2.0)
>/SQLTransformer: SETTING VALUE ELEMENT name
>{use-connection} value {personnel}
>/SQLTransformer: RECEIVED CHARACTERS: 
>/SQLTransformer: RECEIVED START ELEMENT query
>/SQLTransformer: RECEIVED CHARACTERS: 
>  INSERT INTO DEPARTMENT_TABLE VALUES(19,'jinwei2')
>/SQLTransformer: RECEIVED END ELEMENT
>query(http://apache.org/cocoon/SQL/2.0)
>/SQLTransformer: QUERY IS "
>  INSERT INTO DEPARTMENT_TABLE VALUES(19,'jinwei2')
>	"
>/SQLTransformer: RECEIVED CHARACTERS: 
>/SQLTransformer: RECEIVED END ELEMENT
>execute-query(http://apache.org/cocoon/SQL/2.0)
>/SQLTransformer: SQLTransformer executing query nr 0
>/SQLTransformer$Query: EXECUTING 
>  INSERT INTO DEPARTMENT_TABLE VALUES(19,'jinwei2')
>/DefaultPool: Retrieving a
>org.apache.avalon.excalibur.datasource.JdbcConnection
>from the pool
>
>whereas my log is something like:
>
>JaxpParser: Looking up
>org.apache.cocoon.components.resolver.Resolver
>/JaxpParser: SAXParserFactory: null
>/JaxpParser: DocumentBuilderFactory: null
>/JaxpParser: SAXParser: null
>/SQLTransformer: RECEIVED CHARACTERS: personnel
>/SQLTransformer: RECEIVED CHARACTERS: 
>  INSERT INTO DEPARTMENT_TABLE VALUES(19,'jinwei2')
>/URLFactoryImpl: Making URL from
>file:/C:/jakarta-tomcat-3.3a/webapps/cocoon/boac/stylesheets/../documents/toc.xml
>/URLFactoryImpl: Making URL from
>file:/C:/jakarta-tomcat-3.3a/webapps/cocoon/boac/stylesheets/../documents/toc.xml
>/DefaultComponentFactory: ComponentFactory
>decommissioning instance of
>org.apache.cocoon.components.parser.JaxpParser.
>/DefaultPool: Returning a
>org.apache.cocoon.components.sax.XMLByteStreamCompiler
>to the pool
>/CachingEventPipeline: Recycling of
>CachingEventPipeline
>/DefaultPool: Returning a
>org.apache.cocoon.generation.FileGenerator to the pool
>
>One thing to note is that the start/end elements are
>not being read. Have I missed out anything in the
>configuration?
>
>Thanks very much.
>
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>http://mailplus.yahoo.com
>
>---------------------------------------------------------------------
>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:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>
>
>
>  
>



---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>