| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- // Author: Dwivedi, Ajay kumar
- // [email protected]
- using System;
- using System.Xml;
- using System.Xml.Serialization;
- namespace System.Xml.Schema
- {
- /// <summary>
- /// Summary description for XmlSchemaKeyref.
- /// </summary>
- public class XmlSchemaKeyref : XmlSchemaIdentityConstraint
- {
- private XmlQualifiedName refer;
- private int errorCount;
- public XmlSchemaKeyref()
- {
- refer = XmlQualifiedName.Empty;
- }
- [System.Xml.Serialization.XmlAttribute("refer")]
- public XmlQualifiedName Refer
- {
- get{ return refer; }
- set{ refer = value; }
- }
- /// <remarks>
- /// 1. name must be present
- /// 2. selector and field must be present
- /// 3. refer must be present
- /// </remarks>
- [MonoTODO]
- internal new int Compile(ValidationEventHandler h, XmlSchemaInfo info)
- {
- errorCount = base.Compile(h,info);
- if(refer == null || refer.IsEmpty)
- error(h,"refer must be present");
- return errorCount;
- }
-
- [MonoTODO]
- internal int Validate(ValidationEventHandler h)
- {
- return errorCount;
- }
- internal new void error(ValidationEventHandler handle, string message)
- {
- errorCount++;
- ValidationHandler.RaiseValidationError(handle, this, message);
- }
- }
- }
|