cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Askild Aaberg Olsen" <ask...@xangeli.com>
Subject xslt from cocoon://-protocol and subsite-map stackoverflow in 2.1.4
Date Wed, 25 Feb 2004 11:07:38 GMT
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


Mime
View raw message