// TODO: Add a size limiter here
content.addElement( format(e.getContent()) );
item.addElement( content );
WikiPage p = e.getPage();
if( p.getVersion() != -1 )
{
item.addElement( new XML("wiki:version").addElement( Integer.toString(p.getVersion()) ) );
}
if( p.getVersion() > 1 )
{
item.addElement( new XML("wiki:diff").addElement( engine.getURL( WikiContext.DIFF,
p.getName(),
"r1=-1",
true) ) );
}
//
// Modification date.
//
Calendar cal = Calendar.getInstance();
cal.setTime( p.getLastModified() );
cal.add( Calendar.MILLISECOND,
- (cal.get( Calendar.ZONE_OFFSET ) +
(cal.getTimeZone().inDaylightTime( p.getLastModified() ) ? cal.get( Calendar.DST_OFFSET ) : 0 )) );
item.addElement( new XML("dc:date").addElement( iso8601fmt.format( cal.getTime() )));
//
// Author
String author = e.getAuthor();
if( author == null ) author = "unknown";
XML contributor = new XML("dc:creator");
item.addElement( contributor );
/*
XML description = new XML("rdf:Description");
if( m_wikiContext.getEngine().pageExists(author) )
{
description.addAttribute( "link", engine.getURL( WikiContext.VIEW,
author,
null,
true ) );
}
description.addElement( new XML("value").addElement( format(author) ) );
contributor.addElement( description );
*/
// Not too many aggregators seem to like this. Therefore we're
// just adding the name here.
contributor.addElement( format(author) );
// PageHistory
item.addElement( new XML("wiki:history").addElement( engine.getURL( WikiContext.INFO,
p.getName(),
null,
true ) ) );
//
// Add to root