Mercurial > eldonilo > blog
view nothing.js @ 0:f62b5c395a48
Initial commit.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 04 Jun 2011 05:02:47 +0200 |
parents | |
children | 4d7a67349089 |
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.idq, 'id', id); article.setAttributeNS(ns.idq, '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); }