Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ValidateStartElement()

void System.Xml.Schema.DtdValidator.ValidateStartElement ( )
inlineprivate

Definition at line 161 of file DtdValidator.cs.

162 {
163 if (context.ElementDecl != null)
164 {
166 if (base.Reader.IsEmptyElement && context.ElementDecl.DefaultValueTyped != null)
167 {
169 context.IsNill = true;
170 }
172 {
174 }
175 }
176 if (!base.Reader.MoveToFirstAttribute())
177 {
178 return;
179 }
180 do
181 {
182 try
183 {
185 SchemaAttDef attDef = context.ElementDecl.GetAttDef(new XmlQualifiedName(reader.LocalName, reader.Prefix));
186 if (attDef != null)
187 {
189 {
191 }
193 if (attDef.Datatype != null && !reader.IsDefault)
194 {
195 CheckValue(base.Reader.Value, attDef);
196 }
197 }
198 else
199 {
201 }
202 }
203 catch (XmlSchemaException ex)
204 {
205 ex.SetSource(base.Reader.BaseURI, base.PositionInfo.LineNumber, base.PositionInfo.LinePosition);
207 }
208 }
209 while (base.Reader.MoveToNextAttribute());
210 base.Reader.MoveToElement();
211 }
virtual void Add(object key, object? value)
Definition Hashtable.cs:676
static string Sch_UndeclaredAttribute
Definition SR.cs:414
Definition SR.cs:7
void SendValidationEvent(string code)
XmlValidatingReaderImpl reader
void CheckValue(string value, SchemaAttDef attdef)
SchemaAttDef GetAttDef(XmlQualifiedName qname)

References System.Xml.Schema.DtdValidator._attPresence, System.Collections.Hashtable.Add(), System.Xml.Schema.DtdValidator.CheckValue(), System.Collections.Hashtable.Clear(), System.Xml.Schema.BaseValidator.context, System.Xml.Schema.SchemaDeclBase.DefaultValueTyped, System.Xml.Dictionary, System.Xml.Schema.ValidationState.ElementDecl, System.Xml.Schema.SchemaElementDecl.GetAttDef(), System.Xml.Schema.SchemaElementDecl.HasRequiredAttribute, System.Xml.XmlValidatingReaderImpl.IsDefault, System.Xml.XmlValidatingReaderImpl.LocalName, System.Xml.XmlValidatingReaderImpl.Name, System.Xml.XmlValidatingReaderImpl.Prefix, System.Xml.Schema.BaseValidator.reader, System.SR.Sch_UndeclaredAttribute, System.Xml.Schema.SchemaDeclBase.SchemaType, and System.Xml.Schema.BaseValidator.SendValidationEvent().

Referenced by System.Xml.Schema.DtdValidator.ProcessElement().