private string GetTableName(XmlSchemaIdentityConstraint key)
{
string xpath = key.Selector.XPath;
string[] split = xpath.Split('/', ':');
string tableName = split[split.Length - 1]; //get the last string after '/' and ':'
if ((tableName == null) || (tableName.Length == 0))
throw ExceptionBuilder.InvalidSelector(xpath);
tableName = XmlConvert.DecodeName(tableName);
return tableName;
}