comparison test_create/test_create.html @ 769:30adbf6a6d50

Specification Node is same across project.
author Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk>
date Mon, 07 Dec 2015 09:47:26 +0000
parents 30d29aea590f
children 67c6048d920f
comparison
equal deleted inserted replaced
768:30d29aea590f 769:30adbf6a6d50
2013 this.commentBoxPrefix = "Comment on track"; 2013 this.commentBoxPrefix = "Comment on track";
2014 } 2014 }
2015 var audioElementsDOM = xml.getElementsByTagName('audioElements'); 2015 var audioElementsDOM = xml.getElementsByTagName('audioElements');
2016 for (var i=0; i<audioElementsDOM.length; i++) { 2016 for (var i=0; i<audioElementsDOM.length; i++) {
2017 var node = new this.audioElementNode(); 2017 var node = new this.audioElementNode();
2018 node.decode(this,audioElementsDOM[i]);
2018 if (audioElementsDOM[i].getAttribute('type') == 'outsidereference') { 2019 if (audioElementsDOM[i].getAttribute('type') == 'outsidereference') {
2019 if (this.outsideReference == null) { 2020 if (this.outsideReference == null) {
2020 this.outsideReference = node.decode(this,audioElementsDOM[i]); 2021 this.outsideReference = node;
2021 } else { 2022 } else {
2022 console.log('Error only one audioelement can be of type outsidereference per audioholder'); 2023 console.log('Error only one audioelement can be of type outsidereference per audioholder');
2023 node.decode(this,audioElementsDOM[i]);
2024 this.audioElements.push(node); 2024 this.audioElements.push(node);
2025 console.log('Element id '+audioElementsDOM[i].id+' made into normal node'); 2025 console.log('Element id '+audioElementsDOM[i].id+' made into normal node');
2026 } 2026 }
2027 } else { 2027 } else {
2028 node.decode(this,audioElementsDOM[i]);
2029 this.audioElements.push(node); 2028 this.audioElements.push(node);
2030 } 2029 }
2031 } 2030 }
2032 2031
2033 var commentQuestionsDOM = xml.getElementsByTagName('CommentQuestion'); 2032 var commentQuestionsDOM = xml.getElementsByTagName('CommentQuestion');