msdata Namespace
The msdata
namespace extends a XSD document so that it can represent an ADO.NET
DataSet. The msdata namespace
is also used in XML documents: namely in the
DiffGram representation of a
DataSet (along with the diffgr
namespace). Here’s an example of how the
msdata namespace is imported in an
XSD file:
<xs:schema id="DataSetName" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" >One place where you’ll see the
msdata namespace is in the element tag containing
the XSD structure. Here, an IsDataSet attribute
indicates that the schema is used to represent an ADO.NET
DataSet:
<xs:element name="DataSetName" msdata:IsDataSet="true" >
The element tag also supports optional
CaseSensitive and Local
attributes:
<xs:element name="DataSetName"
msdata:CaseSensitive="true" msdata:Locale="en">More importantly, the msdata namespace represents
various DataColumn properties that
don’t have direct XSD mappings. Table B-4 lists these.
|
Attribute |
Description |
|
|
Sets the auto-incrementing options for unique identity fields. These
attributes map to corresponding |
Caption |
Specifies the display caption for the column. Maps to
|
Expression |
Sets the expression used to filter rows, calculate the values in a
column, or create an aggregate column. Maps to
|
ReadOnly |
Indicates ( |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access