# HG changeset patch # User Nicholas Jillings # Date 1492782376 -3600 # Node ID 72604c3a3ed9ff026646e821086a628db5ec3f16 # Parent d6e496b0a5a958156b2ba31858feaa758eea23f2 Added schema layouts for #138 diff -r d6e496b0a5a9 -r 72604c3a3ed9 js/specification.js --- a/js/specification.js Fri Apr 21 14:28:26 2017 +0100 +++ b/js/specification.js Fri Apr 21 14:46:16 2017 +0100 @@ -415,6 +415,7 @@ this.interfaceNode = function (specification) { this.title = undefined; this.name = undefined; + this.image = undefined; this.options = []; this.scales = []; this.schema = schemaRoot.getAllElementsByName('interface')[1]; @@ -443,7 +444,11 @@ } this.options.push(option); } - + // Get the image node + var imageNode = xml.getElementsByTagName("image"); + if (imageNode.length == 1) { + this.image = imageNode[0].getAttribute("src"); + } // Now the scales nodes var scaleParent = xml.getElementsByTagName('scales'); if (scaleParent.length == 1) { @@ -790,6 +795,7 @@ this.startTime = undefined; this.stopTime = undefined; this.sampleRate = undefined; + this.image = undefined; this.alternatives = []; this.schema = schemaRoot.getAllElementsByName('audioelement')[0]; this.parent = undefined; diff -r d6e496b0a5a9 -r 72604c3a3ed9 xml/test-schema.xsd --- a/xml/test-schema.xsd Fri Apr 21 14:28:26 2017 +0100 +++ b/xml/test-schema.xsd Fri Apr 21 14:46:16 2017 +0100 @@ -28,7 +28,7 @@ - + @@ -122,6 +122,11 @@ + + + + + @@ -229,6 +234,7 @@ +