code: function(context) {
           var node = this.createElementDefaultNS("DimensionList");
           var required_attributes = {
               name: true,
               units: true,
               unitSymbol: true,
               userValue: true
           };
           for (var dim in context.dimensions) {
               var attributes = {};
               var dimension = context.dimensions[dim];
               for (var name in dimension) {
                   if (typeof dimension[name] == "boolean") {
                       attributes[name] = Number(dimension[name]);
                   } else {
                       attributes[name] = dimension[name];
                   }
               }
               var values = "";
               if (attributes.values) {
                   values = attributes.values.join(",");
                   delete attributes.values;
               }
  
               node.appendChild(this.createElementDefaultNS(
                   "Dimension", values, attributes
               ));
           }
          return node;
      }
docs: Method: write_wmc_DimensionList