Mercurial > eldonilo > blog
view nothing.js @ 7:7ab6b48122af
Add support for content in Atom and improve published display.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 02 Nov 2011 09:35:46 -0700 |
parents | 4d7a67349089 |
children | 161d4ea1c3f8 |
line wrap: on
line source
'use strict'; parsers[''] = function(id, xml) { var toDate = function() { return new Date(); }; var toHTML = function(xml, date) { var article = document.createElementNS(ns.xhtml, 'article'); article.setAttributeNS(ns.e, 'id', id); article.setAttributeNS(ns.e, 'date', date.to8601()); article.appendChild(document.createElementNS(ns.xhtml, 'h2').appendChild(document.createTextNode('This post is in an unknown namespace.'))); return article; }; this.xml = xml; this.date = toDate(xml); this.html = toHTML(xml, this.date); }