mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
* Forgot to append 8/24/2003 ChangeLog. * BUGS.txt, BUGS-MS.txt : Appended additional bug info. * BuiltInDatatype.cs, ValidationHandler.cs, XmlSchema.cs, XmlSchemaAll.cs, XmlSchemaAnnotation.cs. XmlSchemaAny.cs, XmlSchemaAnyAttribute.cs, XmlSchemaAttribute.cs, XmlSchemaAttributeGroup.cs, XmlSchemaAttributeGroupRef.cs, XmlSchemaChoice.cs, XmlSchemaCollection.cs, XmlSchemaComplexContent.cs, XmlSchemaComplexContentExtension.cs, XmlSchemaComplexContentRestriction.cs, XmlSchemaComplexType.cs, XmlSchemaContent.cs, XmlSchemaDatatype.cs, XmlSchemaElement.cs, XmlSchemaException.cs, XmlSchemaGroup.cs, XmlSchemaGroupBase.cs, XmlSchemaGroupRef.cs, XmlSchemaIdentityConstraint.cs, XmlSchemaKey.cs, XmlSchemaKeyref.cs, XmlSchemaNotation.cs, XmlSchemaObject.cs, XmlSchemaObjectTable.cs, XmlSchemaParticle.cs, XmlSchemaReader.cs, XmlSchemaSequence.cs, XmlSchemaSimpleContent.cs, XmlSchemaSimpleContentExtension.cs, XmlSchemaSimpleContentRestriction.cs, XmlSchemaSimpleType.cs, XmlSchemaSimpleTypeContent.cs, XmlSchemaSimpleTypeList.cs, XmlSchemaSimpleTypeRestriction.cs, XmlSchemaSimpleTypeUnion.cs, XmlSchemaType.cs, XmlSchemaUnique.cs, XmlSchemaUtil.cs, XmlSchemaXPath.cs : - Almost all classes are changed to implement schema component constraints, and schema validation using XsdValidatingReader. - better exception messages. - More datatype support. and so on. svn path=/trunk/mcs/; revision=18444
135 lines
3.2 KiB
C#
Executable File
135 lines
3.2 KiB
C#
Executable File
//
|
|
// System.Xml.Schema.XmlSchemaObject.cs
|
|
//
|
|
// Authors:
|
|
// Dwivedi, Ajay kumar [email protected]
|
|
// Enomoto, Atsushi [email protected]
|
|
//
|
|
using System;
|
|
using System.Collections;
|
|
using System.Xml.Serialization;
|
|
using System.Xml;
|
|
|
|
namespace System.Xml.Schema
|
|
{
|
|
/// <summary>
|
|
/// Summary description for XmlSchemaObject.
|
|
/// </summary>
|
|
public abstract class XmlSchemaObject
|
|
{
|
|
private int lineNumber;
|
|
private int linePosition;
|
|
private string sourceUri;
|
|
private XmlSerializerNamespaces namespaces;
|
|
internal ArrayList unhandledAttributeList ;
|
|
internal bool isCompiled = false;
|
|
internal int errorCount = 0;
|
|
internal Guid CompilationId;
|
|
internal Guid ValidationId;
|
|
internal bool isRedefineChild;
|
|
internal bool isRedefinedComponent;
|
|
internal XmlSchemaObject redefinedObject;
|
|
|
|
internal bool AttributeGroupRecursionCheck;
|
|
|
|
protected XmlSchemaObject()
|
|
{
|
|
namespaces = new XmlSerializerNamespaces();
|
|
unhandledAttributeList = null;
|
|
CompilationId = Guid.Empty;
|
|
}
|
|
|
|
[XmlIgnore]
|
|
public int LineNumber
|
|
{
|
|
get{ return lineNumber; }
|
|
set{ lineNumber = value; }
|
|
}
|
|
[XmlIgnore]
|
|
public int LinePosition
|
|
{
|
|
get{ return linePosition; }
|
|
set{ linePosition = value; }
|
|
}
|
|
[XmlIgnore]
|
|
public string SourceUri
|
|
{
|
|
get{ return sourceUri; }
|
|
set{ sourceUri = value; }
|
|
}
|
|
|
|
// Undocumented Property
|
|
[XmlNamespaceDeclarations]
|
|
public XmlSerializerNamespaces Namespaces
|
|
{
|
|
get{ return namespaces; }
|
|
set{ namespaces = value; }
|
|
}
|
|
|
|
internal void error(ValidationEventHandler handle,string message)
|
|
{
|
|
errorCount++;
|
|
error (handle, message, null, this, null);
|
|
}
|
|
internal void warn(ValidationEventHandler handle,string message)
|
|
{
|
|
warn (handle, message, null, this, null);
|
|
}
|
|
internal static void error(ValidationEventHandler handle, string message, Exception innerException)
|
|
{
|
|
error (handle, message, innerException, null, null);
|
|
}
|
|
internal static void warn(ValidationEventHandler handle, string message, Exception innerException)
|
|
{
|
|
warn (handle, message, innerException, null, null);
|
|
}
|
|
internal static void error(ValidationEventHandler handle,
|
|
string message,
|
|
Exception innerException,
|
|
XmlSchemaObject xsobj,
|
|
object sender)
|
|
{
|
|
ValidationHandler.RaiseValidationEvent (handle,
|
|
innerException,
|
|
message,
|
|
xsobj,
|
|
sender,
|
|
null,
|
|
XmlSeverityType.Warning);
|
|
}
|
|
internal static void warn(ValidationEventHandler handle,
|
|
string message,
|
|
Exception innerException,
|
|
XmlSchemaObject xsobj,
|
|
object sender)
|
|
{
|
|
ValidationHandler.RaiseValidationEvent (handle,
|
|
innerException,
|
|
message,
|
|
xsobj,
|
|
sender,
|
|
null,
|
|
XmlSeverityType.Warning);
|
|
}
|
|
|
|
internal virtual int Compile (ValidationEventHandler h, XmlSchema schema)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
internal bool IsComplied (Guid compilationId)
|
|
{
|
|
return this.CompilationId == compilationId;
|
|
}
|
|
|
|
internal virtual int Validate (ValidationEventHandler h, XmlSchema schema)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
internal bool IsValidated (Guid validationId)
|
|
{
|
|
return this.ValidationId == validationId;
|
|
}
|
|
}
|
|
} |