internal bool IsTable(XmlSchemaElement node)
{
if (node.MaxOccurs == decimal.Zero)
return false;
XmlAttribute[] attribs = node.UnhandledAttributes;
if (attribs != null)
{
for (int i = 0; i < attribs.Length; i++)
{
XmlAttribute attrib = attribs[i];
if (attrib.LocalName == Keywords.MSD_DATATYPE &&
attrib.Prefix == Keywords.MSD &&
attrib.NamespaceURI == Keywords.MSDNS)
return false;
}
}
object typeNode = FindTypeNode(node);
if ((node.MaxOccurs > decimal.One) && typeNode == null)
{
return true;
}
if ((typeNode == null) || !(typeNode is XmlSchemaComplexType))
{
return false;
}
XmlSchemaComplexType ctNode = (XmlSchemaComplexType)typeNode;
if (ctNode.IsAbstract)
throw ExceptionBuilder.CannotInstantiateAbstract(node.Name);
return true;
}