Mercurial > eldonilo > blog
comparison nothing.js @ 14:03be0717d3f8
Use the same code for client- and server-side Atom parsing.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 03 Nov 2011 16:42:00 -0700 |
parents | 161d4ea1c3f8 |
children |
comparison
equal
deleted
inserted
replaced
13:161d4ea1c3f8 | 14:03be0717d3f8 |
---|---|
5 return new Date(); | 5 return new Date(); |
6 }; | 6 }; |
7 | 7 |
8 var toHTML = function(item, date) { | 8 var toHTML = function(item, date) { |
9 var article = document.createElementNS(ns.xhtml, 'article'); | 9 var article = document.createElementNS(ns.xhtml, 'article'); |
10 article.setAttributeNS(ns.e, 'id', id); | 10 article.setAttributeNS(ns.e, 'id', item.id); |
11 article.setAttributeNS(ns.e, 'date', date.to8601()); | 11 article.setAttributeNS(ns.e, 'date', date.to8601()); |
12 article.appendChild(document.createElementNS(ns.xhtml, 'h2').appendChild(document.createTextNode('This post is in an unknown namespace.'))); | 12 article.appendChild(document.createElementNS(ns.xhtml, 'h2').appendChild(document.createTextNode('This post is in an unknown namespace.'))); |
13 return article; | 13 return article; |
14 }; | 14 }; |
15 | 15 |