forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: rss, xmap, date format, xsl:sort
Date Sat, 22 Oct 2005 19:14:49 GMT
El sáb, 22-10-2005 a las 08:50 -0400, Helena Edelson escribió:
> Hi
> 
> I have rss for articles in a forrest  app and have been trying
> unsuccessfully to set up rss for events.

What are rss events?

> Problems I am trying to solve:
> 1. articles rss requests each page while events must requests each
> entry - events are a set of items output in one page

Where are this entries are coming from? 

> 2. Events rss needs to be called and ordered by $date. Articles rss is
> called by x number of entries. 
>     events must be broadcast not by date of event but by pubDate and
> ordered by date.
> 
> current articles rss stylesheet
>   <xsl:for-each select="articles/article[ position() &lt; ($entries
> +1) ]">
>        <item>
>                 .....
>                 <link>..path/<xsl:value-of select="@id"/>.html</link>
>                 <pubDate><xsl:value-of select="date"/></pubDate>
>        </item>
> while for events rss would need to get by date and would need some
> standard but in all iterations I have tried,
> nothing has worked yet: 
>   <xsl:for-each select="events/event[ position() &lt; ($date+1) ]">
>        <item>
>                 .....
>                 <link>..path/events.html</link>
>                 <pubDate><xsl:value-of select="pubDate"/></pubDate>
>        </item>
> 
> Sitemap pipeline for articles uses:
>           <map:parameter name="entries" value="15"/>
> while for events would need something like
>           <map:parameter name="byDate" value=""/>
> 
This does not make much sense to pass an empty parameter to the
transformation.

> I can't get anything to work so far with attempts at <xsl:sort ...>
> or what date format or if I need to break up date as
> <events>
>     <event>
>        <eventInfo..../>
>         <date><month/><day/><year/></date>
>    </event>
> </events>
> 
Hmm, have a look at
http://svn.apache.org/viewcvs.cgi/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.view/resources/stylesheets/prepare.include.xsl?view=markup

   <xsl:for-each select="events/event[ position() &lt; ($date+1) ]">
<xsl:sort select="events/event/pubDate" />
>        <item>
>                 .....
>                 <link>..path/events.html</link>
>                 <pubDate><xsl:value-of select="pubDate"/></pubDate>
>        </item>

That should sort it by pubDate.

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message