1 //------------------------------------------------------------------------------
2 // <copyright file="XmlSchemaSimpleTypeRestriction.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">[....]</owner>
6 //------------------------------------------------------------------------------
8 namespace System.Xml.Schema {
10 using System.Collections;
11 using System.Xml.Serialization;
13 /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction"]/*' />
15 /// <para>[To be supplied.]</para>
17 public class XmlSchemaSimpleTypeRestriction : XmlSchemaSimpleTypeContent {
18 XmlQualifiedName baseTypeName = XmlQualifiedName.Empty;
19 XmlSchemaSimpleType baseType;
20 XmlSchemaObjectCollection facets = new XmlSchemaObjectCollection();
22 /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.BaseTypeName"]/*' />
24 /// <para>[To be supplied.]</para>
26 [XmlAttribute("base")]
27 public XmlQualifiedName BaseTypeName {
28 get { return baseTypeName; }
29 set { baseTypeName = (value == null ? XmlQualifiedName.Empty : value); }
32 /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.BaseType"]/*' />
34 /// <para>[To be supplied.]</para>
36 [XmlElement("simpleType", typeof(XmlSchemaSimpleType))]
37 public XmlSchemaSimpleType BaseType {
38 get { return baseType; }
39 set { baseType = value; }
42 /// <include file='doc\XmlSchemaSimpleTypeRestriction.uex' path='docs/doc[@for="XmlSchemaSimpleTypeRestriction.Facets"]/*' />
44 /// <para>[To be supplied.]</para>
46 [XmlElement("length", typeof(XmlSchemaLengthFacet)),
47 XmlElement("minLength", typeof(XmlSchemaMinLengthFacet)),
48 XmlElement("maxLength", typeof(XmlSchemaMaxLengthFacet)),
49 XmlElement("pattern", typeof(XmlSchemaPatternFacet)),
50 XmlElement("enumeration", typeof(XmlSchemaEnumerationFacet)),
51 XmlElement("maxInclusive", typeof(XmlSchemaMaxInclusiveFacet)),
52 XmlElement("maxExclusive", typeof(XmlSchemaMaxExclusiveFacet)),
53 XmlElement("minInclusive", typeof(XmlSchemaMinInclusiveFacet)),
54 XmlElement("minExclusive", typeof(XmlSchemaMinExclusiveFacet)),
55 XmlElement("totalDigits", typeof(XmlSchemaTotalDigitsFacet)),
56 XmlElement("fractionDigits", typeof(XmlSchemaFractionDigitsFacet)),
57 XmlElement("whiteSpace", typeof(XmlSchemaWhiteSpaceFacet))]
58 public XmlSchemaObjectCollection Facets {
59 get { return facets; }
62 internal override XmlSchemaObject Clone() {
63 XmlSchemaSimpleTypeRestriction newRestriction = (XmlSchemaSimpleTypeRestriction)MemberwiseClone();
64 newRestriction.BaseTypeName = baseTypeName.Clone();
65 return newRestriction;