System\Xml\Schema\DtdParser.cs (234)
433if ( GetToken( false ) != Token.QName ) {
439Token token = GetToken( false );
440if ( token == Token.SYSTEM || token == Token.PUBLIC ) {
442ParseExternalId( token, Token.DOCTYPE, out publicId, out systemId );
448case Token.LeftBracket:
455case Token.GreaterThan:
513Token token = GetToken( false );
516case Token.AttlistDecl:
520case Token.ElementDecl:
524case Token.EntityDecl:
528case Token.NotationDecl:
532case Token.Comment:
536case Token.PI:
540case Token.CondSectionStart:
547case Token.CondSectionEnd:
560case Token.RightBracket:
573if ( GetToken( false ) != Token.GreaterThan ) {
586case Token.Eof:
619if (GetToken(true) != Token.QName) {
636case Token.QName:
643case Token.GreaterThan:
714Token token = GetToken( true );
716if ( token != Token.CDATA ) {
727case Token.NOTATION:
729case Token.ID:
760if ( GetToken( true ) != Token.LeftParen ) {
765if ( GetToken( false ) != Token.Name ) {
781case Token.Or:
782if ( GetToken( false ) != Token.Name ) {
786case Token.RightParen:
793else if ( token == Token.LeftParen ) {
800if ( GetToken( false ) != Token.Nmtoken )
808case Token.Or:
809if ( GetToken( false ) != Token.Nmtoken )
819case Token.RightParen:
836case Token.REQUIRED:
839case Token.IMPLIED:
842case Token.FIXED:
844if ( GetToken( true ) != Token.Literal ) {
848case Token.Literal:
881if ( GetToken( true ) != Token.QName ) {
930case Token.EMPTY:
933case Token.ANY:
936case Token.LeftParen:
939case Token.PCDATA:
950case Token.None:
970if ( GetToken( false ) != Token.GreaterThan ) {
1104parsingSchema = Token.None;
1109public Token parsingSchema;
1121case Token.QName:
1125case Token.LeftParen:
1140case Token.GreaterThan:
1149case Token.Comma:
1150if ( currentFrame.parsingSchema == Token.Or ) {
1154currentFrame.parsingSchema = Token.Comma;
1156case Token.Or:
1157if (currentFrame.parsingSchema == Token.Comma) {
1161currentFrame.parsingSchema = Token.Or;
1163case Token.RightParen:
1170case Token.GreaterThan:
1196case Token.Star:
1199case Token.QMark:
1202case Token.Plus:
1217case Token.RightParen:
1222if ( GetToken( false ) == Token.Star && hasNames ) {
1229case Token.Or:
1243if ( GetToken( false ) != Token.QName ) {
1274case Token.Percent:
1276if ( GetToken( true ) != Token.Name ) {
1279goto case Token.Name;
1280case Token.Name:
1305Token token = GetToken( true );
1307case Token.PUBLIC:
1308case Token.SYSTEM:
1312ParseExternalId( token, Token.EntityDecl, out publicId, out systemId );
1318if ( GetToken( false ) == Token.NData ) {
1326if ( GetToken( true ) != Token.Name ) {
1339case Token.Literal:
1348if ( GetToken( false ) == Token.GreaterThan ) {
1359if ( GetToken( true ) != Token.Name ) {
1383Token token = GetToken( true );
1384if ( token == Token.SYSTEM || token == Token.PUBLIC ) {
1387ParseExternalId( token, Token.NOTATION, out notationPublicId, out notationSystemId );
1400if ( GetToken( false ) != Token.GreaterThan )
1463case Token.INCLUDE:
1464if ( GetToken( false ) != Token.LeftBracket ) {
1485case Token.IGNORE:
1486if ( GetToken( false ) != Token.LeftBracket ) {
1495if ( GetToken( false ) != Token.CondSectionEnd ) {
1510private void ParseExternalId( Token idTokenType, Token declType, out string publicId, out string systemId ) {
1516if ( GetToken( true ) != Token.Literal ) {
1520if ( idTokenType == Token.SYSTEM ) {
1527if ( declType == Token.DOCTYPE && !freeFloatingDtd ) {
1533Debug.Assert( idTokenType == Token.PUBLIC );
1542if ( declType == Token.DOCTYPE && !freeFloatingDtd ) {
1546if ( GetToken( false ) == Token.Literal ) {
1559if ( GetToken( false ) == Token.Literal ) {
1565else if ( declType != Token.NOTATION ) {
1575private Token GetToken( bool needWhiteSpace ) {
1673return Token.None;
1682return Token.Eof;
1691private Token ScanSubsetContent() {
1711return Token.ElementDecl;
1723return Token.EntityDecl;
1730return Token.None;
1745return Token.AttlistDecl;
1760return Token.NotationDecl;
1765return Token.CondSectionStart;
1769return Token.Comment;
1788return Token.PI;
1794return Token.None;
1804return Token.RightBracket;
1811return Token.CondSectionEnd;
1828private Token ScanNameExpected() {
1831return Token.Name;
1834private Token ScanQNameExpected() {
1837return Token.QName;
1840private Token ScanNmtokenExpected() {
1843return Token.Nmtoken;
1846private Token ScanDoctype1() {
1854return Token.PUBLIC;
1861return Token.SYSTEM;
1865return Token.LeftBracket;
1869return Token.GreaterThan;
1872return Token.None;
1876private Token ScanDoctype2() {
1881return Token.LeftBracket;
1885return Token.GreaterThan;
1888return Token.None;
1892private Token ScanClosingTag() {
1898return Token.GreaterThan;
1901private Token ScanElement1() {
1907return Token.LeftParen;
1916return Token.EMPTY;
1926return Token.ANY;
1940private Token ScanElement2() {
1952return Token.PCDATA;
1960return Token.None;
1963private Token ScanElement3() {
1967return Token.LeftParen;
1971return Token.GreaterThan;
1975return Token.QName;
1979private Token ScanElement4() {
1982Token t;
1985t = Token.Star;
1988t = Token.QMark;
1991t = Token.Plus;
1994return Token.None;
2003private Token ScanElement5() {
2008return Token.Comma;
2012return Token.Or;
2016return Token.RightParen;
2020return Token.GreaterThan;
2023return Token.None;
2027private Token ScanElement6() {
2032return Token.RightParen;
2037return Token.Or;
2040return Token.None;
2044private Token ScanElement7() {
2048return Token.Star;
2050return Token.None;
2053private Token ScanAttlist1() {
2058return Token.GreaterThan;
2065return Token.QName;
2069private Token ScanAttlist2() {
2076return Token.LeftParen;
2086return Token.CDATA;
2101return Token.ENTITIES;
2104return Token.ENTITY;
2120return Token.ID;
2129return Token.IDREF;
2133return Token.IDREFS;
2148return Token.NOTATION;
2159return Token.NMTOKENS;
2163return Token.NMTOKEN;
2182private Token ScanAttlist3() {
2187return Token.LeftParen;
2191return Token.None;
2195private Token ScanAttlist4() {
2200return Token.RightParen;
2205return Token.Or;
2208return Token.None;
2212private Token ScanAttlist5() {
2217return Token.RightParen;
2222return Token.Or;
2225return Token.None;
2230private Token ScanAttlist6() {
2237return Token.Literal;
2253return Token.REQUIRED;
2264return Token.IMPLIED;
2272return Token.FIXED;
2289private Token ScanAttlist7() {
2295return Token.Literal;
2298return Token.None;
2302private Token ScanLiteral( LiteralType literalType ) {
2340return Token.Literal;
2495return Token.None;
2529private Token ScanNotation1() {
2537return Token.PUBLIC;
2544return Token.SYSTEM;
2547return Token.None;
2551private Token ScanSystemId() {
2559return Token.Literal;
2562private Token ScanEntity1() {
2567return Token.Percent;
2572return Token.Name;
2576private Token ScanEntity2() {
2584return Token.PUBLIC;
2591return Token.SYSTEM;
2597return Token.Literal;
2600return Token.None;
2604private Token ScanEntity3() {
2616return Token.NData;
2621return Token.None;
2624private Token ScanPublicId1() {
2632return Token.Literal;
2635private Token ScanPublicId2() {
2638return Token.None;
2644return Token.Literal;
2647private Token ScanCondSection1() {
2674return Token.INCLUDE;
2688return Token.IGNORE;
2691return Token.None;
2700private Token ScanCondSection2() {
2706return Token.LeftBracket;
2709private Token ScanCondSection3() {
2778return Token.CondSectionEnd;
2799return Token.None;
3239private bool IsAttributeValueType( Token token ) {
3240return (int)token >= (int)Token.CDATA && (int)token <= (int)Token.NOTATION;