In Exclude.from_ccnb, use a BinaryXMLStructureDecoder to skip decoding the Exclude. (Implementing decoding is still TODO.) This closes bug #16.
diff --git a/js/Interest.js b/js/Interest.js
index 6553091..e01f600 100644
--- a/js/Interest.js
+++ b/js/Interest.js
@@ -122,22 +122,20 @@
* Exclude
*/
var Exclude = function Exclude(_values){
-
this.OPTIMUM_FILTER_SIZE = 100;
-
-
this.values = _values; //array of elements
-
}
Exclude.prototype.from_ccnb = function(/*XMLDecoder*/ decoder) {
-
-
-
decoder.readStartElement(this.getElementLabel());
- //TODO APPLY FILTERS/EXCLUDE
-
+ //TODO APPLY FILTERS/EXCLUDE. For now, just skip the element.
+ var structureDecoder = new BinaryXMLStructureDecoder();
+ structureDecoder.seek(decoder.offset);
+ if (!structureDecoder.findElementEnd(decoder.istream))
+ throw new ContentDecodingException(new Error("Cannot find the end of interest Exclude element"));
+ decoder.seek(structureDecoder.offset);
+
//TODO
/*var component;
var any = false;
@@ -148,9 +146,6 @@
ee.decode(decoder);
_values.add(ee);
}*/
-
- decoder.readEndElement();
-
};
Exclude.prototype.to_ccnb=function(/*XMLEncoder*/ encoder) {