9 private bool isAbstract;
11 private bool hasAbstractAttribute;
13 private bool isNillable;
15 private bool hasNillableAttribute;
17 private bool isLocalTypeDerivationChecked;
25 private string defaultValue;
27 private string fixedValue;
49 private SchemaElementDecl elementDecl;
64 hasAbstractAttribute =
true;
177 hasNillableAttribute =
true;
182 internal bool HasNillableAttribute
186 return hasNillableAttribute;
191 internal bool HasAbstractAttribute
195 return hasAbstractAttribute;
201 [XmlAttribute(
"ref")]
202 public XmlQualifiedName
RefName 221 return substitutionGroup;
269 if (constraints ==
null)
284 return qualifiedName;
291 [Obsolete(
"This property has been deprecated. Please use ElementSchemaType property that returns a strongly typed element type. http://go.microsoft.com/fwlink/?linkid=14202")]
296 if (elementType ==
null)
326 return blockResolved;
337 return finalResolved;
342 internal bool HasDefault
346 if (defaultValue !=
null)
348 return defaultValue.Length > 0;
354 internal bool HasConstraints
358 if (constraints !=
null)
360 return constraints.
Count > 0;
366 internal bool IsLocalTypeDerivationChecked
370 return isLocalTypeDerivationChecked;
374 isLocalTypeDerivationChecked = value;
378 internal SchemaElementDecl ElementDecl
391 internal override string NameAttribute
404 internal override string NameString
412 internal XmlReader Validate(XmlReader reader, XmlResolver resolver, XmlSchemaSet schemaSet,
ValidationEventHandler valEventHandler)
414 if (schemaSet !=
null)
416 XmlReaderSettings xmlReaderSettings =
new XmlReaderSettings();
418 xmlReaderSettings.Schemas = schemaSet;
419 xmlReaderSettings.ValidationEventHandler += valEventHandler;
420 return new XsdValidatingReader(reader, resolver, xmlReaderSettings,
this);
425 internal void SetQualifiedName(XmlQualifiedName value)
427 qualifiedName = value;
430 internal void SetElementType(XmlSchemaType value)
437 blockResolved = value;
442 finalResolved = value;
445 internal override XmlSchemaObject Clone()
450 internal XmlSchemaObject Clone(XmlSchema parentSchema)
452 XmlSchemaElement xmlSchemaElement = (XmlSchemaElement)MemberwiseClone();
453 xmlSchemaElement.refName = refName.Clone();
454 xmlSchemaElement.substitutionGroup = substitutionGroup.Clone();
455 xmlSchemaElement.typeName = typeName.Clone();
456 xmlSchemaElement.qualifiedName = qualifiedName.Clone();
457 XmlSchemaComplexType xmlSchemaComplexType = type as XmlSchemaComplexType;
458 if (xmlSchemaComplexType !=
null && xmlSchemaComplexType.QualifiedName.IsEmpty)
460 xmlSchemaElement.type = (XmlSchemaType)xmlSchemaComplexType.Clone(parentSchema);
462 xmlSchemaElement.constraints =
null;
463 return xmlSchemaElement;
The base class for all simple types and complex types.
bool IsAbstract
Gets or sets information to indicate if the element can be used in an instance document.
XmlSchemaType ElementSchemaType
Gets an T:System.Xml.Schema.XmlSchemaType object representing the type of the element based on the P:...
XmlSchemaForm
Indicates if attributes or elements need to be qualified with a namespace prefix.
A collection of T:System.Xml.Schema.XmlSchemaObjects.
XmlSchemaDatatype Datatype
Gets the post-compilation value for the data type of the complex type.
Represents an attribute. Valid and default values for the attribute are defined in a document type de...
This class represents the key element from XMLSchema as specified by the World Wide Web Consortium (W...
object ElementType
Gets a common language runtime (CLR) object based on the T:System.Xml.Schema.XmlSchemaElement or T:Sy...
ValidationType
Specifies the type of validation to perform.
XmlQualifiedName? SchemaTypeName
Gets or sets the name of a built-in data type defined in this schema or another schema indicated by t...
string Namespace
Gets a string representation of the namespace of the T:System.Xml.XmlQualifiedName.
string DefaultValue
Gets or sets the default value of the element if its content is a simple type or content of the eleme...
This class represents the keyref element from XMLSchema as specified by the World Wide Web Consortium...
bool IsNillable
Gets or sets information that indicates if xsi:nil can occur in the instance data....
delegate void ValidationEventHandler(object sender, ValidationEventArgs e)
Represents the callback method that will handle XML schema validation events and the T:System....
Represents the complexType element from XML Schema as specified by the World Wide Web Consortium (W3C...
string Name
Gets or sets the name of the element.
Represents an XML qualified name.
XmlSchemaDerivationMethod FinalResolved
Gets the post-compilation value of the Final property.
XmlSchemaDerivationMethod BlockResolved
Gets the post-compilation value of the Block property.
XmlQualifiedName QualifiedName
Gets the actual qualified name for the given element.
string FixedValue
Gets or sets the fixed value.
XmlQualifiedName? RefName
Gets or sets the reference name of an element declared in this schema (or another schema indicated by...
int Count
Gets the number of elements contained in the T:System.Collections.CollectionBase instance....
static readonly XmlQualifiedName Empty
Provides an empty T:System.Xml.XmlQualifiedName.
Represents the element element from XML Schema as specified by the World Wide Web Consortium (W3C)....
override string ToString()
Returns the string value of the T:System.Xml.XmlQualifiedName.
XmlQualifiedName QualifiedName
Gets the qualified name for the type built from the Name attribute of this type. This is a post-schem...
XmlSchemaObjectCollection Constraints
Gets the collection of constraints on the element.
XmlSchemaDerivationMethod Block
Gets or sets a Block derivation.
Abstract class for that is the base class for all particle types (e.g. T:System.Xml....
Represents the unique element from XML Schema as specified by the World Wide Web Consortium (W3C)....
XmlSchemaForm Form
Gets or sets the form for the element.
XmlSchemaDerivationMethod
Provides different methods for preventing derivation.
Represents the simpleType element for simple content from XML Schema as specified by the World Wide W...
XmlQualifiedName? SubstitutionGroup
Gets or sets the name of an element that is being substituted by this element.
XmlSchemaDerivationMethod Final
Gets or sets the Final property to indicate that no further derivations are allowed.