forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Helena Edelson <hel...@greenjaguar.com>
Subject Re: rss, xmap, date format, xsl:sort
Date Sat, 22 Oct 2005 20:00:07 GMT
Sorry I was not clear, events as in things going on (as opposed to 
programming events)
I have a directory of files, each modeling object data like article 
(articles.xml) and events (events.xml).
So my events are coming from events.xml which is like so:
<events>
    <event ...>
       <date/>
       <location/>
       <name/>
        <description/>
    </event>
 </events>

I'm not passing an empty parameter, I left it blank because I can't 
figure out how to best implement a date and sort each <event> by it 
instead of sorting by entry (going down the list in the file vs going 
down the list sorting output by date) and how one might implement date 
(break it up to month, day, year) or somehow to parse <date>November 1, 
2005</date>

I'll look at the plugin suggested, thank you. Still trying to figure out 
how to set them up/use them.
Helena

Thorsten Scherler wrote:

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

Mime
View raw message