cocoon-users mailing list archives

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

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"/>
</map:match>
...

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"/>
</map:match>

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

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:aggregate>
  <map:transform src="second.xsl"/>
  <map:serialize type="xml"/>
</map:match>

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
src="docs/samples/samples.xml"/>).
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.)

Thanks,
Ulf
____________________________________________
Ulf Sauerland
scopus GmbH
Barnerstra├če 14
22765 Hamburg

Tel:    +49 (40) 398 34-881
Fax:    +49 (40) 398 34-889
E-Mail: mailto:ulf.sauerland@scopus.de
WWW:    http://www.scopus.de


---------------------------------------------------------------------
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