Albert, one at a time... comment out the SQL Transformer step and the following ones (remember to put an XML serializer instead of the default one): let's see what the SQL Transformer gets as input.
Best regards, --------------------------------------------- Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html --------------------------------------------- > -----Original Message----- > From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] > Sent: Monday, August 12, 2002 6:12 PM > To: [EMAIL PROTECTED] > Subject: Re: Could not read resource file > > > > > Hi Albert, > > > > Is it ok that in the first your mail some lines are cutted: > > <map:parameter name="document" value="cocoon:// > > <map:parameter name="instruccions" value="{../i > > Sorry, I didn't realize it was a matter copy and paste: > cocoon://trad-facturacio has no longer sense and now is docs/facturacio.xml > > <map:match pattern="dins-facturacio"> > <map:generate src="docs/dins.xml"/> > <map:transform src="stylesheets/dins.xsl"> > <map:parameter name="document" value="cocoon://trad-facturacio"/> > <map:parameter name="usuari" value="{../ID}"/> > <map:parameter name="nom" value="{../nom}"/> > <map:parameter name="instruccions" value="{../instruccions}"/> > </map:transform> > <map:transform type="xinclude"/> > <map:transform src="stylesheets/facturacio-db.xsl"> > <map:parameter name="usuari" value="{../ID}"/> > </map:transform> > <map:transform type="sql"> > <map:parameter name="use-connection" value="cocoon"/> > </map:transform> > <map:transform src="stylesheets/facturacio.xsl"> > <map:parameter name="usuari" value="{../ID}"/> > <map:parameter name="nom" value="{../nom}"/> > </map:transform> > <map:serialize/> > </map:match> > > > > > By the way could you, please, explain me, where the parameters {../ID} > > and {../nom} are from, because I used Cocoon 2.0.1 only. > It hasn't much to do with cocoon but with sun-rise authentication > actions... When a user authenticates you can access some stored that from > him/her in this case the ID, name and instructions for a program. > > As I said I used to call facturacio.xml through cocoon://trad-facturacio > but I made some changes..... to process the facturacio.xml with a XSL file > I need to give those values (ID, name...) to the xsl transformer and with > a call like cocoon://... those values are not available. > That's why I decided to xinclude the file one file inside the other and > process both but just ignoring the tags not useful to me... however as you > see I keep on having problems with it. > If someone knew how to access the ID value of sun-rise then it could be > another solution too. > > > > > > Thank you in advance, > > Roman > > > > > > Albert Cervera Areny wrote: > > > >> It's strange but, when using this pipe it works ok too. It's not what > >> I need though. > >> > >> <map:match pattern="dins-facturacio"> > >> <map:generate src="docs/facturacio.xml"/> > >> <map:transform src="stylesheets/facturacio-db.xsl"> > >> <map:parameter name="usuari" value="{../ID}"/> > >> </map:transform> > >> <map:transform type="sql"> > >> <map:parameter name="use-connection" value="cocoon"/> > >> </map:transform> > >> <map:transform src="stylesheets/facturacio.xsl"> > >> <map:parameter name="usuari" value="{../ID}"/> > >> <map:parameter name="nom" value="{../nom}"/> > >> </map:transform> > >> <map:serialize/> > >> </map:match> > >> > >> Is there a limit in the number of transforms? Why should it give an > >> error with the generator anyway? > >> > >> > Hi I've got the following in sitemap.xmap: > >> > > >> > <map:match pattern="dins-facturacio"> > >> > <map:generate src="docs/dins.xml"/> > >> > <map:transform src="stylesheets/dins.xsl"> > >> > <map:parameter name="document" value="cocoon:// > >> > <map:parameter name="usuari" value="{../ID}"/> > >> > <map:parameter name="nom" value="{../nom}"/> > >> > <map:parameter name="instruccions" value="{../i > >> > </map:transform> > >> > <map:transform type="xinclude"/> > >> > <map:transform src="stylesheets/facturacio-db.xsl"> > >> > <map:parameter name="usuari" value="{../ID}"/> > >> > </map:transform> > >> > <map:transform type="sql"> > >> > <map:parameter name="use-connection" value="cocoon"/> > >> > </map:transform> > >> > <map:transform src="stylesheets/facturacio.xsl"> > >> > <map:parameter name="usuari" value="{../ID}"/> > >> > <map:parameter name="nom" value="{../nom}"/> > >> > </map:transform> > >> > <map:serialize/> > >> > </map:match> > >> > > >> > The first transform is needed (doesn't depend on me) and then I > >> include the xml file that shuld go inside the html generated by > >> dins.xsl. Then the xml file included by xinclude is has to be > >> processed by sql tranform and this result by facturacio.xsl (I had > >> to do it that way because a call to cocoon://facturacio.xml from > >> dins.xsl didn't enable facturacio-db.xsl to see the {../ID} value). > >> > > >> > Well.. the problem is that the sql transform gives an error if > >> inside facturacio-db.xsl I put a matcher to copy all nodes that I > >> don't have to modify (to leave the html file as is). However, it > >> works well if I take the output after db-facturacio.xsl, save it as > >> XML and create another pipe like this one: > >> > > >> > <map:generate src="docs/result.xml"/> > >> > <map:transform type="sql"> > >> > <map:parameter name="use-connection" value="cocoon"/> > >> > </map:transform> > >> > <map:transform src="stylesheets/facturacio.xsl"> > >> > <map:parameter name="usuari" value="{../ID}"/> > >> > <map:parameter name="nom" value="{../nom}"/> > >> > </map:transform> > >> > <map:serialize/> > >> > > >> > Any Ideas?? > >> > > >> > Thanks! > >> > > >> > > >> > The error generated by sql transformer is: > >> > -Message: > >> > Could not read resource > >> > file:/var/lib/tomcat/webapps/usuaris/docs/dins.xml > >> > > >> > -Description: > >> > description org.apache.cocoon.ProcessingException: Could not read > >> resource file:/var/lib/tomcat/webapps/usuaris/docs/dins.xml: > >> > java.lang.RuntimeException: java.lang.RuntimeException: > >> > java.lang.NullPointerException > >> > > >> > -Sender: > >> > sender org.apache.cocoon.servlet.CocoonServlet > >> > > >> > -Stack Trace: > >> > > >> > org.apache.cocoon.ProcessingException: Could not read resource > >> file:/var/lib/tomcat/webapps/usuaris/docs/dins.xml: > >> > java.lang.RuntimeException: java.lang.RuntimeException: > >> > java.lang.NullPointerException > >> > at > >> > org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:155) > >> at > >> > >org.apache.cocoon.components.pipeline.AbstractEventPipeline.process(AbstractEventPipeline.java:166) > >> at > >> > >org.apache.cocoon.components.pipeline.AbstractStreamPipeline.process(AbstractStreamPipeline.java:192) > >> at > >> > > >org.apache.cocoon.www.sitemap_xmap.matchN102B9(/var/cache/tomcat/DEFAULT/usuaris/cocoon-files/org/apache/cocoon/www/sitema p_xmap.java:3142) > >> at > >> > > >org.apache.cocoon.www.sitemap_xmap.process(/var/cache/tomcat/DEFAULT/usuaris/cocoon-files/org/apache/cocoon/www/sitemap_xm ap.java:1632) > >> at > >> > > >org.apache.cocoon.www.sitemap_xmap.process(/var/cache/tomcat/DEFAULT/usuaris/cocoon-files/org/apache/cocoon/www/sitemap_xm ap.java:1516) > >> at org.apache.cocoon.sitemap.Handler.process(Handler.java:222) at > >> org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179) > >> > at > >> > org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154) > >> at org.apache.cocoon.Cocoon.process(Cocoon.java:575) > >> > at > >> > org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998) > >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at > >> > org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:484) > >> at org.apache.tomcat.core.Handler.invoke(Handler.java:322) > >> > at org.apache.tomcat.core.Handler.service(Handler.java:235) > >> > at > >> > org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:432) > >> at > >> > org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917) > >> at > >> > org.apache.tomcat.core.ContextManager.service(ContextManager.java:833) > >> at > >> > >org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Interceptor.java:213) > >> at > >> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:477) > >> at > >> > >org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:519) > >> at java.lang.Thread.run(Thread.java:484) > >> > > >> > etc, etc.... > >> > > >> > -- > >> > Albert Cervera Areny > >> > Dept. Informātica Sedifa, S.L. > >> > > >> > > >> > > >> > --------------------------------------------------------------------- > >> 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: > >> <[EMAIL PROTECTED]> For additional commands, > >> e-mail: <[EMAIL PROTECTED]> > >> > >> -- > >> Albert Cervera Areny > >> Dept. Informātica Sedifa, S.L. > >> > >> --------------------------------------------------------------------- > >> 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: <[EMAIL PROTECTED]> > >> For additional commands, e-mail: <[EMAIL PROTECTED]> > > > > > > --------------------------------------------------------------------- > > 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: <[EMAIL PROTECTED]> > > For additional commands, e-mail: <[EMAIL PROTECTED]> > > > -- > Albert Cervera Areny > Dept. Informātica Sedifa, S.L. > > > > --------------------------------------------------------------------- > 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: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>