Mercurial > eldonilo > lightstring
comparison plugins/disco.js @ 80:50d36b093e3a
Lightstring.namespaces/NS has been renamed by Lightstring.ns.
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Tue, 07 Feb 2012 18:42:09 +0100 |
parents | 0b8e7ca19f83 |
children | 7500bc048dbc |
comparison
equal
deleted
inserted
replaced
79:2290321f5c8b | 80:50d36b093e3a |
---|---|
94 for (var i = 0; i < length; i++) { | 94 for (var i = 0; i < length; i++) { |
95 var child = children[i]; | 95 var child = children[i]; |
96 var ns = child.namespaceURI; | 96 var ns = child.namespaceURI; |
97 var name = child.localName; | 97 var name = child.localName; |
98 | 98 |
99 if (ns === Lightstring.namespaces['disco#info'] && name === 'feature') | 99 if (ns === Lightstring.ns['disco#info'] && name === 'feature') |
100 features.push(child.getAttributeNS(null, 'var')); | 100 features.push(child.getAttributeNS(null, 'var')); |
101 | 101 |
102 else if (ns === Lightstring.namespaces['disco#info'] && name === 'identity') { | 102 else if (ns === Lightstring.ns['disco#info'] && name === 'identity') { |
103 var identity = { | 103 var identity = { |
104 category: child.getAttributeNS(null, 'category'), | 104 category: child.getAttributeNS(null, 'category'), |
105 type: child.getAttributeNS(null, 'type') | 105 type: child.getAttributeNS(null, 'type') |
106 }; | 106 }; |
107 var name = child.getAttributeNS(null, 'name'); | 107 var name = child.getAttributeNS(null, 'name'); |
108 if (name) | 108 if (name) |
109 identity.name = name; | 109 identity.name = name; |
110 identities.push(identity); | 110 identities.push(identity); |
111 } | 111 } |
112 | 112 else if (ns === Lightstring.ns['dataforms'] && name === 'x') { |
113 else if (ns === Lightstring.namespaces['dataforms'] && name === 'x') | 113 var fields = this.dataforms.parse(child); //TODO: check if that plugin is enabled. |
114 this.disco.parse(child); //TODO: check if that plugin is enabled. | 114 } |
115 | |
116 else | 115 else |
117 ; //TODO: emit a warning. | 116 ; //TODO: emit a warning. |
118 } | 117 } |
119 | 118 |
120 stanza.identities = identities; | 119 stanza.identities = identities; |