diff --git a/lib/atom-writer.js b/lib/atom-writer.js index 74eb14a..dd8739c 100644 --- a/lib/atom-writer.js +++ b/lib/atom-writer.js @@ -38,7 +38,7 @@ ATOMWriter.prototype = { assert(updated instanceof Date) this.writer.startElement('feed') this.writer.writeAttribute('xmlns', 'http://www.w3.org/2005/Atom') - this.writer.writeAttributeNS('xmlns','opensearch', null,'http://a9.com/-/spec/opensearch/1.1/') + this.writer.writeAttribute('xmlns:opensearch','http://a9.com/-/spec/opensearch/1.1/') this.writer.writeElement('id', id) if (created instanceof Date) { this.writer.writeElement('created', date2string(created)) @@ -55,7 +55,7 @@ ATOMWriter.prototype = { this.writer.startElement('title') this.writer.writeAttribute('type', type) if (typeof lang === 'string') { - this.writer.writeAttributeNS('xml','lang', null,lang) + this.writer.writeAttribute('xml:lang', lang) } this.writer.text(value) this.writer.endElement() @@ -159,7 +159,7 @@ ATOMWriter.prototype = { this.writer.writeAttribute('type', type) } if (typeof lang === 'string') { - this.writer.writeAttributeNS('xml','lang', null, lang) + this.writer.writeAttribute('xml:lang', lang) } this.writer.text(value) this.writer.endElement() @@ -180,7 +180,7 @@ ATOMWriter.prototype = { }, writeTotalResults: function (value) { assert.equal(typeof value, 'number') - this.writer.startElementNS('opensearch','totalResults') + this.writer.startElement('opensearch:totalResults') this.writer.text(value.toString()) this.writer.endElement() return this @@ -190,7 +190,7 @@ ATOMWriter.prototype = { value = 0 } assert.equal(typeof value, 'number') - this.writer.startElementNS('opensearch','startIndex') + this.writer.startElement('opensearch:startIndex') this.writer.text(value.toString()) this.writer.endElement() return this @@ -200,7 +200,7 @@ ATOMWriter.prototype = { value = 20 } assert.equal(typeof value, 'number') - this.writer.startElementNS('opensearch','itemsPerPage') + this.writer.startElement('opensearch:itemsPerPage') this.writer.text(value.toString()) this.writer.endElement() return this @@ -215,10 +215,10 @@ ATOMWriter.prototype = { assert.equal(typeof searchTerms, 'string') assert.equal(typeof startPage, 'number') assert.equal(typeof role, 'string') - this.writer.startElementNS('opensearch','Query') - this.writer.writeAttributeNS('opensearch','searchTerms',null,searchTerms) - this.writer.writeAttributeNS('opensearch','startPage',null,startPage.toString()) - this.writer.writeAttributeNS('opensearch','role',null,role) + this.writer.startElement('opensearch:Query') + this.writer.writeAttribute('opensearch:searchTerms', searchTerms) + this.writer.writeAttribute('opensearch:startPage', startPage.toString()) + this.writer.writeAttribute('opensearch:role', role) this.writer.endElement() return this },