You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gregor Fischer <fi...@informatik.uni-wuerzburg.de> on 2001/08/21 15:06:29 UTC
FragmentExtractor Problems
Hi there !
I'm using Cocoon 2.0b2 (Tomcat 3.2.1, SuSE Linux 7.1).
I'm having a big problem using the FragmentExtractorTransformer. Whenever
I combine the extractor with the XSLT-Transformer, I get an empty file as
result. If I disable any _one_ of the two transformers, the result is as
expected, but together they do not work.
I tried the log-transformer for more insight, but it did not really help.
When inserting a log-transformer between the two transformers, the log
just stops after receiving the first StartElement:
--- cut from cocoon.log ---
[...]
DEBUG 99839 [cocoon ] (Thread-17): MRUMemoryStore getting object from memory. Key: file:/tomcat/webapps/cocoon/test.xsl
DEBUG 99839 [cocoon ] (Thread-17): Reusing Templates in org.apache.cocoon.transformation.TraxTransformer@77e421ed for file:/tomcat/webapps/cocoon/test.xsl
INFO 99839 [cocoon ] (Thread-17): [startDocument]
INFO 99839 [cocoon ] (Thread-17): [startElement] uri=null,local=root,raw=root
DEBUG 99839 [cocoon ] (Thread-17): Recycling of CachingEventPipeline
DEBUG 99839 [cocoon ] (Thread-17): Returning a org.apache.cocoon.generation
[...]
--- cut ---
If I again diable one of the transformers, the log is again as expected.
Below is the minimal test-case I set up:
--- cut from sitemap.xmap ---
[...]
<map:match pattern="test.xml">
<map:generate src="test.xml"/>
<map:transform src="test.xsl"/>
<map:transform type="log"/>
<map:transform type="extractor"/>
<map:serialize type="xml"/>
</map:match>
[...]
--- cut ---
test.xml:
---------------------------
<?xml version="1.0"?>
<root>
<sub>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="20" height="20">
<svg:circle cx="10" cy="10" r="6"
fill="black" stroke-width="4" stroke="black"/>
</svg:svg>
</sub>
</root>
---------------------------
test.xsl:
---------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
---------------------------
Thanks for any help.
Greg
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>