cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <>
Subject Re: [RT] the quest for the perfect template language
Date Fri, 04 Apr 2003 11:34:44 GMT
"Daniel Fagerstrom" <> wrote:

> With XSLT and agreagate you could write something like:
> <map:match pattern="/news/*">
>  <map:aggregate element="page"/>
>    <map:part src="cocoon:/data/articles/{1}"/>
>    <map:part src="cocoon:/data/authors/{request-param:author}/author"/>
>    <map:part src="cocoon:/data/lists/topnews"/>
>  </map:aggregate>
>  <map:transform src="/templates/news.xslt"/>
>  <map:serialize/>
> </map:match>

No, I can't... You see where do you get the author from? You get it from a
request parameter. While in my case the author information (or ID) is stored
in the article original XML data... It would be fair enough if I could
rewrite it like

<map:match pattern="/news/*">
 <map:aggregate element="page"/>
   <map:part src="cocoon:/data/articles/{1}"/>
   <map:part src="cocoon:/data/lists/topnews"/>
 <map:transform src="/templates/news.xslt"/>

But, darn, that's UGLY! :-(


View raw message