Skip to content

Commit

Permalink
2004-10-29 Atsushi Enomoto <atsushi@ximian.com>
Browse files Browse the repository at this point in the history
	* XmlSchemaSimpleTypeList.cs : Added 2.0 BaseItemType property (BTW
	  this property name is really ambiguous and should be changed.)

svn path=/trunk/mcs/; revision=35432
  • Loading branch information
atsushieno committed Oct 29, 2004
1 parent c565d41 commit c955879
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mcs/class/System.XML/System.Xml.Schema/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2004-10-29 Atsushi Enomoto <atsushi@ximian.com>

* XmlSchemaSimpleTypeList.cs : Added 2.0 BaseItemType property (BTW
this property name is really ambiguous and should be changed.)

2004-10-28 Atsushi Enomoto <atsushi@ximian.com>

* XmlSchemaAttributeGroup.cs, XmlSchemaGroup.cs :
Expand Down
17 changes: 17 additions & 0 deletions mcs/class/System.XML/System.Xml.Schema/XmlSchemaSimpleTypeList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class XmlSchemaSimpleTypeList : XmlSchemaSimpleTypeContent
private XmlQualifiedName itemTypeName;
const string xmlname = "list";
private object validatedListItemType;
private XmlSchemaSimpleType validatedListItemSchemaType;

public XmlSchemaSimpleTypeList()
{
Expand All @@ -62,6 +63,15 @@ public XmlSchemaSimpleType ItemType
itemType = value;
}
}

#if NET_2_0
// LAMESPEC: this name is really ambiguous. Actually it just
// holds compiled itemType.
public XmlSchemaSimpleType BaseItemType {
get { return validatedListItemSchemaType; }
}
#endif

internal object ValidatedListItemType
{
get { return validatedListItemType; }
Expand Down Expand Up @@ -119,6 +129,13 @@ internal override int Validate(ValidationEventHandler h, XmlSchema schema)
else if (!schema.IsNamespaceAbsent (itemTypeName.Namespace))
error (h, "Referenced base list item schema type " + itemTypeName + " was not found.");

#if NET_2_0
XmlSchemaSimpleType st = validatedListItemType as XmlSchemaSimpleType;
if (st == null && validatedListItemType != null)
st = XmlSchemaType.GetBuiltInSimpleType (((XmlSchemaDatatype) validatedListItemType).TypeCode);
validatedListItemSchemaType = st;
#endif

ValidationId = schema.ValidationId;
return errorCount;
}
Expand Down

0 comments on commit c955879

Please sign in to comment.