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

◆ HandleGeneralEntityReference()

EntityType System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference ( string name,
bool isInAttributeValue,
bool pushFakeEntityIfNullResolver,
int entityStartLinePos )
inlineprivate

Definition at line 5640 of file XmlTextReaderImpl.cs.

5641 {
5642 IDtdEntityInfo dtdEntityInfo = null;
5643 if (_dtdInfo == null && _fragmentParserContext != null && _fragmentParserContext.HasDtdInfo && _dtdProcessing == DtdProcessing.Parse)
5644 {
5646 }
5647 if (_dtdInfo == null || (dtdEntityInfo = _dtdInfo.LookupEntity(name)) == null)
5648 {
5650 {
5651 SchemaEntity schemaEntity = new SchemaEntity(new XmlQualifiedName(name), isParameter: false);
5652 schemaEntity.Text = string.Empty;
5654 }
5655 else
5656 {
5658 }
5659 }
5660 if (dtdEntityInfo.IsUnparsedEntity)
5661 {
5663 {
5664 SchemaEntity schemaEntity2 = new SchemaEntity(new XmlQualifiedName(name), isParameter: false);
5665 schemaEntity2.Text = string.Empty;
5667 }
5668 else
5669 {
5671 }
5672 }
5673 if (_standalone && dtdEntityInfo.IsDeclaredInExternal)
5674 {
5676 }
5677 if (dtdEntityInfo.IsExternal)
5678 {
5680 {
5682 return EntityType.Skipped;
5683 }
5684 if (_parsingMode == ParsingMode.SkipContent)
5685 {
5686 return EntityType.Skipped;
5687 }
5688 if (IsResolverNull)
5689 {
5691 {
5694 return EntityType.FakeExpanded;
5695 }
5696 return EntityType.Skipped;
5697 }
5701 {
5702 return EntityType.Expanded;
5703 }
5704 return EntityType.ExpandedInAttribute;
5705 }
5706 if (_parsingMode == ParsingMode.SkipContent)
5707 {
5708 return EntityType.Skipped;
5709 }
5713 {
5714 return EntityType.Expanded;
5715 }
5716 return EntityType.ExpandedInAttribute;
5717 }
static string Xml_ExternalEntityInAttValue
Definition SR.cs:126
static string Xml_UndeclaredEntity
Definition SR.cs:120
static string Xml_UnparsedEntityRef
Definition SR.cs:128
static string Xml_ExternalEntityInStandAloneDocument
Definition SR.cs:152
Definition SR.cs:7
void PushInternalEntity(IDtdEntityInfo entity)
XmlParserContext _fragmentParserContext
void Throw(int pos, string res, string arg)
bool PushExternalEntity(IDtdEntityInfo entity)
IDtdEntityInfo LookupEntity(string name)

References System.Xml.XmlTextReaderImpl._disableUndeclaredEntityCheck, System.Xml.XmlTextReaderImpl._dtdInfo, System.Xml.XmlTextReaderImpl._dtdProcessing, System.Xml.XmlTextReaderImpl._fragmentParserContext, System.Xml.XmlTextReaderImpl._parsingMode, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl._standalone, System.Xml.XmlTextReaderImpl._validatingReaderCompatFlag, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.ParsingState.entityId, System.Xml.XmlParserContext.HasDtdInfo, System.Xml.XmlTextReaderImpl.ParsingState.LineNo, System.Xml.IDtdInfo.LookupEntity(), System.Xml.XmlTextReaderImpl.ParseDtdFromParserContext(), System.Xml.XmlTextReaderImpl.PushExternalEntity(), System.Xml.XmlTextReaderImpl.PushInternalEntity(), System.Xml.XmlTextReaderImpl.Throw(), System.SR.Xml_ExternalEntityInAttValue, System.SR.Xml_ExternalEntityInStandAloneDocument, System.SR.Xml_UndeclaredEntity, and System.SR.Xml_UnparsedEntityRef.

Referenced by System.Xml.XmlTextReaderImpl.HandleEntityReference(), and System.Xml.XmlTextReaderImpl.ResolveEntity().