cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregor Fischer <fisc...@informatik.uni-wuerzburg.de>
Subject FragmentExtractor Problems
Date Tue, 21 Aug 2001 13:06:29 GMT
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message