view nothing.js @ 10:360186772aa3

Don’t hardcode avatars URL.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 02 Nov 2011 10:00:01 -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);
}