*/
public class DavUtil
{
public static String getCollectionInHTML( WikiContext context, Collection coll )
{
XhtmlDocument doc = new XhtmlDocument("UTF-8");
ul content = new ul();
for( Iterator i = coll.iterator(); i.hasNext(); )
{
Object o = i.next();
if( o instanceof WikiPage )
{
WikiPage p = (WikiPage)o;
content.addElement( new li().addElement( p.getName() ) );
}
else if( o instanceof String )
{
content.addElement( new li().addElement( o.toString() ));
}
}
doc.appendBody( content );
return doc.toString();
}