comparison js/specification.js @ 3034:49eca76782d2

Fix #218
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Tue, 26 Sep 2017 09:34:38 +0100
parents 192538967e67
children ae0950bc1c99
comparison
equal deleted inserted replaced
3033:21e3777edf58 3034:49eca76782d2
716 function commentQuestionNode(specification) { 716 function commentQuestionNode(specification) {
717 this.id = undefined; 717 this.id = undefined;
718 this.name = undefined; 718 this.name = undefined;
719 this.type = undefined; 719 this.type = undefined;
720 this.statement = undefined; 720 this.statement = undefined;
721 this.mandatory = undefined;
721 this.schema = schemaRoot.querySelector('[name=commentquestion]'); 722 this.schema = schemaRoot.querySelector('[name=commentquestion]');
722 this.decode = function (parent, xml) { 723 this.decode = function (parent, xml) {
723 this.id = xml.id; 724 this.id = xml.id;
724 this.name = xml.getAttribute('name'); 725 this.name = xml.getAttribute('name');
726 this.mandatory = xml.getAttribute("mandatory") == "true";
725 if (this.name === null) { 727 if (this.name === null) {
726 this.name = undefined; 728 this.name = undefined;
727 } 729 }
728 switch (xml.nodeName) { 730 switch (xml.nodeName) {
729 case "commentradio": 731 case "commentradio":