You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2004/03/24 03:20:12 UTC

Re: xslt from cocoon://-protocol and subsite-map stackoverflow in 2.1.4

Hello Askild,

can you try it using just cocoon:/ (single slash) as this should work in 
your case too. The test would be good for localizing a possible bug.

Thanks,

Joerg

On 25.02.2004 12:07, Askild Aaberg Olsen wrote:

> Hi!
> 
> When upgrading from 2.1.3 to 2.1.4 I got an infinite loop in my application
> that resulted in out-of-memory.
> I have narrowed it down to the following simple test-case. This simple test
> eventually results in a stackoverflow at my system, running WinXP with suns
> j2sdk1.4.2_02.
> 
> The testcase works in 2.1.3, so to me this seems to have been introduced in
> 2.1.4.
> 
> If I change "cocoon://test/test.xslt" to "http://localhost/test/test.xslt"
> in the parent sitemap the problem vanishes.
> 
> I wonder if anyone can confirm the problem, correct me if I am completly
> wrong, or maybe provide a fix for this.
> 
> (I *do* know how I can circumvent the problem in my application, but using
> the cocoon:// protocol for XSLT-generation is very a powerfull feature of
> Cocoon)
> 
> Askild
> -
> 
> Snippet of main sitemap:
> -------------------------
> <map:match pattern="test/**">
> 	<map:mount check-reload="no" src="test/" uri-prefix="test"/>
> </map:match>
> <map:match pattern="**">
> 	<map:generate type="file" src="test/test.xml"/>
> 	<map:transform type="xslt" src="cocoon://test/test.xslt"/>
> 	<map:serialize type="xml"/>
> </map:match>
> 
> Snippet of sub-sitemap in test/:
> ----------
> <map:pipelines>
> 	<map:pipeline>
> 		<map:match pattern="test.xslt">
> 			<map:generate type="file" src="test.xslt"/>
> 			<map:serialize type="xml"/>
> 		</map:match>
> 	</map:pipeline>
> </map:pipelines>
> 
> 
> test.xml in test/
> -----------------
> <?xml version="1.0" encoding="UTF-8"?>
> <test>Hello world??</test>
> 
> test.xslt in test/
> ------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> 	<xsl:output method="xml" version="1.0" encoding="UTF-8"
> indent="yes"/>
> 	<xsl:template match="test">
> 		<modified.test.result>
> 			<xsl:value-of select="."/>
> 		</modified.test.result>
> 	</xsl:template>
> </xsl:stylesheet>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: xslt from cocoon://-protocol and subsite-map stackoverflow in 2.1.4

Posted by Askild Aaberg Olsen <as...@xangeli.com>.
Hello Joerg.

This is not a showstopper for me at the moment, since I rewrote it to use
the http-protocol, passing the needed info from the request as parameters.
It works, but it feels like a awkward workaround...

My simple testcase, as in
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27260 works with the
cocoon:/-protocol, but if I place the "calling"-sitemap in a subsitemap, and
then use "cocoon:/../test/test.xslt" as src to the transformation it fails
with the stackoverflow again.
This mimics my sitemap arrangement when I upgraded to 2.1.4.

Since the problem appeared, I rearranged my sitemaps, so I should be able to
use the cocoon:/-protocol without ".." now. So for my particular problem at
the moment it should work.
Thanks!

Askild
-

Joerg Heinicke wrote:
> Hello Askild,
> 
> can you try it using just cocoon:/ (single slash) as this 
> should work in 
> your case too. The test would be good for localizing a possible bug.
> 
> Thanks,
> 
> Joerg
> 
> On 25.02.2004 12:07, Askild Aaberg Olsen wrote:
> 
> > Hi!
> > 
> > When upgrading from 2.1.3 to 2.1.4 I got an infinite loop in my 
> > application that resulted in out-of-memory. I have narrowed 
> it down to 
> > the following simple test-case. This simple test eventually 
> results in 
> > a stackoverflow at my system, running WinXP with suns j2sdk1.4.2_02.
> > 
> > The testcase works in 2.1.3, so to me this seems to have been 
> > introduced in 2.1.4.
> > 
> > If I change "cocoon://test/test.xslt" to 
> > "http://localhost/test/test.xslt" in the parent sitemap the problem 
> > vanishes.
> > 
> > I wonder if anyone can confirm the problem, correct me if I am 
> > completly wrong, or maybe provide a fix for this.
> > 
> > (I *do* know how I can circumvent the problem in my 
> application, but 
> > using the cocoon:// protocol for XSLT-generation is very a 
> powerfull 
> > feature of
> > Cocoon)
> > 
> > Askild
> > -
> > 
> > Snippet of main sitemap:
> > -------------------------
> > <map:match pattern="test/**">
> > 	<map:mount check-reload="no" src="test/" uri-prefix="test"/> 
> > </map:match> <map:match pattern="**">
> > 	<map:generate type="file" src="test/test.xml"/>
> > 	<map:transform type="xslt" src="cocoon://test/test.xslt"/>
> > 	<map:serialize type="xml"/>
> > </map:match>
> > 
> > Snippet of sub-sitemap in test/:
> > ----------
> > <map:pipelines>
> > 	<map:pipeline>
> > 		<map:match pattern="test.xslt">
> > 			<map:generate type="file" src="test.xslt"/>
> > 			<map:serialize type="xml"/>
> > 		</map:match>
> > 	</map:pipeline>
> > </map:pipelines>
> > 
> > 
> > test.xml in test/
> > -----------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <test>Hello world??</test>
> > 
> > test.xslt in test/
> > ------------------
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet version="1.0" 
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > 	<xsl:output method="xml" version="1.0" encoding="UTF-8" 
> > indent="yes"/>
> > 	<xsl:template match="test">
> > 		<modified.test.result>
> > 			<xsl:value-of select="."/>
> > 		</modified.test.result>
> > 	</xsl:template>
> > </xsl:stylesheet>
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org