Share via


2.3.1.1.1 <schema> Element

Following are the rules that MUST be followed for the <schema> element:

  • If the schema element contains an element named element whose msdata:IsDataSet attribute is set to true, this element MUST be mapped to the DataSet object and hereafter is referred to as the DataSet Schema element. Otherwise, the <schema> element itself is mapped to the DataSet, and the name of the DataSet is mapped from the id attribute, if it is specified.

    • If a child element of the <schema> element has a msdata:IsDataSet attribute set to false, this child element MUST be mapped to a DataTable object and not a DataSet.

  • If the <schema> element does not contain an element whose msdata:IsDataSet attribute is set to true, the following rules apply:

    • If there is an id attribute of the <schema> element, it MUST be mapped to the name of the DataSet.

  • If the attribute targetNamespace is specified on the <schema> element, it MUST be set as the targetNamespace of the DataSet and MUST be a valid namespace string as specified in [XMLSCHEMA1]. If the attribute targetNamespace is not specified, the namespace property of the DataSet MUST be set to an empty string.

  • <Attribute> elements that are children of the <schema> element and are not referenced elsewhere MUST be ignored. If the <attribute> elements are referenced, they MUST follow the mapping rules that are specified in section 2.3.1.1.15.

  • Any element that is a <simpleType> element as specified in [XMLSCHEMA2] and that is a direct child of the <schema> element and not referenced as specified in [XMLSCHEMA2], MUST be ignored in the mapping. If the <simpleType> element is referenced, it MUST follow the mapping rules that are specified in section 2.3.1.1.14.

  • Any element that is a <complexType> element as specified in [XMLSCHEMA2] and that is a direct child of the <schema> element and not referenced as specified in [XMLSCHEMA2], MUST be ignored in the mapping. If the <complexType> element is referenced, it MUST map to a DataTable and MUST follow the rules that are specified in section 2.3.1.1.8.

  • Any element that is a <group> element that is a direct child of the <schema> element and not referenced as specified in [XMLSCHEMA2], this element MUST be ignored in the mapping. If the named <group> element is referenced, it MUST follow the mapping rules that are specified in section 2.3.1.1.5.

  • Any element that has the abstract attribute equal to true and that is not referenced as specified in [XMLSCHEMA2] by any other elements MUST be ignored. If the element that is referenced has the abstract attribute equal to true, the referencing type follows the rules that are described in section 2.3.1.1.10.