cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ulf Sauerland" <>
Subject [C2] sequence cascade with <map:generate>?
Date Fri, 18 May 2001 12:25:09 GMT

I think the sitemap is a very good invention with a lot of well thought out
features. Unfortunatly I miss one (in my opinion) important functionality:
the possibility to invoke a <map:match> from a <match:generate> in a
cascading fashion.
Or did I oversee something in the documentation?

Here is an example for what I want to express in the sitemap.
Given the following rule:
<map:match pattern="first">
  <map:generate  src="base.xml"/>
  <map:transform src="first.xsl"/>
  <map:serialize type="xml"/>

Instead of writing:
<map:match pattern="second">
  <map:generate  src="base.xml"/>
  <map:transform src="first.xsl"/>
  <map:transform src="second.xsl"/>
  <map:serialize type="xml"/>

I want to write something like:
<map:match pattern="second">
  <map:generate  uri="first"/>
  <map:transform src="second.xsl"/>
  <map:serialize type="xml"/>

That way a lot of redundancy in the sitemap can be avoided and the normal
cocoon caching mechanism can be used for the intermediate steps.

At the moment I use the following workaround:
<map:match pattern="second">
  <map:aggregate element="to-remove">
    <map:part src="first"/>
  <map:transform src="second.xsl"/>
  <map:serialize type="xml"/>

which has the drawback that I have to remove the needles <to-remove>
elements during the transformation steps.

BTW - what are the clear semantics of the two attributes "src" and "uri"?
One possible interpretation is, that the "uri" attribute is resolved within
the sitemap (like in <map:redirect-to uri="welcome"/>) and the "src"
attribute is resolved indepently from the sitemap (like in <map:generate
But this interpretation is not consistent with the use in
<map:part src="slashdot/slashdot.xml" element="slashdot"/>.
(The examples here are from the original C2 sitemap.)

Ulf Sauerland
scopus GmbH
Barnerstra├če 14
22765 Hamburg

Tel:    +49 (40) 398 34-881
Fax:    +49 (40) 398 34-889

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message