Cocoon - Pipeline: Transform XML with XSL twice?

You can transform multiple times. Just call map:transform again (with a different xsl) - before you serialize.

Up vote 1 down vote favorite share g+ share fb share tw.

My problem is to setup the Cocoon sitemap. Xmap in a way, that it first makes a transformation of an XML file with XSL, which I can then use for my own transformation. I have following files: start.

Xml : Contains references of files which are put together applying combine_start. Xsl transform. Xsl: This is my own XSL file which I want to use on the transformation made with the combine_start.

Xsl (output XML) Since start. Xml is kind of an index for all the files needed in the process, the following sitemap won't show any results, if any XSL functions are applied (no tags are found). I've search the net, but I havent found a way to setup a pipeline which first makes a transformation, before applying another transformation.

Hopefully my problem istn too confusing and I appreciate any help I can get. Below you'll find the sitemap I tried. Xml xslt sitemap cocoon link|improve this question edited Aug 16 '09 at 20:31 asked Aug 16 '09 at 20:25Michael.

You can transform multiple times. Just call map:transform again (with a different xsl) - before you serialize. You can also use map:part/map:aggregate to mash together multiple matcher and then apply a map:transform on them (or the i:include transformer).

I don't really know what you mean with "no tags found", so maybe I am addressing the question wrong. -- if you want to see debug output (ie. What exactly is generated based on the xml, you should work with views - declare it in the sitemap (see: cocoon.apache.org/2.0/userdocs/concepts/...) and add a label to your transformer.

You can then see exactly what data is being used for the xsl by calling url? Cocoon-view=YOURLABEL.

OK, I'll try it. The origin in my problem is, that I cannot use e.g. Xsl:value-of in my transformation. I think its because of the start.

Xml which only contains references to all the xml files needed for the first transformation and therefore the "tree tags"/properties/names are not found, meaning I get an empty result. – Michael Aug 16 '09 at 21:09 normally when the xsl doesn't produce any output its because its unparseable. Check the cocoon-core.

Log and reduce the xsl to a really small one (just ) if you still don't get any output its a configuration problem (aggain cocoon-core. Log is your friend) – Niko Aug 16 '09 at 21:18 I generally find that using JX templates is easier than dealing with map:aggregate. It's a lot more flexible.

– Dominic Mitchell Aug 17 '09 at 10:41.

Michael doesn't seem to be a user anymore, but I'll answer this anyway. Basically adding code to illustrate to Niko's answer, and being a little more specific. The way to apply transform.

Xsl to the output of combine_start. Xsl ObHalfLife2Reference is: If I understand you to be saying that the output of combine_start. Xsl is empty, then that's not a Cocoon issue but an XSLT issue... your combine_start.

Xsl is not working correctly. Given that start. Xml is an index of files to feed into transform.

Xsl, the cinclude transformer is probably what you are looking for, rather than implementing a stylesheet to slurp them in. On the other hand if the contents of start. Xml will never change, then as mentioned above, would be more efficient.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions