Stylesheet in Cocoon
Hi all. I am trying to create a stylesheet using cocoon and then apply this stylesheet to some input. I need to declare a root element with different namespace declarations. When I was using batch file instead of Cocoon, I just wrote it as a string, e.g.: xsl:text disable-output-escaping="yes" lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon"xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" gt; /xsl:text Since I was writing it to a file, it was written out as an rootelement. But when I try to use the same method from Cocoon, it doesn't work, because Cocoon writes this out as a string, and in this case the output document will not have a root element. I tried to declare the root inside an element, like this: xsl:element name="xsl:stylesheet" xsl:attribute name="version"1.0/xsl:attribute xsl:attribute name="xmlns:xsl"http://www.w3.org/1999/XSL/Transform/xsl:attribute xsl:attribute name="xmlns:saxon"http://icl.com/saxon/xsl:attribute xsl:attribute name="xmlns:rdf"http://www.w3.org/1999/02/22-rdf-syntax-ns#/xsl:attribute xsl:attribute name="extension-element-prefixes"saxon/xsl:attribute /xsl:element But what I get in the output is this: xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" extension-element-prefixes="saxon" i.e. xmlns:saxon and xmlns:rdf weren't written out. And then, when I try to run the generated stylesheet on the html input, I get an error: type fatal message org.apache.cocoon.ProcessingException: Could not read resource file:/C:/Program Files/Apache Group/Tomcat 4.1/webapps/cocoon/ub/violations.html: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Invalid processing instruction name (saxon:warning) sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet I guess this is because the above namespace declarations are missing, because if I apply the xsl that was generated outside the Cocoon (using batch file) - it works fine, and the only difference that I can see between these two files is that namespace declarations thing. Maybe it's because something else, I don't know, I am not good in Cocoon yet. So if somebody have some idea, what is wrong with my code, and what should I do, please tell me. P.S. I searched the archives for the issue of "invalid processing instruction (saxon:warning)" and found one topic, but I didn't understood it and I even don't know if this relates to my problem. Thank you very much for help. Anna
Re: xsl through pipeline [NOT supported???]
in my case when i call http://...cocoon/generateXSL where generateXSL is a pipeline that produce the xsl i want i get in my browser the right (produced) xsl file. but this file make to sense when i call it using cocoon:/ protocol in an other pipeline to transform a xml file maybe this approach dosnt supported from cocoon (yet..) if this is not my fault (if i dont miss somenthing then is a good idea to make a post to -dev- list) i dont understand what can be the content of your test.html is it a xml file or an empty file? in my case i want instead of your test.html to have xslInstructions.xml On Mon, 23 Dec 2002, Anna Afonchenko wrote: Hi Stavros. Here are my pipelines for using xsl generated through Cocoon: map:match pattern=try map:generate src=ub/violations.html/ map:transform type=xslt-saxon src=cocoon://generateXsl/ map:serialize type=xml/ /map:match map:match pattern=generateXsl map:generate src=ub/test.html/ map:transform type=xslt-saxon src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match In pipeline generateXsl I use dummy html for generator, because for some reason, if I try to write instead: map:match pattern=generateXsl map:generate src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match then what I get calling cocoon/try is the stylesheet generateXSL (exactly as if I was just calling cocoon/generateXsl) - I don't understand this, but maybe someone more experienced than me on this list can explain it to us. But maybe you should also use dummy html/xml in generator? BTW, now I posted a message about creating some more complicated stylesheets through Cocoon, because when I try to create some more complicated xsl, I get an error. But for some simple xsl it works fine for me, so check both your pipelines and your xsl. Good luck. Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:03 PM Subject: Re: xsl through pipeline [NOT supported???] hi anna thnx for your reply i try this very simple sample before go on and i dont get the result i want. it very strange to be any problem in .xsl becaus its very simple. is it possible to send me a snapshot of your sitemap where your .xsl pass (and generated) through a pipeline? stavros i u want to contact me directly use: [EMAIL PROTECTED] On Mon, 23 Dec 2002, Anna Afonchenko wrote: Cocoon definitely supports using transformer that is itself generated by some pipeline. At least, it works for me. Maybe you have some problems in your xsl? - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 23, 2002 1:58 AM Subject: xsl through pipeline [NOT supported???] i try to transform a .xml using a .xsl that will be generated using a pipeline in my sitemap i have map:match pattern=myXML map:generate src=./myxml.xml/ map:transform src=./myxsl.xsl/ map:serialize type=xml/ /map:match map:match pattern=myXMLagain map:generate src=myxml.xml/ map:transform src=cocoon:/getXSL/ map:serialize type=xml/ /map:match map:match pattern=getXSL map:generate src=./myxsl.xsl/ map:serialize type=xml/ /map:match -- this is a very simple example (there is no transformation in getXSL, if this work i will try to produce the .xsl) when i call http:///myXML i get the results i wait for when i call http:///getXSL i see in my browser my xsl file (in xml format) but whet i call http:///myXMLagain i dont get any error msg but i dont get any results it seems like cocoon just ignore [map:transform src=cocoon:/getXSL/] line os get an empty xsl. maybe this is something that cocoon not support or something else ? i try to produce dynamic the xsl file. i want users be able to describe xsl's files using a simple xml. thnx stavros kounis - 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] - 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]
Re: PHP status?
I asked about PHP within Cocoon and At 23:32 22/12/02, Nicola Ken Barozzi wrote: * Allows PHP to be used as a generator. Builds upon the PHP servlet * functionallity - overrides the output method in order to pipe the * results into SAX events. Looking at the code, it takes the Request, calls a PhPServlet, and injects the PHPServlet result into Cocoon as a Sax Stream. Ok, so it looks like if I need information I'll have to figure it out myself. (So what's new :-) For instance I am not sure how the PHPServlet fits in to this - is it part of Cocoon? I assumed that PHP had to be run by the compiled C apache module rather than a separate servlet. I am not sure how it maintains state between calls - ie does my Cocoon sitemap have to know about all the potential parameters which my PHP code may use Hmmm. Any PHP/Cocoon users please email me. Stand up and be counted. Alex Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, First meeting free.http://www.OWAL.co.uk/ - 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]
Re: xsl through pipeline [NOT supported???]
Stavros What happens if you try to generate your xsl outside cocoon (using batch file) and then just use it as a transformer in your pipeline (i.e. without calling the cocoon:/ protocol)? If you get the right answer there, then I think the problem is with cocoon, but it is strange, because I don't see any dramatic difference between your sitemap and mine. But as I said, I'm new to cocoon, so I may be wrong. Maybe somebody else will be able to give better answer. Good luck Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:45 PM Subject: Re: xsl through pipeline [NOT supported???] in my case when i call http://...cocoon/generateXSL where generateXSL is a pipeline that produce the xsl i want i get in my browser the right (produced) xsl file. but this file make to sense when i call it using cocoon:/ protocol in an other pipeline to transform a xml file maybe this approach dosnt supported from cocoon (yet..) if this is not my fault (if i dont miss somenthing then is a good idea to make a post to -dev- list) i dont understand what can be the content of your test.html is it a xml file or an empty file? in my case i want instead of your test.html to have xslInstructions.xml On Mon, 23 Dec 2002, Anna Afonchenko wrote: Hi Stavros. Here are my pipelines for using xsl generated through Cocoon: map:match pattern=try map:generate src=ub/violations.html/ map:transform type=xslt-saxon src=cocoon://generateXsl/ map:serialize type=xml/ /map:match map:match pattern=generateXsl map:generate src=ub/test.html/ map:transform type=xslt-saxon src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match In pipeline generateXsl I use dummy html for generator, because for some reason, if I try to write instead: map:match pattern=generateXsl map:generate src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match then what I get calling cocoon/try is the stylesheet generateXSL (exactly as if I was just calling cocoon/generateXsl) - I don't understand this, but maybe someone more experienced than me on this list can explain it to us. But maybe you should also use dummy html/xml in generator? BTW, now I posted a message about creating some more complicated stylesheets through Cocoon, because when I try to create some more complicated xsl, I get an error. But for some simple xsl it works fine for me, so check both your pipelines and your xsl. Good luck. Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:03 PM Subject: Re: xsl through pipeline [NOT supported???] hi anna thnx for your reply i try this very simple sample before go on and i dont get the result i want. it very strange to be any problem in .xsl becaus its very simple. is it possible to send me a snapshot of your sitemap where your .xsl pass (and generated) through a pipeline? stavros i u want to contact me directly use: [EMAIL PROTECTED] On Mon, 23 Dec 2002, Anna Afonchenko wrote: Cocoon definitely supports using transformer that is itself generated by some pipeline. At least, it works for me. Maybe you have some problems in your xsl? - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 23, 2002 1:58 AM Subject: xsl through pipeline [NOT supported???] i try to transform a .xml using a .xsl that will be generated using a pipeline in my sitemap i have map:match pattern=myXML map:generate src=./myxml.xml/ map:transform src=./myxsl.xsl/ map:serialize type=xml/ /map:match map:match pattern=myXMLagain map:generate src=myxml.xml/ map:transform src=cocoon:/getXSL/ map:serialize type=xml/ /map:match map:match pattern=getXSL map:generate src=./myxsl.xsl/ map:serialize type=xml/ /map:match -- this is a very simple example (there is no transformation in getXSL, if this work i will try to produce the .xsl) when i call http:///myXML i get the results i wait for when i call http:///getXSL i see in my browser my xsl file (in xml format) but whet i call http:///myXMLagain i dont get any error msg but i dont get any results it seems like cocoon just ignore [map:transform src=cocoon:/getXSL/] line os get an empty xsl. maybe this is something that cocoon not support or something else ? i try to produce dynamic the xsl file. i want users be able to describe xsl's files using a simple xml. thnx stavros kounis - 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:
Re: Cocoon + Squid
Fabricio Chalub [EMAIL PROTECTED] writes: Does anybody here using Cocoon+Squid have any hints on the best configuration for this combination? Since (as far as I know) Cocoon 2.0.x doesn't have any way of helping proxy caches (like Last-Modified, for instance) and the expires parameter of the pipeline is only functional on the 2.1 branch, I'm /forcing/ Squid to cache the pages for X minutes (currently X = 30), modulo the forms and search results pages (since those results would be cached too! ;). This doesn't seem like an optimal configuration, but I can't think of any other way ... Actually you can write an action which will set the 'Expires' header and call it in appropriate places. -- WBR, Dmitriy - 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]
Re: xsl through pipeline [NOT supported???]
i have try to ask http:///cocoon/generateXSL/ with a browser and save the output (XSL) im my disk then i use this XSL to transform a xml file (into xmlspy) and everything are OK. another one test using map:transform src=savedXSL.xsl/ my transformation work fine (savedXSL.xsl is the file i have get above) replace this entry with map:transform src=cocoon:/generateXSL/ my pipeline give me an output other than i expect(i thing that map:transform src=cocoon:/generateXSL/ return an empty .xsl file) maybe we need the cocoons guru help :-) stavros (what a problem 2 days before christmas ) On Mon, 23 Dec 2002, Anna Afonchenko wrote: Stavros What happens if you try to generate your xsl outside cocoon (using batch file) and then just use it as a transformer in your pipeline (i.e. without calling the cocoon:/ protocol)? If you get the right answer there, then I think the problem is with cocoon, but it is strange, because I don't see any dramatic difference between your sitemap and mine. But as I said, I'm new to cocoon, so I may be wrong. Maybe somebody else will be able to give better answer. Good luck Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:45 PM Subject: Re: xsl through pipeline [NOT supported???] in my case when i call http://...cocoon/generateXSL where generateXSL is a pipeline that produce the xsl i want i get in my browser the right (produced) xsl file. but this file make to sense when i call it using cocoon:/ protocol in an other pipeline to transform a xml file maybe this approach dosnt supported from cocoon (yet..) if this is not my fault (if i dont miss somenthing then is a good idea to make a post to -dev- list) i dont understand what can be the content of your test.html is it a xml file or an empty file? in my case i want instead of your test.html to have xslInstructions.xml On Mon, 23 Dec 2002, Anna Afonchenko wrote: Hi Stavros. Here are my pipelines for using xsl generated through Cocoon: map:match pattern=try map:generate src=ub/violations.html/ map:transform type=xslt-saxon src=cocoon://generateXsl/ map:serialize type=xml/ /map:match map:match pattern=generateXsl map:generate src=ub/test.html/ map:transform type=xslt-saxon src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match In pipeline generateXsl I use dummy html for generator, because for some reason, if I try to write instead: map:match pattern=generateXsl map:generate src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match then what I get calling cocoon/try is the stylesheet generateXSL (exactly as if I was just calling cocoon/generateXsl) - I don't understand this, but maybe someone more experienced than me on this list can explain it to us. But maybe you should also use dummy html/xml in generator? BTW, now I posted a message about creating some more complicated stylesheets through Cocoon, because when I try to create some more complicated xsl, I get an error. But for some simple xsl it works fine for me, so check both your pipelines and your xsl. Good luck. Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:03 PM Subject: Re: xsl through pipeline [NOT supported???] hi anna thnx for your reply i try this very simple sample before go on and i dont get the result i want. it very strange to be any problem in .xsl becaus its very simple. is it possible to send me a snapshot of your sitemap where your .xsl pass (and generated) through a pipeline? stavros i u want to contact me directly use: [EMAIL PROTECTED] On Mon, 23 Dec 2002, Anna Afonchenko wrote: Cocoon definitely supports using transformer that is itself generated by some pipeline. At least, it works for me. Maybe you have some problems in your xsl? - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 23, 2002 1:58 AM Subject: xsl through pipeline [NOT supported???] i try to transform a .xml using a .xsl that will be generated using a pipeline in my sitemap i have map:match pattern=myXML map:generate src=./myxml.xml/ map:transform src=./myxsl.xsl/ map:serialize type=xml/ /map:match map:match pattern=myXMLagain map:generate src=myxml.xml/ map:transform src=cocoon:/getXSL/ map:serialize type=xml/ /map:match map:match pattern=getXSL map:generate src=./myxsl.xsl/ map:serialize type=xml/ /map:match -- this is a very simple example (there is no transformation in getXSL, if this work i will try to produce the .xsl) when i call http:///myXML i get the results i wait for when i call
Re: xsl through pipeline [NOT supported???]
If you say that when you call the generateXSL pipeline and it gives you the right xsl, it should provide the same xsl when called using the cocoon:/ protocol. Can you write your exact pipelines and give the xsl files? Please omit all unnecessary stuff. Regards, Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 2:03 PM Subject: Re: xsl through pipeline [NOT supported???] i have try to ask http:///cocoon/generateXSL/ with a browser and save the output (XSL) im my disk then i use this XSL to transform a xml file (into xmlspy) and everything are OK. another one test using map:transform src=savedXSL.xsl/ my transformation work fine (savedXSL.xsl is the file i have get above) replace this entry with map:transform src=cocoon:/generateXSL/ my pipeline give me an output other than i expect(i thing that map:transform src=cocoon:/generateXSL/ return an empty .xsl file) maybe we need the cocoons guru help :-) stavros (what a problem 2 days before christmas ) On Mon, 23 Dec 2002, Anna Afonchenko wrote: Stavros What happens if you try to generate your xsl outside cocoon (using batch file) and then just use it as a transformer in your pipeline (i.e. without calling the cocoon:/ protocol)? If you get the right answer there, then I think the problem is with cocoon, but it is strange, because I don't see any dramatic difference between your sitemap and mine. But as I said, I'm new to cocoon, so I may be wrong. Maybe somebody else will be able to give better answer. Good luck Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:45 PM Subject: Re: xsl through pipeline [NOT supported???] in my case when i call http://...cocoon/generateXSL where generateXSL is a pipeline that produce the xsl i want i get in my browser the right (produced) xsl file. but this file make to sense when i call it using cocoon:/ protocol in an other pipeline to transform a xml file maybe this approach dosnt supported from cocoon (yet..) if this is not my fault (if i dont miss somenthing then is a good idea to make a post to -dev- list) i dont understand what can be the content of your test.html is it a xml file or an empty file? in my case i want instead of your test.html to have xslInstructions.xml On Mon, 23 Dec 2002, Anna Afonchenko wrote: Hi Stavros. Here are my pipelines for using xsl generated through Cocoon: map:match pattern=try map:generate src=ub/violations.html/ map:transform type=xslt-saxon src=cocoon://generateXsl/ map:serialize type=xml/ /map:match map:match pattern=generateXsl map:generate src=ub/test.html/ map:transform type=xslt-saxon src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match In pipeline generateXsl I use dummy html for generator, because for some reason, if I try to write instead: map:match pattern=generateXsl map:generate src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match then what I get calling cocoon/try is the stylesheet generateXSL (exactly as if I was just calling cocoon/generateXsl) - I don't understand this, but maybe someone more experienced than me on this list can explain it to us. But maybe you should also use dummy html/xml in generator? BTW, now I posted a message about creating some more complicated stylesheets through Cocoon, because when I try to create some more complicated xsl, I get an error. But for some simple xsl it works fine for me, so check both your pipelines and your xsl. Good luck. Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:03 PM Subject: Re: xsl through pipeline [NOT supported???] hi anna thnx for your reply i try this very simple sample before go on and i dont get the result i want. it very strange to be any problem in .xsl becaus its very simple. is it possible to send me a snapshot of your sitemap where your .xsl pass (and generated) through a pipeline? stavros i u want to contact me directly use: [EMAIL PROTECTED] On Mon, 23 Dec 2002, Anna Afonchenko wrote: Cocoon definitely supports using transformer that is itself generated by some pipeline. At least, it works for me. Maybe you have some problems in your xsl? - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 23, 2002 1:58 AM Subject: xsl through pipeline [NOT supported???] i try to transform a .xml using a .xsl that will be generated using a pipeline in my sitemap i have map:match pattern=myXML map:generate src=./myxml.xml/ map:transform src=./myxsl.xsl/ map:serialize type=xml/ /map:match map:match
Re: PHP status?
Hello, If you want XML and PHP in a Cocoon like approach, you should look at Krysalis, a OS platform for XML content publishing. Please see more about it at http://www.interakt.ro/products/Krysalis/ Alexandru Hi folks, I'm reasonably familiar with Cocoon but just learning PHP since it seems to be the fastest way to do lots of web applications. (See http://phpmyedit.sourceforge.net/ and http://www.platon.sk/projects/phpMyEdit/ for pne of the php tools I am interested in ). Now I hear about this PHP Generator thing but I don't really understand how it fits in. Can someone either point me at a good explanation, or documentation, including which release of Cocoon it is in? Alex McLintock Available for java/perl/C++/web development in London, UK or nearby. Apache FOP, Cocoon, Turbine, Struts,XSL:FO, XML, Tomcat, First meeting free.http://www.OWAL.co.uk/ - 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] -- Alexandru COSTIN Chief Operating Officer http://www.interakt.ro/ +4021 411 2610 - 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]
Re: xsl through pipeline [NOT supported???]
Hello Stavros, there is no difference between your and Anna's example. Both shell work. If it works as you said, that you can save the XSL and use this one, then for me it looks like a problem with serialization: Do you use any disable-output-escaping in your stylesheet creation process? Anything with entities? Regards, Joerg Cocoon User wrote: i have try to ask http:///cocoon/generateXSL/ with a browser and save the output (XSL) im my disk then i use this XSL to transform a xml file (into xmlspy) and everything are OK. another one test using map:transform src=savedXSL.xsl/ my transformation work fine (savedXSL.xsl is the file i have get above) replace this entry with map:transform src=cocoon:/generateXSL/ my pipeline give me an output other than i expect(i thing that map:transform src=cocoon:/generateXSL/ return an empty .xsl file) maybe we need the cocoons guru help :-) stavros (what a problem 2 days before christmas ) On Mon, 23 Dec 2002, Anna Afonchenko wrote: Stavros What happens if you try to generate your xsl outside cocoon (using batch file) and then just use it as a transformer in your pipeline (i.e. without calling the cocoon:/ protocol)? If you get the right answer there, then I think the problem is with cocoon, but it is strange, because I don't see any dramatic difference between your sitemap and mine. But as I said, I'm new to cocoon, so I may be wrong. Maybe somebody else will be able to give better answer. Good luck Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:45 PM Subject: Re: xsl through pipeline [NOT supported???] in my case when i call http://...cocoon/generateXSL where generateXSL is a pipeline that produce the xsl i want i get in my browser the right (produced) xsl file. but this file make to sense when i call it using cocoon:/ protocol in an other pipeline to transform a xml file maybe this approach dosnt supported from cocoon (yet..) if this is not my fault (if i dont miss somenthing then is a good idea to make a post to -dev- list) i dont understand what can be the content of your test.html is it a xml file or an empty file? in my case i want instead of your test.html to have xslInstructions.xml On Mon, 23 Dec 2002, Anna Afonchenko wrote: Hi Stavros. Here are my pipelines for using xsl generated through Cocoon: map:match pattern=try map:generate src=ub/violations.html/ map:transform type=xslt-saxon src=cocoon://generateXsl/ map:serialize type=xml/ /map:match map:match pattern=generateXsl map:generate src=ub/test.html/ map:transform type=xslt-saxon src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match In pipeline generateXsl I use dummy html for generator, because for some reason, if I try to write instead: map:match pattern=generateXsl map:generate src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match then what I get calling cocoon/try is the stylesheet generateXSL (exactly as if I was just calling cocoon/generateXsl) - I don't understand this, but maybe someone more experienced than me on this list can explain it to us. But maybe you should also use dummy html/xml in generator? BTW, now I posted a message about creating some more complicated stylesheets through Cocoon, because when I try to create some more complicated xsl, I get an error. But for some simple xsl it works fine for me, so check both your pipelines and your xsl. Good luck. Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:03 PM Subject: Re: xsl through pipeline [NOT supported???] hi anna thnx for your reply i try this very simple sample before go on and i dont get the result i want. it very strange to be any problem in .xsl becaus its very simple. is it possible to send me a snapshot of your sitemap where your .xsl pass (and generated) through a pipeline? stavros i u want to contact me directly use: [EMAIL PROTECTED] On Mon, 23 Dec 2002, Anna Afonchenko wrote: Cocoon definitely supports using transformer that is itself generated by some pipeline. At least, it works for me. Maybe you have some problems in your xsl? - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 23, 2002 1:58 AM Subject: xsl through pipeline [NOT supported???] i try to transform a .xml using a .xsl that will be generated using a pipeline in my sitemap i have map:match pattern=myXML map:generate src=./myxml.xml/ map:transform src=./myxsl.xsl/ map:serialize type=xml/ /map:match map:match pattern=myXMLagain map:generate src=myxml.xml/ map:transform src=cocoon:/getXSL/ map:serialize type=xml/ /map:match map:match pattern=getXSL map:generate src=./myxsl.xsl/ map:serialize type=xml/ /map:match -- this is a very simple example (there is no transformation in getXSL, if this
Re: Stylesheet in Cocoon
Hello Anna, namespace declarations are no attributes, even if they look so. And you can't create them in this way. You can't create the important namespace nodes, you can only copy them. To read a much better explanation from Jeni Tennison have a look here: http://www.dpawson.co.uk/xsl/sect2/N5536.html#d4840e1162. Maybe this shows you also the better way to create the XSLT using namespace-alias. In general the namespaces shell be handled by the processor. Regards, Joerg Anna Afonchenko wrote: Hi all. I am trying to create a stylesheet using cocoon and then apply this stylesheet to some input. I need to declare a root element with different namespace declarations. When I was using batch file instead of Cocoon, I just wrote it as a string, e.g.: xsl:text disable-output-escaping=yes lt;xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:saxon=http://icl.com/saxon; xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; gt; /xsl:text Since I was writing it to a file, it was written out as an root element. But when I try to use the same method from Cocoon, it doesn't work, because Cocoon writes this out as a string, and in this case the output document will not have a root element. I tried to declare the root inside an element, like this: xsl:element name=xsl:stylesheet xsl:attribute name=version1.0/xsl:attribute xsl:attribute name=xmlns:xslhttp://www.w3.org/1999/XSL/Transform/xsl:attribute xsl:attribute name=xmlns:saxonhttp://icl.com/saxon/xsl:attribute xsl:attribute name=xmlns:rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#/xsl:attribute xsl:attribute name=extension-element-prefixessaxon/xsl:attribute /xsl:element But what I get in the output is this: xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; extension-element-prefixes=saxon i.e. xmlns:saxon and xmlns:rdf weren't written out. And then, when I try to run the generated stylesheet on the html input, I get an error: type fatal message _org.apache.cocoon.ProcessingException: Could not read resource file:/C:/Program Files/Apache Group/Tomcat 4.1/webapps/cocoon/ub/violations.html: javax.xml.transform.TransformerException: org.xml.sax.SAXException: Invalid processing instruction name (saxon:warning)_ __ sender org.apache.cocoon.servlet.CocoonServlet source Cocoon servlet I guess this is because the above namespace declarations are missing, because if I apply the xsl that was generated outside the Cocoon (using batch file) - it works fine, and the only difference that I can see between these two files is that namespace declarations thing. Maybe it's because something else, I don't know, I am not good in Cocoon yet. So if somebody have some idea, what is wrong with my code, and what should I do, please tell me. P.S. I searched the archives for the issue of invalid processing instruction (saxon:warning) and found one topic, but I didn't understood it and I even don't know if this relates to my problem. Thank you very much for help. Anna - 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]
RE: PHP status?
-Original Message- From: Alex McLintock [mailto:[EMAIL PROTECTED]] Sent: Monday, December 23, 2002 9:03 AM To: [EMAIL PROTECTED] Subject: RE: PHP status? Thanks for spotting the important bits in the tutorial Geoff. Thank google! I knew it wasn't cocoon but was curious as to where it came from myself. At 14:01 23/12/02, you wrote: I'm not a PHP user in cocoon, but I can provide some hints on the information you asked about. First, the biggest clues come from an odd location (http://xml.apache.org/cocoon/tutorial/tutorial-develop-webapp.html): -- PhpGenerator This generator functions just like the JspGenerator, but with PHP templates. The PHP must generate valid XML, and be a file in the context. This is a shame but I suppose only to be expected. What I was really after was some easy way of using exisitng PHP applications within a larger Cocoon framework. If the PHP has to generate valid XML then that limits things quite a bit. I suppose I could persuade it to generate xHTML, but even that will be a pain. How you want to use them makes all the difference. If it's going to be in a pipeline at some point, you are stuck with having at least well-formed xml. Seems to me your options boil down to: 1) Get the PHP to spit out well-formed xml and use PHPGenerator. 2) Use HTMLGenerator to call the php over http (it passes the results through TIDY, so it does the html-xml work for you). Not sure if it passes the request stuff on, but it probably uses jakarta commons httpclient, which has the functionality built in and shouldn't be too much work to make use of it by patching HTMLGenerator or extending it. BTW, httpclient supports cookies too - see the recent conversations on WebServiceProxyGenerator 3) Use WebServiceProxyGenerator (currently supports passing request on, but not cookies - a commercially sponsored patch may be making its way in to CVS soon though). This still requires that you get wellformed xml though. Geoff - 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]
[solved!?]Re: xsl through pipeline [NOT supported???]
atleast i have a simple example that works i call an xsl through pipeline but using only generation and serialization (i just read the .xsl using a pipeline) and use this xsl for transformation into another pipeline using cocoon:/ protocol i'll put this example in url tomorow now i'm a litle confused how to create a xsl from a xml---xsl--transformation i have found very usefull your post anna...thnx stavros On Mon, 23 Dec 2002, Anna Afonchenko wrote: If you say that when you call the generateXSL pipeline and it gives you the right xsl, it should provide the same xsl when called using the cocoon:/ protocol. Can you write your exact pipelines and give the xsl files? Please omit all unnecessary stuff. Regards, Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 2:03 PM Subject: Re: xsl through pipeline [NOT supported???] i have try to ask http:///cocoon/generateXSL/ with a browser and save the output (XSL) im my disk then i use this XSL to transform a xml file (into xmlspy) and everything are OK. another one test using map:transform src=savedXSL.xsl/ my transformation work fine (savedXSL.xsl is the file i have get above) replace this entry with map:transform src=cocoon:/generateXSL/ my pipeline give me an output other than i expect(i thing that map:transform src=cocoon:/generateXSL/ return an empty .xsl file) maybe we need the cocoons guru help :-) stavros (what a problem 2 days before christmas ) On Mon, 23 Dec 2002, Anna Afonchenko wrote: Stavros What happens if you try to generate your xsl outside cocoon (using batch file) and then just use it as a transformer in your pipeline (i.e. without calling the cocoon:/ protocol)? If you get the right answer there, then I think the problem is with cocoon, but it is strange, because I don't see any dramatic difference between your sitemap and mine. But as I said, I'm new to cocoon, so I may be wrong. Maybe somebody else will be able to give better answer. Good luck Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:45 PM Subject: Re: xsl through pipeline [NOT supported???] in my case when i call http://...cocoon/generateXSL where generateXSL is a pipeline that produce the xsl i want i get in my browser the right (produced) xsl file. but this file make to sense when i call it using cocoon:/ protocol in an other pipeline to transform a xml file maybe this approach dosnt supported from cocoon (yet..) if this is not my fault (if i dont miss somenthing then is a good idea to make a post to -dev- list) i dont understand what can be the content of your test.html is it a xml file or an empty file? in my case i want instead of your test.html to have xslInstructions.xml On Mon, 23 Dec 2002, Anna Afonchenko wrote: Hi Stavros. Here are my pipelines for using xsl generated through Cocoon: map:match pattern=try map:generate src=ub/violations.html/ map:transform type=xslt-saxon src=cocoon://generateXsl/ map:serialize type=xml/ /map:match map:match pattern=generateXsl map:generate src=ub/test.html/ map:transform type=xslt-saxon src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match In pipeline generateXsl I use dummy html for generator, because for some reason, if I try to write instead: map:match pattern=generateXsl map:generate src=ub/generateXSL.xsl/ map:serialize type=xml/ /map:match then what I get calling cocoon/try is the stylesheet generateXSL (exactly as if I was just calling cocoon/generateXsl) - I don't understand this, but maybe someone more experienced than me on this list can explain it to us. But maybe you should also use dummy html/xml in generator? BTW, now I posted a message about creating some more complicated stylesheets through Cocoon, because when I try to create some more complicated xsl, I get an error. But for some simple xsl it works fine for me, so check both your pipelines and your xsl. Good luck. Anna - Original Message - From: Cocoon User [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 23, 2002 12:03 PM Subject: Re: xsl through pipeline [NOT supported???] hi anna thnx for your reply i try this very simple sample before go on and i dont get the result i want. it very strange to be any problem in .xsl becaus its very simple. is it possible to send me a snapshot of your sitemap where your .xsl pass (and generated) through a pipeline? stavros i u want to contact me directly use: [EMAIL PROTECTED] On Mon, 23 Dec 2002, Anna Afonchenko wrote: Cocoon definitely supports using transformer that is itself
Cocoon 2.0.4, Tomcat 4.1.18, Java 1.4, and xsl:for-each ...
Well, after being happy with a stable installation, I just had to go for it and install the latest stuff. On a linux system I currently have Cocoon 2.0.4, Tomcat 4.1.18, and Java 1.4 working happily together...speed better than the Resin servlet environment I was using...and getting it going in a record time of 10 minutes! It works great...except for one bizzare thing. When transforming using the included xerces/xalan jar files I have been defeated by the simple xsl:for-each select=tr[position()1 and position()!=last()] .../xsl:for-each structure. It doesn't work. The system simply hangs when encountering this structure, returning nothing. The browser loads and loads until timeout time. What happened? Is the xercesImpl-2.0.0.jar included with Cocoon 2.0.4 broken? Or is there a broken Xerces/xalan jar associated with Java 1.4 getting in the way? Should I backtrack to the Java 1.3 installation environment for now? (will probably do...) happy seasonal winter celebrations. jkl - 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]
RE: Sunbow licence expired
http://radio.weblogs.com/0108489/ You should also get on the sunbow-user mailing-list. Matthew -- Open Source Group Cocoon { Consulting, Training, Projects } = Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 Paderborn Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de - Cocoon book: http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20 Weblogs: http://radio.weblogs.com/0103021/ http://www.oreillynet.com/weblogs/author/1014 = -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, December 23, 2002 10:13 AM To: [EMAIL PROTECTED] Subject: Sunbow licence expired Hello, My Sunbow (Eclipse plug-in) licence is expired. How can I have a new one? Thank you Sylvain - 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]
Cocoon XML transformer
Hi, InCocoon documentation, I saw that we can chose the XML transformer for Cocoon ( Xalan or SAXON etc). With Xalan transformer I am getting problem with some Japanese characters. Those characters are coming as "?" marks. So I want to try Cocoon with Saxon. Please let me know the procedure for that. Thank you. Regards,Ravi
esql in Cocoon-2.1-dev not working well?
Esql file that works in Tomcat 4.0.1 does not work in Tomcat 4.1.12? I have compiled the nightly download 12/20/2002 and running most of the samples on a Tomcat 4.1.12. I added the datasources for oracle and mysql (cocoon.xconf), the jdbc drivers (in WEB-INF/lib/ and modified web.xml), I added a submount by symlinking it under cocoon/samples/ctwig ie cocoon/samples/ctwig/ctwig. Basic xml files are transformed using xsl files just like the CTWIG sample. I symlinked this directory that has esql query with its corresponding xsl file to this directory. (btw the base directory is located in another Tomcat 4.0.1/webapps/cocoon/ctwig/). Launched Tomcat 4.1.12, point my browser to http://localhost:8080/cocoon/samples/ctwig/ctwig/esqlora2.xml and I get errors. Launched Tomcat 4.0.1 (now .12 and .1) up, point my browser to 4.0.1 relateted url, http://localhost:8069/cocoon/ctwig/esqlora2.xml it works fine, the query is executed and the table is displayed. This is the same file with different results Why? The error on 4.1.12 is: org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Error executing statement: SELECT * FROM emp: java.sql.SQLException: Invalid argument(s) in call: absolute (0) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:275) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:513) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:192) this is esqlora2.xml ?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; page titleA Database Driven XSP Page/title content esql:connection esql:poolpersonnel/esql:pool esql:execute-query esql:querySELECT * FROM emp/esql:query esql:results table esql:row-results tr tdesql:get-string column=empno//td tdesql:get-string column=ename//td tdesql:get-string column=job//td tdesql:get-string column=deptno//td tdesql:get-string column=mgr//td tdesql:get-date column=hiredate//td tdesql:get-string column=sal//td tdesql:get-row-position //td /tr /esql:row-results /table /esql:results esql:no-results pSorry, no results!/p /esql:no-results /esql:execute-query /esql:connection /content /page /xsp:page __ 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: esql in Cocoon-2.1-dev not working well?
Hi! Try to download a newer version. I recently updated the CVS HEAD and everythings works fine. I use Tomcat 4.1.18, Java 1.4.1_01, Red Hat Linux 8.0 and PostgreSQL. Antonio Gallardo. aps olute dijo: Esql file that works in Tomcat 4.0.1 does not work in Tomcat 4.1.12? I have compiled the nightly download 12/20/2002 and running most of the samples on a Tomcat 4.1.12. I added the datasources for oracle and mysql (cocoon.xconf), the jdbc drivers (in WEB-INF/lib/ and modified web.xml), I added a submount by symlinking it under cocoon/samples/ctwig ie cocoon/samples/ctwig/ctwig. Basic xml files are transformed using xsl files just like the CTWIG sample. I symlinked this directory that has esql query with its corresponding xsl file to this directory. (btw the base directory is located in another Tomcat 4.0.1/webapps/cocoon/ctwig/). Launched Tomcat 4.1.12, point my browser to http://localhost:8080/cocoon/samples/ctwig/ctwig/esqlora2.xml and I get errors. Launched Tomcat 4.0.1 (now .12 and .1) up, point my browser to 4.0.1 relateted url, http://localhost:8069/cocoon/ctwig/esqlora2.xml it works fine, the query is executed and the table is displayed. This is the same file with different results Why? The error on 4.1.12 is: org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.RuntimeException: Error executing statement: SELECT * FROM emp: java.sql.SQLException: Invalid argument(s) in call: absolute (0) at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:275) at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:513) at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:192) this is esqlora2.xml ?xml version=1.0 encoding=ISO-8859-1? xsp:page language=java xmlns:xsp=http://apache.org/xsp; xmlns:esql=http://apache.org/cocoon/SQL/v2; page titleA Database Driven XSP Page/title content esql:connection esql:poolpersonnel/esql:pool esql:execute-query esql:querySELECT * FROM emp/esql:query esql:results table esql:row-results tr tdesql:get-string column=empno//td tdesql:get-string column=ename//td tdesql:get-string column=job//td tdesql:get-string column=deptno//td tdesql:get-string column=mgr//td tdesql:get-date column=hiredate//td tdesql:get-string column=sal//td tdesql:get-row-position //td /tr /esql:row-results /table /esql:results esql:no-results pSorry, no results!/p /esql:no-results /esql:execute-query /esql:connection /content /page /xsp:page __ 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: [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]
Re: newbie trying samples from: Cocoon: Building XML Apps... (answer)
At 09:49 AM 12/21/02 -0800, you wrote: hi, newbie here trying to run the samples from the above book on linux. dropped the war in to tomcat 4.0.1. with jdk1.4.1 and things went downhill fast. finaly gave up and installed 1.3.1_03 and the tomcat off the book's cd. (3.3.? final or something like that). (that's what the book says to do). has anyone made the sample work? if so, what versions of jdk and tomcat were you using? what versions of tomcat, jdk and jdkee would you recommend in general? it appears to work using: cocoon-2.0.4/ j2sdk1.4.1_01/ jakarta-tomcat-4.1.18-LE-jdk14/ if you follow the instructions at http://xml.apache.org/cocoon/installing/index.html about copying the xalan and xerces jars (which are in lib, not lib/core). i don't know about the jdbc issue since afaik it is not using any jdbc. thanks --- ray tayek http://home.attbi.com/~rtayek/ actively seeking mentoring or telecommuting work vice chair orange county java users group http://www.ocjug.org/ mailto:[EMAIL PROTECTED] hate spam? http://samspade.org/ssw/ - 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]
Build Fail!!! Repeat!!!!!!!!!
Title: Build Fail!!! Repeat! -Original Message- From: Hong Gia Dinh Sent: 20 December 2002 15:45 To: '[EMAIL PROTECTED]' Subject: Build Fail!!! Hi all, I am trying to deploy my cocoon-based application in JBoss3.0.4 (i deployed the cocoon itself successfully and it runs well). but when i tried to edit my build.xml file to build my own application and deploy to jboss and run it keeps on inform error as follows : type fatal message jndi:/localhost/saigoncoop/translation does not denote a directory description org.apache.cocoon.ProcessingException: jndi:/localhost/saigoncoop/translation does not denote a directory: org.apache.cocoon.ResourceNotFoundException: jndi:/localhost/saigoncoop/translation does not denote a directory my webapp directory structure as follows : -Web-inf -translation (contains : messages_en.xml, messages.xml, messages_fr.xml . . .) -portal -admin - sitemap.xmap so could you all help me to solve it? i really dont understand why!!! (i like cocoon really but it (maybe me?? ) causes me headache with confusing error) thanks alot