2.3.1 DataInstance Element Schema

The DataInstance schema MUST define exactly one element that will encapsulate the representation of all data in the DataSet. This element is referred to as the DiffGram DataInstance element. In addition to being a valid XML schema, this schema MUST conform to the following rules:

  • The DataInstance element MUST be defined using an anonymous complex type. The complex type MUST be defined as a choice of element content with zero minimum occurrence and unbounded maximum occurrence. Each element in the choice MUST conform to the rules of the element definition specified in section 2.3.2.

  • The DataInstance element definition MUST contain zero or more DataTable element definitions in the choice element. The DataTable element definitions are immediate children of the choice.

  • The element with namespace http://www.w3.org/2001/XMLSchema that defines the DataInstance element MUST have the urn:schemas-microsoft-com:xml-msdata:IsDataSet attribute set to true (value of "true" or "1").

  • The DataInstance element MUST contain zero, one, or more Unique elements. The Unique element's definitions are defined immediately after the complex type element that defines a choice of DataTable elements.

  • The DataInstance element complex type definition MUST NOT contain attribute definitions for the element with namespace http://www.w3.org/2001/XMLSchemahttp://www.w3.org/2001/XMLSchema.

  • The element with namespace http://www.w3.org/2001/XMLSchema that defines the DataInstance element can contain the urn:schemas-microsoft-com:xml-msdata:UseCurrentLocale attribute. If this attribute is present, the value of the attribute MUST be set to true (value of "true" or "1") or false (value of "false" or "0").

  • The element with namespace http://www.w3.org/2001/XMLSchema that defines the DataInstance element can have the urn:schemas-microsoft-com:xml-msdata:DataSetName attribute. If this attribute is specified, then the name of the DataSet is equal to the value of the attribute. If this attribute is not specified, then the name of the DataSet is equal to the name of the DataInstance element.

  • Each extended property MUST appear as an attribute in the declaration of the DataInstance element (for properties that apply to the whole DataSet). The attribute name MUST be the name of the extended property, and the attribute's namespace MUST be urn:schemas-microsoft-com:xml-msprop. The attribute's value MUST be the value of the extended property.

  • Any attributes with a namespace other than urn:schemas-microsoft-com:xml-msprop are not extended properties.