code: function(context, options) {
          var name = "OWSContext";
          this.nestingLayerLookup = {}; //start with empty lookup
          options = options || {};
          OpenLayers.Util.applyDefaults(options, context);
          var root = this.writeNode(name, options);
          this.nestingLayerLookup = null; //clear lookup
          this.setAttributeNS(
              root, this.namespaces["xsi"],
              "xsi:schemaLocation", this.schemaLocation
          );
          return OpenLayers.Format.XML.prototype.write.apply(this, [root]);
      }
docs: APIMethod: write
  
  Parameters:
  context - {Object} An object representing the map context.
  options - {Object} Optional object.
  
  Returns:
  {String} An OWS Context document string.