47 #define XMLERR_OK "no error occured" 48 #define XMLERR_TAGMISMATCH "tag mismatch" 49 #define XMLERR_UNEXPECTEDEOF "unexpected end of file" 50 #define XMLERR_FINISHEDPARSINGWHILENOTEOF "parsing is finished but end of file is not reached" 51 #define XMLERR_LETTEREXPECTED "letter is expected" 52 #define XMLERR_ERRORPARSINGELEMENT "error while parsing element" 53 #define XMLERR_ERRORPARSINGPROLOG "error while parsing prolog" 54 #define XMLERR_ERRORPARSINGMAINELEMENT "error while parsing main element" 55 #define XMLERR_ERRORPARSINGCONTENT "error while parsing content" 56 #define XMLERR_ERRORPARSINGNAME "error while parsing name" 57 #define XMLERR_ERRORPARSINGNMTOKEN "error while parsing Nmtoken" 58 #define XMLERR_ERRORPARSINGATTRIBUTE "error while parsing attribute" 59 #define XMLERR_ERRORPARSINGMISC "error while parsing misc" 60 #define XMLERR_ERRORPARSINGCHOICE "error while parsing choice or seq" 61 #define XMLERR_ERRORBYCONSUMER "error triggered by consumer" 62 #define XMLERR_UNEXPECTEDCHARACTER "unexpected character" 63 #define XMLERR_EQUALSIGNEXPECTED "expected '=' but not found" 64 #define XMLERR_QUOTATIONEXPECTED "expected \" or ' but not found" 65 #define XMLERR_ERRORPARSINGREFERENCE "error while parsing reference" 66 #define XMLERR_ERRORPARSINGPI "error while parsing processing instruction" 67 #define XMLERR_ERRORPARSINGATTLISTDECL "error while parsing attribute list declaration" 68 #define XMLERR_ERRORPARSINGATTTYPE "error while parsing attribute type declaration" 69 #define XMLERR_ERRORPARSINGATTVALUE "error while parsing attribute value declaration" 70 #define XMLERR_ERRORPARSINGELEMENTDECL "error while parsing element declaration" 71 #define XMLERR_ERRORPARSINGENTITYDECL "error while parsing entity declaration" 72 #define XMLERR_ERRORPARSINGNOTATIONDECL "error while parsing notation declaration" 73 #define XMLERR_ERRORPARSINGEXTERNALID "error while parsing external id" 74 #define XMLERR_ERRORPARSINGCOMMENT "error while parsing comment" 75 #define XMLERR_ERRORPARSINGENTITYVALUE "error while parsing entity value declaration" 76 #define XMLERR_CDSECTHEADEREXPECTED "expected the header for a cdata section" 77 #define XMLERR_MORETHANONEDOCTYPE "more than one document type definition" 78 #define XMLERR_ERRORPARSINGDOCTYPE "error while parsing document type definition" 79 #define XMLERR_INVALIDNAMEFORPI "invalid name for processing instruction" 80 #define XMLERR_VERSIONEXPECTED "version expected while reading the XML declaration" 81 #define XMLERR_EDECLORSDDECLEXPECTED "EDecl or SDDecl expected while reading the XML declaration" 82 #define XMLERR_SDDECLEXPECTED "SDDecl expected while reading the XML declaration" 83 #define XMLERR_WRONGVALUEFORSDECL "wrong value for standalone declaration" 84 #define XMLERR_UNPARSEDENTITYREFERENCE "unparsed entity reference in wrong context" 85 #define XMLERR_INTERNALGENERALENTITYINDTD "internal general entity reference not allowed in DTD" 86 #define XMLERR_EXTERNALGENERALENTITYINDTD "external parsed general entity reference not allowed in DTD" 87 #define XMLERR_EXTERNALGENERALENTITYINAV "external parsed general entity reference not allowed in attribute value" 91 static const signed char cltWS = 0;
94 static const signed char cltGt = 3;
95 static const signed char cltLt = 4;
97 static const signed char cltQm = 6;
98 static const signed char cltEm = 7;
101 static const signed char cltOB = 10;
102 static const signed char cltEq = 11;
103 static const signed char cltDq = 12;
104 static const signed char cltSq = 13;
198 #if defined(Q_FULL_TEMPLATE_INSTANTIATION) 286 return ( reader->columnNr == -1 ? -1 : reader->columnNr + 1 );
294 return ( reader->lineNr == -1 ? -1 : reader->lineNr + 1 );
366 while ( (itc=it) !=
ns.end() ) {
368 if ( itc.data() == uri && !itc.key().
isEmpty() )
392 for( pos=0; pos<qname.
length(); pos++ ) {
393 if ( qname.
at(pos) ==
':' )
397 prefix = qname.
left( pos );
398 localname = qname.
mid( pos+1 );
427 for( pos=0; pos<qname.
length(); pos++ ) {
428 if ( qname.
at(pos) ==
':' )
431 if ( pos < qname.
length() ) {
433 nsuri = uri( qname.
left( pos ) );
434 localname = qname.
mid( pos+1 );
458 while ( (itc=it) !=
ns.end() ) {
482 while ( (itc=it) !=
ns.end() ) {
484 if ( itc.data() == uri && !itc.key().
isEmpty() )
512 if( !nsStack.isEmpty() )
523 ns.
insert(
"xml",
"http://www.w3.org/XML/1998/namespace" );
565 return qnameList.findIndex( qName );
583 if ( uriList[i] == uri && localnameList[i] == localPart )
594 return valueList.count();
604 return localnameList[
index];
614 return qnameList[
index];
624 return uriList[
index];
666 return valueList[
index];
676 int i =
index( qName );
679 return valueList[ i ];
692 int i =
index( uri, localName );
695 return valueList[ i ];
740 const int bufsize = 512;
742 rawData.
resize( nread + bufsize );
747 readInput( rawData );
761 readInput( rawData );
794 for (
int i=0; i<5; i++ ) {
799 if (
input ==
"<?xml" ) {
804 }
while( tmp !=
'>' );
811 if ( pos > (
int)
input.length() )
813 }
while(
input[pos] !=
'"' &&
input[pos] !=
'\'' );
815 while(
input[pos] !=
'"' &&
input[pos] !=
'\'' ) {
818 if ( pos > (
int)
input.length() )
1552 bool QXmlDefaultHandler::startEntity(
const QString& )
1560 bool QXmlDefaultHandler::endEntity(
const QString& )
1634 : publicId(p), systemId(s) {}
1642 : publicId(p), systemId(s), notation(n) {}
1917 d->useNamespaces =
TRUE;
1918 d->useNamespacePrefixes =
FALSE;
1919 d->reportWhitespaceCharData =
TRUE;
1940 if ( name ==
"http://xml.org/sax/features/namespaces" ) {
1941 return d->useNamespaces;
1942 }
else if ( name ==
"http://xml.org/sax/features/namespace-prefixes" ) {
1943 return d->useNamespacePrefixes;
1944 }
else if ( name ==
"http://trolltech.com/xml/features/report-whitespace-only-CharData" ) {
1945 return d->reportWhitespaceCharData;
1974 if ( name ==
"http://xml.org/sax/features/namespaces" ) {
1975 d->useNamespaces =
value;
1976 }
else if ( name ==
"http://xml.org/sax/features/namespace-prefixes" ) {
1977 d->useNamespacePrefixes =
value;
1978 }
else if ( name ==
"http://trolltech.com/xml/features/report-whitespace-only-CharData" ) {
1979 d->reportWhitespaceCharData =
value;
1992 if ( name ==
"http://xml.org/sax/features/namespaces" ||
1993 name ==
"http://xml.org/sax/features/namespace-prefixes" ||
1994 name ==
"http://trolltech.com/xml/features/report-whitespace-only-CharData" ) {
2099 while ( !
atEnd() ) {
2133 bool xmldecl_possible =
TRUE;
2134 bool doctype_read =
FALSE;
2136 const signed char Init = 0;
2137 const signed char EatWS = 1;
2138 const signed char Lt = 2;
2139 const signed char Em = 3;
2140 const signed char DocType = 4;
2141 const signed char Comment = 5;
2142 const signed char PI = 6;
2143 const signed char Done = 7;
2145 const signed char InpWs = 0;
2146 const signed char InpLt = 1;
2147 const signed char InpQm = 2;
2148 const signed char InpEm = 3;
2149 const signed char InpD = 4;
2150 const signed char InpDash = 5;
2151 const signed char InpUnknown = 6;
2154 static signed char table[7][7] = {
2156 { EatWS, Lt, -1, -1, -1, -1, -1 },
2157 { -1, Lt, -1, -1, -1, -1, -1 },
2158 { -1, -1,
PI, Em, Done, -1, Done },
2159 { -1, -1, -1, -1, DocType,
Comment, -1 },
2160 { EatWS, Lt, -1, -1, -1, -1, -1 },
2161 { EatWS, Lt, -1, -1, -1, -1, -1 },
2162 { EatWS, Lt, -1, -1, -1, -1, -1 }
2164 signed char state =
Init;
2166 bool parseOk =
TRUE;
2177 }
else if (
c ==
'<' ) {
2179 }
else if (
c ==
'?' ) {
2181 }
else if (
c ==
'!' ) {
2183 }
else if (
c ==
'D' ) {
2185 }
else if (
c ==
'-' ) {
2191 state = table[state][
input];
2197 xmldecl_possible =
FALSE;
2207 xmldecl_possible =
FALSE;
2218 parseOk =
parsePI( xmldecl_possible );
2228 if ( doctype_read ) {
2232 doctype_read =
FALSE;
2254 if ( xmldecl_possible && !
d->xmlVersion.isEmpty() ) {
2256 value +=
d->xmlVersion;
2258 if ( !
d->encoding.isEmpty() ) {
2259 value +=
" encoding = '";
2260 value +=
d->encoding;
2264 value +=
" standalone = 'yes'";
2266 value +=
" standalone = 'no'";
2280 xmldecl_possible =
FALSE;
2308 const signed char Init = 0;
2309 const signed char ReadName = 1;
2310 const signed char Ws1 = 2;
2311 const signed char STagEnd = 3;
2312 const signed char STagEnd2 = 4;
2313 const signed char ETagBegin = 5;
2314 const signed char ETagBegin2 = 6;
2315 const signed char Ws2 = 7;
2316 const signed char EmptyTag = 8;
2317 const signed char Attribute = 9;
2318 const signed char Ws3 = 10;
2319 const signed char Done = 11;
2321 const signed char InpWs = 0;
2322 const signed char InpNameBe = 1;
2323 const signed char InpGt = 2;
2324 const signed char InpSlash = 3;
2325 const signed char InpUnknown = 4;
2328 static signed char table[11][5] = {
2330 { -1, ReadName, -1, -1, -1 },
2331 { Ws1, Attribute, STagEnd, EmptyTag, -1 },
2332 { -1, Attribute, STagEnd, EmptyTag, -1 },
2333 { STagEnd2, STagEnd2, STagEnd2, STagEnd2, STagEnd2 },
2334 { -1, -1, -1, ETagBegin, -1 },
2335 { -1, ETagBegin2, -1, -1, -1 },
2336 { Ws2, -1, Done, -1, -1 },
2337 { -1, -1, Done, -1, -1 },
2338 { -1, -1, Done, -1, -1 },
2339 { Ws3, Attribute, STagEnd, EmptyTag, -1 },
2340 { -1, Attribute, STagEnd, EmptyTag, -1 }
2342 signed char state =
Init;
2344 bool parseOk =
TRUE;
2357 }
else if (
c ==
'>' ) {
2359 }
else if (
c ==
'/' ) {
2366 state = table[state][
input];
2381 if (
d->useNamespaces ) {
2382 d->namespaceSupport.processName(
tags.
top(),
FALSE, uri, lname );
2432 d->attList.qnameList.clear();
2433 d->attList.uriList.clear();
2434 d->attList.localnameList.clear();
2435 d->attList.valueList.clear();
2437 if (
d->useNamespaces ) {
2438 d->namespaceSupport.pushContext();
2487 if (
d->useNamespaces ) {
2488 d->namespaceSupport.processName(
tags.
top(),
FALSE, uri, lname );
2498 if (
d->useNamespaces ) {
2511 if (
d->useNamespaces ) {
2514 prefixesBefore =
d->namespaceSupport.prefixes();
2516 d->namespaceSupport.popContext();
2519 prefixesAfter =
d->namespaceSupport.prefixes();
2521 if ( prefixesAfter.
contains(*it) == 0 ) {
2549 if (
d->useNamespaces ) {
2550 d->namespaceSupport.processName(
name(),
FALSE, uri, lname );
2564 if (
d->useNamespaces ) {
2567 prefixesBefore =
d->namespaceSupport.prefixes();
2569 d->namespaceSupport.popContext();
2572 prefixesAfter =
d->namespaceSupport.prefixes();
2574 if ( prefixesAfter.
contains(*it) == 0 ) {
2592 if (
d->useNamespaces ) {
2594 d->namespaceSupport.splitName(
name(), prefix, lname );
2595 if ( prefix ==
"xmlns" ) {
2597 d->namespaceSupport.setPrefix( lname,
string() );
2598 if (
d->useNamespacePrefixes ) {
2599 d->attList.qnameList.append(
name() );
2600 d->attList.uriList.append(
"" );
2601 d->attList.localnameList.append(
"" );
2602 d->attList.valueList.append(
string() );
2613 d->namespaceSupport.processName(
name(),
TRUE, uri, lname );
2614 d->attList.qnameList.append(
name() );
2615 d->attList.uriList.append( uri );
2616 d->attList.localnameList.append( lname );
2617 d->attList.valueList.append(
string() );
2621 d->attList.qnameList.append(
name() );
2622 d->attList.uriList.append(
"" );
2623 d->attList.localnameList.append(
"" );
2624 d->attList.valueList.append(
string() );
2637 bool charDataRead =
FALSE;
2639 const signed char Init = 0;
2640 const signed char ChD = 1;
2641 const signed char ChD1 = 2;
2642 const signed char ChD2 = 3;
2643 const signed char Ref = 4;
2644 const signed char Lt = 5;
2645 const signed char PI = 6;
2646 const signed char Elem = 7;
2647 const signed char Em = 8;
2648 const signed char Com = 9;
2649 const signed char CDS = 10;
2650 const signed char CDS1 = 11;
2651 const signed char CDS2 = 12;
2652 const signed char CDS3 = 13;
2653 const signed char Done = 14;
2655 const signed char InpLt = 0;
2656 const signed char InpGt = 1;
2657 const signed char InpSlash = 2;
2658 const signed char InpQMark = 3;
2659 const signed char InpEMark = 4;
2660 const signed char InpAmp = 5;
2661 const signed char InpDash = 6;
2662 const signed char InpOpenB = 7;
2663 const signed char InpCloseB = 8;
2664 const signed char InpUnknown = 9;
2666 static signed char mapCLT2FSMChar[] = {
2685 static signed char const table[14][10] = {
2687 { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD1, ChD },
2688 { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD1, ChD },
2689 { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD2, ChD },
2690 { Lt, -1, ChD, ChD, ChD, Ref, ChD, ChD, ChD2, ChD },
2691 { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD, ChD },
2692 { -1, -1, Done,
PI, Em, -1, -1, -1, -1, Elem },
2693 { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD, ChD },
2694 { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD, ChD },
2695 { -1, -1, -1, -1, -1, -1, Com, CDS, -1, -1 },
2696 { Lt, ChD, ChD, ChD, ChD, Ref, ChD, ChD, ChD, ChD },
2697 { CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS2, CDS1 },
2698 { CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS2, CDS1 },
2699 { CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS3, CDS1 },
2700 { CDS1,
Init, CDS1, CDS1, CDS1, CDS1, CDS1, CDS1, CDS3, CDS1 }
2702 signed char state =
Init;
2704 bool parseOk =
TRUE;
2721 state = table[state][
input];
2731 if ( !charDataRead ) {
2732 charDataRead =
TRUE;
2740 if ( !charDataRead ) {
2741 charDataRead =
TRUE;
2752 if ( !charDataRead) {
2764 if ( charDataRead ) {
2765 if (
d->reportWhitespaceCharData || !
string().simplifyWhiteSpace().isEmpty() ) {
2773 charDataRead =
FALSE;
2881 }
else if (
c ==
']') {
2893 if ( charDataRead ) {
2894 if (
d->reportWhitespaceCharData || !
string().simplifyWhiteSpace().isEmpty() ) {
2924 const signed char Init = 0;
2925 const signed char Lt = 1;
2926 const signed char Comment = 2;
2927 const signed char eatWS = 3;
2928 const signed char PI = 4;
2929 const signed char Comment2 = 5;
2931 const signed char InpWs = 0;
2932 const signed char InpLt = 1;
2933 const signed char InpQm = 2;
2934 const signed char InpEm = 3;
2935 const signed char InpUnknown = 4;
2938 static signed char table[3][5] = {
2940 { eatWS, Lt, -1, -1, -1 },
2942 { -1, -1, -1, -1, Comment2 }
2944 signed char state =
Init;
2946 bool parseOk =
TRUE;
2957 }
else if (
c ==
'<' ) {
2959 }
else if (
c ==
'?' ) {
2961 }
else if (
c ==
'!' ) {
2968 state = table[state][
input];
3044 const signed char Init = 0;
3045 const signed char QmI = 1;
3046 const signed char Name = 2;
3047 const signed char XMLDecl = 3;
3048 const signed char Ws1 = 4;
3049 const signed char PI = 5;
3050 const signed char Ws2 = 6;
3051 const signed char Version = 7;
3052 const signed char Ws3 = 8;
3053 const signed char EorSD = 9;
3054 const signed char Ws4 = 10;
3055 const signed char SD = 11;
3056 const signed char Ws5 = 12;
3057 const signed char ADone = 13;
3058 const signed char Char = 14;
3059 const signed char Qm = 15;
3060 const signed char Done = 16;
3062 const signed char InpWs = 0;
3063 const signed char InpNameBe = 1;
3064 const signed char InpGt = 2;
3065 const signed char InpQm = 3;
3066 const signed char InpUnknown = 4;
3069 static signed char table[16][5] = {
3071 { -1, -1, -1, QmI, -1 },
3072 { -1,
Name, -1, -1, -1 },
3073 { -1, -1, -1, -1, -1 },
3074 { Ws1, -1, -1, -1, -1 },
3076 { Ws2, -1, -1, Qm, -1 },
3077 { Char, Char, Char, Qm, Char },
3078 { Ws3, -1, -1, ADone, -1 },
3079 { -1, EorSD, -1, ADone, -1 },
3080 { Ws4, -1, -1, ADone, -1 },
3081 { -1, SD, -1, ADone, -1 },
3082 { Ws5, -1, -1, ADone, -1 },
3083 { -1, -1, -1, ADone, -1 },
3084 { -1, -1, Done, -1, -1 },
3085 { Char, Char, Char, Qm, Char },
3086 { Char, Char, Done, Qm, Char },
3088 signed char state =
Init;
3090 bool parseOk =
TRUE;
3103 }
else if (
c ==
'>' ) {
3105 }
else if (
c ==
'?' ) {
3112 state = table[state][
input];
3168 if (
name().lower() ==
"xml" ) {
3169 if ( xmldecl &&
name()==
"xml" ) {
3186 if (
name() !=
"version" ) {
3198 if (
name() ==
"standalone" ) {
3199 if (
string()==
"yes" ) {
3201 }
else if (
string()==
"no" ) {
3207 }
else if (
name() ==
"encoding" ) {
3219 if (
name() !=
"standalone" ) {
3223 if (
string()==
"yes" ) {
3225 }
else if (
string()==
"no" ) {
3270 const signed char Init = 0;
3271 const signed char Doctype = 1;
3272 const signed char Ws1 = 2;
3273 const signed char Doctype2 = 3;
3274 const signed char Ws2 = 4;
3275 const signed char Sys = 5;
3276 const signed char Ws3 = 6;
3277 const signed char MP = 7;
3278 const signed char PER = 8;
3279 const signed char Mup = 9;
3280 const signed char Ws4 = 10;
3281 const signed char MPE = 11;
3282 const signed char Done = 12;
3284 const signed char InpWs = 0;
3285 const signed char InpD = 1;
3286 const signed char InpS = 2;
3287 const signed char InpOB = 3;
3288 const signed char InpCB = 4;
3289 const signed char InpPer = 5;
3290 const signed char InpGt = 6;
3291 const signed char InpUnknown = 7;
3294 static signed char table[12][8] = {
3296 { -1, Doctype, -1, -1, -1, -1, -1, -1 },
3297 { Ws1, Doctype2, Doctype2, -1, -1, -1, -1, Doctype2 },
3298 { -1, Doctype2, Doctype2, -1, -1, -1, -1, Doctype2 },
3299 { Ws2, -1, Sys, MP, -1, -1, Done, -1 },
3300 { -1, -1, Sys, MP, -1, -1, Done, -1 },
3301 { Ws3, -1, -1, MP, -1, -1, Done, -1 },
3302 { -1, -1, -1, MP, -1, -1, Done, -1 },
3303 { -1, -1, -1, -1, MPE, PER, -1, Mup },
3304 { Ws4, -1, -1, -1, MPE, PER, -1, Mup },
3305 { Ws4, -1, -1, -1, MPE, PER, -1, Mup },
3306 { -1, -1, -1, -1, MPE, PER, -1, Mup },
3307 { -1, -1, -1, -1, -1, -1, Done, -1 }
3309 signed char state =
Init;
3311 bool parseOk =
TRUE;
3322 }
else if (
c ==
'D' ) {
3324 }
else if (
c ==
'S' ) {
3326 }
else if (
c ==
'P' ) {
3328 }
else if (
c ==
'[' ) {
3330 }
else if (
c ==
']' ) {
3332 }
else if (
c ==
'%' ) {
3334 }
else if (
c ==
'>' ) {
3341 state = table[state][
input];
3395 d->doctype =
name();
3449 const signed char Init = 0;
3450 const signed char Sys = 1;
3451 const signed char SysWS = 2;
3452 const signed char SysSQ = 3;
3453 const signed char SysSQ2 = 4;
3454 const signed char SysDQ = 5;
3455 const signed char SysDQ2 = 6;
3456 const signed char Pub = 7;
3457 const signed char PubWS = 8;
3458 const signed char PubSQ = 9;
3459 const signed char PubSQ2 = 10;
3460 const signed char PubDQ = 11;
3461 const signed char PubDQ2 = 12;
3462 const signed char PubE = 13;
3463 const signed char PubWS2 = 14;
3464 const signed char PDone = 15;
3465 const signed char Done = 16;
3467 const signed char InpSQ = 0;
3468 const signed char InpDQ = 1;
3469 const signed char InpS = 2;
3470 const signed char InpP = 3;
3471 const signed char InpWs = 4;
3472 const signed char InpUnknown = 5;
3475 static signed char table[15][6] = {
3477 { -1, -1, Sys, Pub, -1, -1 },
3478 { -1, -1, -1, -1, SysWS, -1 },
3479 { SysSQ, SysDQ, -1, -1, -1, -1 },
3480 { Done, SysSQ2, SysSQ2, SysSQ2, SysSQ2, SysSQ2 },
3481 { Done, SysSQ2, SysSQ2, SysSQ2, SysSQ2, SysSQ2 },
3482 { SysDQ2, Done, SysDQ2, SysDQ2, SysDQ2, SysDQ2 },
3483 { SysDQ2, Done, SysDQ2, SysDQ2, SysDQ2, SysDQ2 },
3484 { -1, -1, -1, -1, PubWS, -1 },
3485 { PubSQ, PubDQ, -1, -1, -1, -1 },
3486 { PubE, -1, PubSQ2, PubSQ2, PubSQ2, PubSQ2 },
3487 { PubE, -1, PubSQ2, PubSQ2, PubSQ2, PubSQ2 },
3488 { -1, PubE, PubDQ2, PubDQ2, PubDQ2, PubDQ2 },
3489 { -1, PubE, PubDQ2, PubDQ2, PubDQ2, PubDQ2 },
3490 { PDone, PDone, PDone, PDone, PubWS2, PDone },
3491 { SysSQ, SysDQ, PDone, PDone, PDone, PDone }
3493 signed char state =
Init;
3495 bool parseOk =
TRUE;
3506 }
else if (
c ==
'\'' ) {
3508 }
else if (
c ==
'"' ) {
3510 }
else if (
c ==
'S' ) {
3512 }
else if (
c ==
'P' ) {
3519 state = table[state][
input];
3582 if ( allowPublicID ) {
3612 const signed char Init = 0;
3613 const signed char Lt = 1;
3614 const signed char Em = 2;
3615 const signed char CE = 3;
3616 const signed char Qm = 4;
3617 const signed char Dash = 5;
3618 const signed char CA = 6;
3619 const signed char CEL = 7;
3620 const signed char CEN = 8;
3621 const signed char CN = 9;
3622 const signed char Done = 10;
3624 const signed char InpLt = 0;
3625 const signed char InpQm = 1;
3626 const signed char InpEm = 2;
3627 const signed char InpDash = 3;
3628 const signed char InpA = 4;
3629 const signed char InpE = 5;
3630 const signed char InpL = 6;
3631 const signed char InpN = 7;
3632 const signed char InpUnknown = 8;
3635 static signed char table[4][9] = {
3637 { Lt, -1, -1, -1, -1, -1, -1, -1, -1 },
3638 { -1, Qm, Em, -1, -1, -1, -1, -1, -1 },
3639 { -1, -1, -1, Dash, CA, CE, -1, CN, -1 },
3640 { -1, -1, -1, -1, -1, -1, CEL, CEN, -1 }
3642 signed char state =
Init;
3644 bool parseOk =
TRUE;
3655 }
else if (
c ==
'?' ) {
3657 }
else if (
c ==
'!' ) {
3659 }
else if (
c ==
'-' ) {
3661 }
else if (
c ==
'A' ) {
3663 }
else if (
c ==
'E' ) {
3665 }
else if (
c ==
'L' ) {
3667 }
else if (
c ==
'N' ) {
3674 state = table[state][
input];
3778 const signed char Init = 0;
3779 const signed char Next = 1;
3780 const signed char Name = 2;
3781 const signed char Done = 3;
3783 const signed char InpSemi = 0;
3784 const signed char InpPer = 1;
3785 const signed char InpUnknown = 2;
3788 static signed char table[3][3] = {
3794 signed char state =
Init;
3796 bool parseOk =
TRUE;
3807 }
else if (
c ==
'%' ) {
3814 state = table[state][
input];
3835 if (
d->parameterEntities.find(
ref() ) ==
d->parameterEntities.end() ) {
3847 .data().replace(
QRegExp(
"\""),
""" ).replace(
QRegExp(
"'"),
"'" )
3849 }
else if ( context ==
InDTD ) {
3852 d->parameterEntities.find(
ref() ).data() +
3882 const signed char Init = 0;
3883 const signed char Attlist = 1;
3884 const signed char Ws = 2;
3885 const signed char Name = 3;
3886 const signed char Ws1 = 4;
3887 const signed char Attdef = 5;
3888 const signed char Ws2 = 6;
3889 const signed char Atttype = 7;
3890 const signed char Ws3 = 8;
3891 const signed char DDecH = 9;
3892 const signed char DefReq = 10;
3893 const signed char DefImp = 11;
3894 const signed char DefFix = 12;
3895 const signed char Attval = 13;
3896 const signed char Ws4 = 14;
3897 const signed char Done = 15;
3899 const signed char InpWs = 0;
3900 const signed char InpGt = 1;
3901 const signed char InpHash = 2;
3902 const signed char InpA = 3;
3903 const signed char InpI = 4;
3904 const signed char InpF = 5;
3905 const signed char InpR = 6;
3906 const signed char InpUnknown = 7;
3909 static signed char table[15][8] = {
3911 { -1, -1, -1, Attlist, -1, -1, -1, -1 },
3912 { Ws, -1, -1, -1, -1, -1, -1, -1 },
3914 { Ws1, Done, Attdef, Attdef, Attdef, Attdef, Attdef, Attdef },
3915 { -1, Done, Attdef, Attdef, Attdef, Attdef, Attdef, Attdef },
3916 { Ws2, -1, -1, -1, -1, -1, -1, -1 },
3917 { -1, Atttype, Atttype, Atttype, Atttype, Atttype, Atttype, Atttype },
3918 { Ws3, -1, -1, -1, -1, -1, -1, -1 },
3919 { -1, Attval, DDecH, Attval, Attval, Attval, Attval, Attval },
3920 { -1, -1, -1, -1, DefImp, DefFix, DefReq, -1 },
3921 { Ws4, Ws4, -1, -1, -1, -1, -1, -1 },
3922 { Ws4, Ws4, -1, -1, -1, -1, -1, -1 },
3923 { Ws3, -1, -1, -1, -1, -1, -1, -1 },
3924 { Ws4, Ws4, -1, -1, -1, -1, -1, -1 },
3925 { -1, Done, Attdef, Attdef, Attdef, Attdef, Attdef, Attdef }
3927 signed char state =
Init;
3929 bool parseOk =
TRUE;
3940 }
else if (
c ==
'>' ) {
3942 }
else if (
c ==
'#' ) {
3944 }
else if (
c ==
'A' ) {
3946 }
else if (
c ==
'I' ) {
3948 }
else if (
c ==
'F' ) {
3950 }
else if (
c ==
'R' ) {
3957 state = table[state][
input];
4021 d->attDeclEName =
name();
4028 d->attDeclAName =
name();
4082 const signed char Init = 0;
4083 const signed char ST = 1;
4084 const signed char TTI = 2;
4085 const signed char TTI2 = 3;
4086 const signed char TTI3 = 4;
4087 const signed char TTE = 5;
4088 const signed char TTEY = 6;
4089 const signed char TTEI = 7;
4090 const signed char N = 8;
4091 const signed char TTNM = 9;
4092 const signed char TTNM2 = 10;
4093 const signed char NO = 11;
4094 const signed char NO2 = 12;
4095 const signed char NO3 = 13;
4096 const signed char NOName = 14;
4097 const signed char NO4 = 15;
4098 const signed char EN = 16;
4099 const signed char ENNmt = 17;
4100 const signed char EN2 = 18;
4101 const signed char ADone = 19;
4102 const signed char Done = 20;
4104 const signed char InpWs = 0;
4105 const signed char InpOp = 1;
4106 const signed char InpCp = 2;
4107 const signed char InpPipe = 3;
4108 const signed char InpC = 4;
4109 const signed char InpE = 5;
4110 const signed char InpI = 6;
4111 const signed char InpM = 7;
4112 const signed char InpN = 8;
4113 const signed char InpO = 9;
4114 const signed char InpR = 10;
4115 const signed char InpS = 11;
4116 const signed char InpY = 12;
4117 const signed char InpUnknown = 13;
4120 static signed char table[19][14] = {
4122 { -1, EN, -1, -1, ST, TTE, TTI, -1,
N, -1, -1, -1, -1, -1 },
4123 { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done },
4124 { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, TTI2, Done, Done, Done },
4125 { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, TTI3, Done, Done },
4126 { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done },
4127 { -1, -1, -1, -1, -1, -1, TTEI, -1, -1, -1, -1, -1, TTEY, -1 },
4128 { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done },
4129 { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done },
4130 { -1, -1, -1, -1, -1, -1, -1, TTNM, -1,
NO, -1, -1, -1, -1 },
4131 { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, TTNM2, Done, Done },
4132 { Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done, Done },
4133 { NO2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4134 { -1, NO3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4135 { NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName, NOName },
4136 { NO4, -1, ADone, NO3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4137 { -1, -1, ADone, NO3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4138 { -1, -1, ENNmt, -1, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt, ENNmt },
4139 { EN2, -1, ADone, EN, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4140 { -1, -1, ADone, EN, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
4142 signed char state =
Init;
4144 bool parseOk =
TRUE;
4155 }
else if (
c ==
'(' ) {
4157 }
else if (
c ==
')' ) {
4159 }
else if (
c ==
'|' ) {
4161 }
else if (
c ==
'C' ) {
4163 }
else if (
c ==
'E' ) {
4165 }
else if (
c ==
'I' ) {
4167 }
else if (
c ==
'M' ) {
4169 }
else if (
c ==
'N' ) {
4171 }
else if (
c ==
'O' ) {
4173 }
else if (
c ==
'R' ) {
4175 }
else if (
c ==
'S' ) {
4177 }
else if (
c ==
'Y' ) {
4184 state = table[state][
input];
4334 const signed char Init = 0;
4335 const signed char Dq = 1;
4336 const signed char DqRef = 2;
4337 const signed char DqC = 3;
4338 const signed char Sq = 4;
4339 const signed char SqRef = 5;
4340 const signed char SqC = 6;
4341 const signed char Done = 7;
4343 const signed char InpDq = 0;
4344 const signed char InpSq = 1;
4345 const signed char InpAmp = 2;
4346 const signed char InpLt = 3;
4347 const signed char InpUnknown = 4;
4350 static signed char table[7][5] = {
4352 { Dq, Sq, -1, -1, -1 },
4353 { Done, DqC, DqRef, -1, DqC },
4354 { Done, DqC, DqRef, -1, DqC },
4355 { Done, DqC, DqRef, -1, DqC },
4356 { SqC, Done, SqRef, -1, SqC },
4357 { SqC, Done, SqRef, -1, SqC },
4358 { SqC, Done, SqRef, -1, SqC }
4360 signed char state =
Init;
4362 bool parseOk =
TRUE;
4373 }
else if (
c ==
'\'' ) {
4375 }
else if (
c ==
'&' ) {
4377 }
else if (
c ==
'<' ) {
4384 state = table[state][
input];
4440 const signed char Init = 0;
4441 const signed char Elem = 1;
4442 const signed char Ws1 = 2;
4443 const signed char Nam = 3;
4444 const signed char Ws2 = 4;
4445 const signed char Empty = 5;
4446 const signed char Any = 6;
4447 const signed char Cont = 7;
4448 const signed char Mix = 8;
4449 const signed char Mix2 = 9;
4450 const signed char Mix3 = 10;
4451 const signed char MixN1 = 11;
4452 const signed char MixN2 = 12;
4453 const signed char MixN3 = 13;
4454 const signed char MixN4 = 14;
4455 const signed char Cp = 15;
4456 const signed char Cp2 = 16;
4457 const signed char WsD = 17;
4458 const signed char Done = 18;
4460 const signed char InpWs = 0;
4461 const signed char InpGt = 1;
4462 const signed char InpPipe = 2;
4463 const signed char InpOp = 3;
4464 const signed char InpCp = 4;
4465 const signed char InpHash = 5;
4466 const signed char InpQm = 6;
4467 const signed char InpAst = 7;
4468 const signed char InpPlus = 8;
4469 const signed char InpA = 9;
4470 const signed char InpE = 10;
4471 const signed char InpL = 11;
4472 const signed char InpUnknown = 12;
4475 static signed char table[18][13] = {
4477 { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, Elem, -1 },
4478 { Ws1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4479 { -1, -1, -1, -1, -1, -1, -1, -1, -1, Nam, Nam, Nam, Nam },
4480 { Ws2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4481 { -1, -1, -1, Cont, -1, -1, -1, -1, -1, Any, Empty, -1, -1 },
4482 { WsD, Done, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4483 { WsD, Done, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4484 { -1, -1, -1, Cp, Cp, Mix, -1, -1, -1, Cp, Cp, Cp, Cp },
4485 { Mix2, -1, MixN1, -1, Mix3, -1, -1, -1, -1, -1, -1, -1, -1 },
4486 { -1, -1, MixN1, -1, Mix3, -1, -1, -1, -1, -1, -1, -1, -1 },
4487 { WsD, Done, -1, -1, -1, -1, -1, WsD, -1, -1, -1, -1, -1 },
4488 { -1, -1, -1, -1, -1, -1, -1, -1, -1, MixN2, MixN2, MixN2, MixN2 },
4489 { MixN3, -1, MixN1, -1, MixN4, -1, -1, -1, -1, -1, -1, -1, -1 },
4490 { -1, -1, MixN1, -1, MixN4, -1, -1, -1, -1, -1, -1, -1, -1 },
4491 { -1, -1, -1, -1, -1, -1, -1, WsD, -1, -1, -1, -1, -1 },
4492 { WsD, Done, -1, -1, -1, -1, Cp2, Cp2, Cp2, -1, -1, -1, -1 },
4493 { WsD, Done, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 },
4494 { -1, Done, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }
4496 signed char state =
Init;
4498 bool parseOk =
TRUE;
4509 }
else if (
c ==
'>' ) {
4511 }
else if (
c ==
'|' ) {
4513 }
else if (
c ==
'(' ) {
4515 }
else if (
c ==
')' ) {
4517 }
else if (
c ==
'#' ) {
4519 }
else if (
c ==
'?' ) {
4521 }
else if (
c ==
'*' ) {
4523 }
else if (
c ==
'+' ) {
4525 }
else if (
c ==
'A' ) {
4527 }
else if (
c ==
'E' ) {
4529 }
else if (
c ==
'L' ) {
4536 state = table[state][
input];
4663 const signed char Init = 0;
4664 const signed char Not = 1;
4665 const signed char Ws1 = 2;
4666 const signed char Nam = 3;
4667 const signed char Ws2 = 4;
4668 const signed char ExtID = 5;
4669 const signed char Ws3 = 6;
4670 const signed char Done = 7;
4672 const signed char InpWs = 0;
4673 const signed char InpGt = 1;
4674 const signed char InpN = 2;
4675 const signed char InpUnknown = 3;
4678 static signed char table[7][4] = {
4680 { -1, -1, Not, -1 },
4681 { Ws1, -1, -1, -1 },
4682 { -1, -1, Nam, Nam },
4683 { Ws2, Done, -1, -1 },
4684 { -1, Done, ExtID, ExtID },
4685 { Ws3, Done, -1, -1 },
4686 { -1, Done, -1, -1 }
4688 signed char state =
Init;
4690 bool parseOk =
TRUE;
4701 }
else if (
c ==
'>' ) {
4703 }
else if (
c ==
'N' ) {
4710 state = table[state][
input];
4788 const signed char Init = 0;
4789 const signed char Ws1 = 1;
4790 const signed char CS_ = 2;
4791 const signed char Ws2 = 3;
4792 const signed char More = 4;
4793 const signed char Name = 5;
4794 const signed char Done = 6;
4796 const signed char InpWs = 0;
4797 const signed char InpOp = 1;
4798 const signed char InpCp = 2;
4799 const signed char InpQm = 3;
4800 const signed char InpAst = 4;
4801 const signed char InpPlus = 5;
4802 const signed char InpPipe = 6;
4803 const signed char InpComm = 7;
4804 const signed char InpUnknown = 8;
4807 static signed char table[6][9] = {
4809 { -1, Ws1, -1, -1, -1, -1, -1, -1, Name },
4810 { -1, CS_, -1, -1, -1, -1, -1, -1, CS_ },
4811 { Ws2, -1, Done, Ws2, Ws2, Ws2, More, More, -1 },
4812 { -1, -1, Done, -1, -1, -1, More, More, -1 },
4813 { -1, Ws1, -1, -1, -1, -1, -1, -1, Name },
4814 { Ws2, -1, Done, Ws2, Ws2, Ws2, More, More, -1 }
4816 signed char state =
Init;
4818 bool parseOk =
TRUE;
4829 }
else if (
c ==
'(' ) {
4831 }
else if (
c ==
')' ) {
4833 }
else if (
c ==
'?' ) {
4835 }
else if (
c ==
'*' ) {
4837 }
else if (
c ==
'+' ) {
4839 }
else if (
c ==
'|' ) {
4841 }
else if (
c ==
',' ) {
4848 state = table[state][
input];
4910 const signed char Init = 0;
4911 const signed char Ent = 1;
4912 const signed char Ws1 = 2;
4913 const signed char Name = 3;
4914 const signed char Ws2 = 4;
4915 const signed char EValue = 5;
4916 const signed char ExtID = 6;
4917 const signed char Ws3 = 7;
4918 const signed char Ndata = 8;
4919 const signed char Ws4 = 9;
4920 const signed char NNam = 10;
4921 const signed char PEDec = 11;
4922 const signed char Ws6 = 12;
4923 const signed char PENam = 13;
4924 const signed char Ws7 = 14;
4925 const signed char PEVal = 15;
4926 const signed char PEEID = 16;
4927 const signed char WsE = 17;
4928 const signed char EDDone = 19;
4929 const signed char Done = 18;
4931 const signed char InpWs = 0;
4932 const signed char InpPer = 1;
4933 const signed char InpQuot = 2;
4934 const signed char InpGt = 3;
4935 const signed char InpN = 4;
4936 const signed char InpUnknown = 5;
4939 static signed char table[18][6] = {
4941 { -1, -1, -1, -1, Ent, -1 },
4942 { Ws1, -1, -1, -1, -1, -1 },
4943 { -1, PEDec, -1, -1,
Name, Name },
4944 { Ws2, -1, -1, -1, -1, -1 },
4945 { -1, -1, EValue, -1, -1, ExtID },
4946 { WsE, -1, -1, Done, -1, -1 },
4947 { Ws3, -1, -1, EDDone,-1, -1 },
4948 { -1, -1, -1, EDDone,Ndata, -1 },
4949 { Ws4, -1, -1, -1, -1, -1 },
4950 { -1, -1, -1, -1, NNam, NNam },
4951 { WsE, -1, -1, Done, -1, -1 },
4952 { Ws6, -1, -1, -1, -1, -1 },
4953 { -1, -1, -1, -1, PENam, PENam },
4954 { Ws7, -1, -1, -1, -1, -1 },
4955 { -1, -1, PEVal, -1, -1, PEEID },
4956 { WsE, -1, -1, Done, -1, -1 },
4957 { WsE, -1, -1, Done, -1, -1 },
4958 { -1, -1, -1, Done, -1, -1 }
4960 signed char state =
Init;
4962 bool parseOk =
TRUE;
4973 }
else if (
c ==
'%' ) {
4975 }
else if (
c ==
'"' ||
c ==
'\'' ) {
4977 }
else if (
c ==
'>' ) {
4979 }
else if (
c ==
'N' ) {
4986 state = table[state][
input];
5068 d->entities.insert(
name(),
string() );
5116 d->parameterEntities.insert(
name(),
string() );
5175 const signed char Init = 0;
5176 const signed char Dq = 1;
5177 const signed char DqC = 2;
5178 const signed char DqPER = 3;
5179 const signed char DqRef = 4;
5180 const signed char Sq = 5;
5181 const signed char SqC = 6;
5182 const signed char SqPER = 7;
5183 const signed char SqRef = 8;
5184 const signed char Done = 9;
5186 const signed char InpDq = 0;
5187 const signed char InpSq = 1;
5188 const signed char InpAmp = 2;
5189 const signed char InpPer = 3;
5190 const signed char InpUnknown = 4;
5193 static signed char table[9][5] = {
5195 { Dq, Sq, -1, -1, -1 },
5196 { Done, DqC, DqRef, DqPER, DqC },
5197 { Done, DqC, DqRef, DqPER, DqC },
5198 { Done, DqC, DqRef, DqPER, DqC },
5199 { Done, DqC, DqRef, DqPER, DqC },
5200 { SqC, Done, SqRef, SqPER, SqC },
5201 { SqC, Done, SqRef, SqPER, SqC },
5202 { SqC, Done, SqRef, SqPER, SqC },
5203 { SqC, Done, SqRef, SqPER, SqC }
5205 signed char state =
Init;
5207 bool parseOk =
TRUE;
5218 }
else if (
c ==
'\'' ) {
5220 }
else if (
c ==
'&' ) {
5222 }
else if (
c ==
'%' ) {
5229 state = table[state][
input];
5299 const signed char Init = 0;
5300 const signed char Dash1 = 1;
5301 const signed char Dash2 = 2;
5302 const signed char Com = 3;
5303 const signed char Com2 = 4;
5304 const signed char ComE = 5;
5305 const signed char Done = 6;
5307 const signed char InpDash = 0;
5308 const signed char InpGt = 1;
5309 const signed char InpUnknown = 2;
5312 static signed char table[6][3] = {
5321 signed char state =
Init;
5333 }
else if (
c ==
'>' ) {
5340 state = table[state][
input];
5404 const signed char Init = 0;
5405 const signed char PName = 1;
5406 const signed char Ws = 2;
5407 const signed char Eq = 3;
5408 const signed char Quotes = 4;
5410 const signed char InpNameBe = 0;
5411 const signed char InpEq = 1;
5412 const signed char InpDq = 2;
5413 const signed char InpSq = 3;
5414 const signed char InpUnknown = 4;
5417 static signed char table[4][5] = {
5419 { PName, -1, -1, -1, -1 },
5420 { -1, Eq, -1, -1, Ws },
5421 { -1, Eq, -1, -1, -1 },
5422 { -1, -1, Quotes, Quotes, -1 }
5424 signed char state =
Init;
5426 bool parseOk =
TRUE;
5437 }
else if (
c ==
'=' ) {
5439 }
else if (
c ==
'"' ) {
5441 }
else if (
c ==
'\'' ) {
5448 state = table[state][
input];
5500 const signed char Init = 0;
5501 const signed char Name1 = 1;
5502 const signed char Name = 2;
5503 const signed char Done = 3;
5505 const signed char InpNameBe = 0;
5506 const signed char InpNameCh = 1;
5507 const signed char InpUnknown = 2;
5510 static signed char table[3][3] = {
5516 signed char state =
Init;
5535 state = table[state][
input];
5582 const signed char Init = 0;
5583 const signed char NameF = 1;
5584 const signed char Name = 2;
5585 const signed char Done = 3;
5587 const signed char InpNameCh = 0;
5588 const signed char InpUnknown = 1;
5591 static signed char table[3][2] = {
5597 signed char state =
Init;
5614 state = table[state][
input];
5664 const signed char Init = 0;
5665 const signed char SRef = 1;
5666 const signed char ChRef = 2;
5667 const signed char ChDec = 3;
5668 const signed char ChHexS = 4;
5669 const signed char ChHex = 5;
5670 const signed char Name = 6;
5671 const signed char DoneD = 7;
5672 const signed char DoneH = 8;
5673 const signed char DoneN = 9;
5675 const signed char InpAmp = 0;
5676 const signed char InpSemi = 1;
5677 const signed char InpHash = 2;
5678 const signed char InpX = 3;
5679 const signed char InpNum = 4;
5680 const signed char InpHex = 5;
5681 const signed char InpUnknown = 6;
5684 static signed char table[8][7] = {
5686 { SRef, -1, -1, -1, -1, -1, -1 },
5688 { -1, -1, -1, ChHexS, ChDec, -1, -1 },
5689 { -1, DoneD, -1, -1, ChDec, -1, -1 },
5690 { -1, -1, -1, -1, ChHex, ChHex, -1 },
5691 { -1, DoneH, -1, -1, ChHex, ChHex, -1 },
5692 { -1, DoneN, -1, -1, -1, -1, -1 }
5694 signed char state =
Init;
5706 }
else if (
c.cell() ==
'&' ) {
5708 }
else if (
c.cell() ==
';' ) {
5710 }
else if (
c.cell() ==
'#' ) {
5712 }
else if (
c.cell() ==
'x' ) {
5714 }
else if (
'0' <=
c.cell() &&
c.cell() <=
'9' ) {
5716 }
else if (
'a' <=
c.cell() &&
c.cell() <=
'f' ) {
5718 }
else if (
'A' <=
c.cell() &&
c.cell() <=
'F' ) {
5725 state = table[state][
input];
5759 charDataRead =
TRUE;
5770 charDataRead =
TRUE;
5808 if ( reference ==
"amp" ) {
5816 charDataRead =
TRUE;
5817 }
else if ( reference ==
"lt" ) {
5825 charDataRead =
TRUE;
5826 }
else if ( reference ==
"gt" ) {
5834 charDataRead =
TRUE;
5835 }
else if ( reference ==
"apos" ) {
5843 charDataRead =
TRUE;
5844 }
else if ( reference ==
"quot" ) {
5852 charDataRead =
TRUE;
5855 it =
d->entities.find( reference );
5856 if ( it !=
d->entities.end() ) {
5858 switch ( context ) {
5862 charDataRead =
FALSE;
5868 charDataRead =
FALSE;
5874 for (
int i=0; i<(
int)reference.
length(); i++ ) {
5878 charDataRead =
TRUE;
5884 charDataRead =
FALSE;
5889 itExtern =
d->externEntities.find( reference );
5890 if ( itExtern ==
d->externEntities.end() ) {
5896 for (
int i=0; i<(
int)reference.
length(); i++ ) {
5900 charDataRead =
TRUE;
5909 }
else if ( (*itExtern).notation.isNull() ) {
5911 switch ( context ) {
5920 charDataRead =
FALSE;
5925 charDataRead =
FALSE;
5931 for (
int i=0; i<(
int)reference.
length(); i++ ) {
5935 charDataRead =
TRUE;
5941 charDataRead =
FALSE;
5949 charDataRead =
FALSE;
5966 signed char Done = s.
length();
5968 const signed char InpCharExpected = 0;
5969 const signed char InpUnknown = 1;
5971 signed char state = 0;
5981 if (
c == s[(
int)state] ) {
5982 input = InpCharExpected;
5988 if ( input == InpCharExpected ) {
5999 if ( state == Done ) {
6022 d->externParameterEntities.clear();
6023 d->parameterEntities.clear();
6024 d->externEntities.clear();
6025 d->entities.clear();
6047 if (
d->parameterEntities.find(e) ==
d->parameterEntities.end() &&
6048 d->externParameterEntities.find(e) ==
d->externParameterEntities.end() ) {
static const signed char cltLt
void setDeclHandler(QXmlDeclHandler *handler)
bool parseReference(bool &charDataRead, EntityRecognitionContext context)
virtual bool is_S(const QChar &)
QXmlEntityResolver * entityRes
uint toUInt(bool *ok=0, int base=10) const
void setCodec(QTextCodec *)
The QXmlLocator class provides the XML handler classes with information about the actual parsing posi...
QMap< QString, QString > entities
bool hasFeature(const QString &name) const
QXmlLexicalHandler * lexicalHnd
The QXmlLexicalHandler class provides an interface to report lexical content of XML data...
virtual bool skippedEntity(const QString &name)=0
bool endPrefixMapping(const QString &prefix)
bool unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString ¬ationName)
#define XMLERR_UNEXPECTEDCHARACTER
QValueStack< QString > tags
Iterator append(const T &x)
virtual ~QXmlSimpleReader()
#define XMLERR_ERRORPARSINGENTITYDECL
The QRegExp class provides pattern matching using regular expressions or wildcards.
void msg(const char *fmt,...)
#define XMLERR_ERRORPARSINGATTTYPE
virtual QString errorString()=0
virtual bool startDocument()=0
static const signed char cltEm
#define XMLERR_ERRORPARSINGDOCTYPE
QXmlSimpleReaderPrivate()
ExternEntity(const QString &p, const QString &s, const QString &n)
bool notationDecl(const QString &name, const QString &publicId, const QString &systemId)
void insert(const char *k, const type *d)
QString mid(uint index, uint len=0xffffffff) const
#define XMLERR_ERRORPARSINGNOTATIONDECL
bool parseExternalID(bool allowPublicID=FALSE)
bool parse(const QXmlInputSource &input)
#define XMLERR_ERRORPARSINGCHOICE
void setEncoding(Encoding)
static const signed char cltSlash
virtual bool atEnd() const
static const signed char cltOB
virtual int readBlock(char *data, uint maxlen)=0
void processName(const QString &, bool, QString &, QString &) const
Iterator replace(const Key &k, const T &v)
bool parseElementETagBegin2(QString &uri, QString &lname)
static const signed char cltWS
The QXmlNamespaceSupport class is a helper class for XML readers which want to include namespace supp...
ChannelGroupService::Name Name
#define XMLERR_TAGMISMATCH
#define XMLERR_VERSIONEXPECTED
#define XMLERR_ERRORPARSINGELEMENT
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)=0
#define XMLERR_INTERNALGENERALENTITYINDTD
The QBuffer class is an I/O device that operates on a QByteArray.
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
#define XMLERR_CDSECTHEADEREXPECTED
void setProperty(const QString &name, void *value)
bool skippedEntity(const QString &name)
void qWarning(const char *msg,...)
#define XMLERR_ERRORPARSINGPROLOG
void setErrorHandler(QXmlErrorHandler *handler)
virtual bool startDTD(const QString &name, const QString &publicId, const QString &systemId)=0
The QXmlErrorHandler class provides an interface to report errors in XML data.
#define XMLERR_ERRORPARSINGMISC
bool reportWhitespaceCharData
QXmlDeclHandler * declHandler() const
#define XMLERR_MORETHANONEDOCTYPE
The QXmlDTDHandler class provides an interface to report DTD content of XML data. ...
static const signed char cltQm
#define XMLERR_UNPARSEDENTITYREFERENCE
QXmlLexicalHandler * lexicalHandler() const
#define XMLERR_SDDECLEXPECTED
The QChar class provides a light-weight Unicode character.
QString value(int index) const
QXmlContentHandler * contentHnd
void splitName(const QString &, QString &, QString &) const
#define XMLERR_ERRORPARSINGMAINELEMENT
void setLexicalHandler(QXmlLexicalHandler *handler)
static const signed char cltAmp
static const signed char cltSq
QString uri(const QString &) const
QXmlDeclHandler * declHnd
QXmlEntityResolver * entityResolver() const
bool parsePEReference(EntityRecognitionContext context)
bool characters(const QString &ch)
The QXmlSimpleReader class provides an implementation of a simple XML reader (i.e. parser).
#define XMLERR_ERRORPARSINGEXTERNALID
static const signed char cltUnknown
#define XMLERR_LETTEREXPECTED
virtual bool attributeDecl(const QString &eName, const QString &aName, const QString &type, const QString &valueDefault, const QString &value)=0
QTextStream & reset(QTextStream &s)
#define XMLERR_ERRORPARSINGATTRIBUTE
#define XMLERR_ERRORPARSINGREFERENCE
void setContentHandler(QXmlContentHandler *handler)
virtual bool unparsedEntityDecl(const QString &name, const QString &publicId, const QString &systemId, const QString ¬ationName)=0
bool parseElementAttribute(QString &prefix, QString &uri, QString &lname)
#define XMLERR_ERRORPARSINGCOMMENT
const char * ascii() const
#define XMLERR_ERRORPARSINGCONTENT
QString left(uint len) const
friend class QXmlSimpleReaderPrivate
#define XMLERR_INVALIDNAMEFORPI
QMap< QString, ExternParameterEntity > externParameterEntities
virtual bool comment(const QString &ch)=0
The QXmlContentHandler class provides an interface to report logical content of XML data...
bool useNamespacePrefixes
bool internalEntityDecl(const QString &name, const QString &value)
bool startPrefixMapping(const QString &prefix, const QString &uri)
void setEntityResolver(QXmlEntityResolver *handler)
bool processingInstruction(const QString &target, const QString &data)
QStringList prefixes() const
#define XMLERR_EXTERNALGENERALENTITYINDTD
static const signed char cltPer
bool processReference(bool &charDataRead, EntityRecognitionContext context)
#define XMLERR_ERRORPARSINGNAME
virtual bool notationDecl(const QString &name, const QString &publicId, const QString &systemId)=0
virtual bool processingInstruction(const QString &target, const QString &data)=0
bool startDTD(const QString &name, const QString &publicId, const QString &systemId)
bool externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId)
#define XMLERR_ERRORPARSINGATTLISTDECL
QXmlDTDHandler * DTDHandler() const
bool entityExist(const QString &) const
void setDTDHandler(QXmlDTDHandler *handler)
virtual bool endDocument()=0
bool comment(const QString &ch)
virtual bool startCDATA()=0
QXmlNamespaceSupport namespaceSupport
static const signed char cltDash
QString uri(int index) const
QString localName(int index) const
uint contains(const T &x) const
virtual bool endPrefixMapping(const QString &prefix)=0
ExternParameterEntity(const QString &p, const QString &s)
bool parseName(bool useRef=FALSE)
QMap< QString, QString > parameterEntities
The QFile class is an I/O device that operates on files.
static const signed char cltGt
#define XMLERR_EXTERNALGENERALENTITYINAV
bool isDirectAccess() const
The QTextStream class provides basic functions for reading and writing text using a QIODevice...
static QTextCodec * codecForName(const char *hint, int accuracy=0)
static const signed char cltDq
#define XMLERR_ERRORPARSINGENTITYVALUE
QXmlContentHandler * contentHandler() const
QXmlErrorHandler * errorHandler() const
bool warning(const QXmlParseException &exception)
virtual bool characters(const QString &ch)=0
virtual bool endCDATA()=0
virtual QString errorString()=0
bool parseString(const QString &s)
bool fatalError(const QXmlParseException &exception)
void line(double t, double *p, double &x, double &y, double &z)
bool resolveEntity(const QString &publicId, const QString &systemId, QXmlInputSource *&ret)
static const signed char cltEq
std::vector< std::string > column
bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
QString type(int index) const
The QXmlAttributes class provides XML attributes.
QIODevice * device() const
static msg_handler handler
bool error(const QXmlParseException &exception)
virtual QString errorString()=0
QString prefix(const QString &) const
#define XMLERR_ERRORPARSINGELEMENTDECL
The QXmlEntityResolver class provides an interface to resolve extern entities contained in XML data...
bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
int index(const QString &qName) const
The QXmlDeclHandler class provides an interface to report declaration content of XML data...
void * property(const QString &name, bool *ok=0) const
void init(const QXmlInputSource &i)
static const signed char charLookupTable[256]
void setPrefix(const QString &, const QString &)
static const signed char cltCB
#define XMLERR_UNEXPECTEDEOF
bool hasProperty(const QString &name) const
#define XMLERR_WRONGVALUEFORSDECL
void setFeature(const QString &name, bool value)
bool feature(const QString &name, bool *ok=0) const
virtual bool is_NameChar(const QChar &)
#define XMLERR_ERRORPARSINGNMTOKEN
virtual QString errorString()=0
#define XMLERR_ERRORPARSINGPI
bool parsePI(bool xmldecl=FALSE)
bool ignorableWhitespace(const QString &ch)
virtual bool internalEntityDecl(const QString &name, const QString &value)=0
virtual bool startPrefixMapping(const QString &prefix, const QString &uri)=0
QMap< QString, ExternEntity > externEntities
virtual void setDocumentLocator(QXmlLocator *locator)=0
bool parseElementEmptyTag(bool &t, QString &uri, QString &lname)
void setDocumentLocator(QXmlLocator *locator)
#define XMLERR_ERRORPARSINGATTVALUE
QString qName(int index) const
The QXmlParseException class is used to report errors with the QXmlErrorHandler interface.
virtual bool externalEntityDecl(const QString &name, const QString &publicId, const QString &systemId)=0
virtual bool is_NameBeginning(const QChar &)
#define XMLERR_EDECLORSDDECLEXPECTED
bool attributeDecl(const QString &eName, const QString &aName, const QString &type, const QString &valueDefault, const QString &value)
bool operator==(ModuleKeyAndType const &a, ModuleKeyAndType const &b) noexcept
QXmlErrorHandler * errorHnd
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)=0
virtual bool fatalError(const QXmlParseException &exception)=0
#define XMLERR_ERRORBYCONSUMER