Mercurial > eldonilo > blog
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f62b5c395a48 |
---|---|
1 'use strict'; | |
2 | |
3 parsers[''] = function(id, xml) { | |
4 var toDate = function() { | |
5 return new Date(); | |
6 }; | |
7 | |
8 var toHTML = function(xml, date) { | |
9 var article = document.createElementNS(ns.xhtml, 'article'); | |
10 article.setAttributeNS(ns.idq, 'id', id); | |
11 article.setAttributeNS(ns.idq, 'date', date.to8601()); | |
12 article.appendChild(document.createElementNS(ns.xhtml, 'h2').appendChild(document.createTextNode('This post is in an unknown namespace.'))); | |
13 return article; | |
14 }; | |
15 | |
16 this.xml = xml; | |
17 this.date = toDate(xml); | |
18 this.html = toHTML(xml, this.date); | |
19 } |