private void ProcessDataSetElement (XmlSchemaElement el)
{
dataset.DataSetName = el.Name;
this.datasetElement = el;
// Search for locale attributes
bool useCurrent = false;
if (el.UnhandledAttributes != null) {
foreach (XmlAttribute attr in el.UnhandledAttributes) {
#if NET_2_0
if (attr.LocalName == "UseCurrentLocale" &&
attr.NamespaceURI == XmlConstants.MsdataNamespace)
useCurrent = true;
#endif
if (attr.NamespaceURI == XmlConstants.MspropNamespace &&
!dataset.ExtendedProperties.ContainsKey(attr.Name)) {
dataset.ExtendedProperties.Add (attr.Name, attr.Value);
continue;
}
if (attr.LocalName == "Locale" &&
attr.NamespaceURI == XmlConstants.MsdataNamespace) {
CultureInfo ci = new CultureInfo (attr.Value);
dataset.Locale = ci;
}
}
}
#if NET_2_0
if (!useCurrent && !dataset.LocaleSpecified) // then set current culture instance _explicitly_
dataset.Locale = CultureInfo.CurrentCulture;
#endif
// Process content type particle (and create DataTable)
XmlSchemaComplexType ct = null;
#if NET_2_0
ct = el.ElementSchemaType as XmlSchemaComplexType;
#else
ct = el.ElementType as XmlSchemaComplexType;
#endif
XmlSchemaParticle p = ct != null ? ct.ContentTypeParticle : null;
if (p != null)
HandleDataSetContentTypeParticle (p);
}