| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- // Author: Dwivedi, Ajay kumar
- // [email protected]
- using System;
- using System.Xml;
- using System.Xml.Serialization;
- namespace System.Xml.Schema
- {
- /// <summary>
- /// Summary description for XmlSchemaGroupRef.
- /// </summary>
- public class XmlSchemaGroupRef : XmlSchemaParticle
- {
- private XmlSchemaGroupBase particle;
- private XmlQualifiedName refName;
- private int errorCount=0;
- public XmlSchemaGroupRef()
- {
- refName = XmlQualifiedName.Empty;
- }
- [XmlIgnore]
- public XmlSchemaGroupBase Particle
- {
- get{ return particle; }
- }
- [System.Xml.Serialization.XmlAttribute("ref")]
- public XmlQualifiedName RefName
- {
- get{ return refName; }
- set{ refName = value; }
- }
- /// <remarks>
- /// 1. RefName must be present
- /// </remarks>
- [MonoTODO]
- internal int Compile(ValidationEventHandler h, XmlSchemaInfo info)
- {
- if(refName == null || refName.IsEmpty)
- {
- error(h,"ref must be present");
- }
- if(this.Id != null && !XmlSchemaUtil.CheckID(Id))
- error(h, "id must be a valid ID");
-
- return errorCount;
- }
-
- [MonoTODO]
- internal int Validate(ValidationEventHandler h)
- {
- return errorCount;
- }
- internal void error(ValidationEventHandler handle,string message)
- {
- errorCount++;
- ValidationHandler.RaiseValidationError(handle,this,message);
- }
- }
- }
|