Skip to content

Commit

Permalink
remove *NS
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed Jul 5, 2013
1 parent 13db1ed commit b8570ab
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/atom-writer.js
Expand Up @@ -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))
Expand All @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
},
Expand Down

0 comments on commit b8570ab

Please sign in to comment.