code: function(context, options) {
          var root = this.createElementDefaultNS("ViewContext");
          this.setAttributes(root, {
              version: this.VERSION,
              id: (options && typeof options.id == "string") ?
                      options.id :
                      OpenLayers.Util.createUniqueID("OpenLayers_Context_")
          });
          
          // add schemaLocation attribute
          this.setAttributeNS(
              root, this.namespaces.xsi,
              "xsi:schemaLocation", this.schemaLocation
          );
          
          // required General element
          root.appendChild(this.write_wmc_General(context));
  
          // required LayerList element
          root.appendChild(this.write_wmc_LayerList(context));
  
          return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
      }
docs: Method: write
  
  Parameters:
  context - {Object} An object representing the map context.
  options - {Object} Optional object.
  
  Returns:
  {String} A WMC document string.