private void ParseCondSection()
{
int csEntityId = _currentEntityId;
switch (GetToken(false))
{
case Token.INCLUDE:
if (GetToken(false) != Token.LeftBracket)
{
goto default;
}
#if !SILVERLIGHT
if (_validate && csEntityId != _currentEntityId)
{
SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
}
if (_validate)
{
if (_condSectionEntityIds == null)
{
_condSectionEntityIds = new int[CondSectionEntityIdsInitialSize];
}
else if (_condSectionEntityIds.Length == _condSectionDepth)
{
int[] tmp = new int[_condSectionEntityIds.Length * 2];
Array.Copy(_condSectionEntityIds, 0, tmp, 0, _condSectionEntityIds.Length);
_condSectionEntityIds = tmp;
}
_condSectionEntityIds[_condSectionDepth] = csEntityId;
}
#endif
_condSectionDepth++;
break;
case Token.IGNORE:
if (GetToken(false) != Token.LeftBracket)
{
goto default;
}
#if !SILVERLIGHT
if (_validate && csEntityId != _currentEntityId)
{
SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
}
#endif
// the content of the ignore section is parsed & skipped by scanning function
if (GetToken(false) != Token.CondSectionEnd)
{
goto default;
}
#if !SILVERLIGHT
if (_validate && csEntityId != _currentEntityId)
{
SendValidationEvent(_curPos, XmlSeverityType.Error, SR.Sch_ParEntityRefNesting, string.Empty);
}
#endif
break;
default:
OnUnexpectedError();
break;
}
}