cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregor Fischer <fisc...@informatik.uni-wuerzburg.de>
Subject C2: Problems with FragmentExtractor in Pipeline
Date Wed, 22 Aug 2001 10:45:12 GMT
Hi !

I tried cocoon-users first but it seams nobody there is able to help me.
And since this is probably a problem of cocoon-internals rather than of 
cocoon-usage, I guess it's ok to post it here.

If you need additional info or data from test-runs, I'll be happy to
provide it.

----- Forwarded message -----

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

----- End forwarded message -----

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


Mime
View raw message