private string ReadSystemLiteral (bool expectSYSTEM)
{
if(expectSYSTEM) {
Expect ("SYSTEM");
if (!SkipWhitespace ())
throw NotWFError ("Whitespace is required after 'SYSTEM'.");
}
else
SkipWhitespace ();
int quoteChar = ReadChar (); // apos or quot
int c = 0;
ClearValueBuffer ();
while (c != quoteChar) {
c = ReadChar ();
if (c < 0)
throw NotWFError ("Unexpected end of stream in ExternalID.");
if (c != quoteChar)
AppendValueChar (c);
}
return CreateValueString (); //currentTag.ToString (startPos, currentTag.Length - 1 - startPos);
}