2 The contents of this file are subject to the Mozilla Public License
3 Version 1.1 (the "License"); you may not use this file except in
4 compliance with the License. You may obtain a copy of the License at
5 http://www.mozilla.org/MPL/
7 Software distributed under the License is distributed on an "AS IS"
8 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
9 License for the specific language governing rights and limitations
12 The Original Code is expat.
14 The Initial Developer of the Original Code is James Clark.
15 Portions created by James Clark are Copyright (C) 1998, 1999
16 James Clark. All Rights Reserved.
20 Alternatively, the contents of this file may be used under the terms
21 of the GNU General Public License (the "GPL"), in which case the
22 provisions of the GPL are applicable instead of those above. If you
23 wish to allow use of your version of this file only under the terms of
24 the GPL and not to allow others to use your version of this file under
25 the MPL, indicate your decision by deleting the provisions above and
26 replace them with the notice and other provisions required by the
27 GPL. If you do not delete the provisions above, a recipient may use
28 your version of this file under either the MPL or the GPL.
36 that ,| are not mixed in a model group
41 #ifndef MIN_BYTES_PER_CHAR
42 #define MIN_BYTES_PER_CHAR(enc) ((enc)->minBytesPerChar)
45 typedef int PROLOG_HANDLER(struct prolog_state
*state
,
52 prolog0
, prolog1
, prolog2
,
53 doctype0
, doctype1
, doctype2
, doctype3
, doctype4
, doctype5
,
55 entity0
, entity1
, entity2
, entity3
, entity4
, entity5
, entity6
,
56 entity7
, entity8
, entity9
,
57 notation0
, notation1
, notation2
, notation3
, notation4
,
58 attlist0
, attlist1
, attlist2
, attlist3
, attlist4
, attlist5
, attlist6
,
59 attlist7
, attlist8
, attlist9
,
60 element0
, element1
, element2
, element3
, element4
, element5
, element6
,
66 int syntaxError(PROLOG_STATE
*);
69 int prolog0(PROLOG_STATE
*state
,
76 case XML_TOK_PROLOG_S
:
77 state
->handler
= prolog1
;
79 case XML_TOK_XML_DECL
:
80 state
->handler
= prolog1
;
81 return XML_ROLE_XML_DECL
;
83 state
->handler
= prolog1
;
86 state
->handler
= prolog1
;
89 case XML_TOK_DECL_OPEN
:
90 if (!XmlNameMatchesAscii(enc
,
91 ptr
+ 2 * MIN_BYTES_PER_CHAR(enc
),
94 state
->handler
= doctype0
;
96 case XML_TOK_INSTANCE_START
:
97 state
->handler
= error
;
98 return XML_ROLE_INSTANCE_START
;
100 return syntaxError(state
);
104 int prolog1(PROLOG_STATE
*state
,
111 case XML_TOK_PROLOG_S
:
112 return XML_ROLE_NONE
;
114 case XML_TOK_COMMENT
:
116 return XML_ROLE_NONE
;
117 case XML_TOK_DECL_OPEN
:
118 if (!XmlNameMatchesAscii(enc
,
119 ptr
+ 2 * MIN_BYTES_PER_CHAR(enc
),
122 state
->handler
= doctype0
;
123 return XML_ROLE_NONE
;
124 case XML_TOK_INSTANCE_START
:
125 state
->handler
= error
;
126 return XML_ROLE_INSTANCE_START
;
128 return syntaxError(state
);
132 int prolog2(PROLOG_STATE
*state
,
139 case XML_TOK_PROLOG_S
:
140 return XML_ROLE_NONE
;
142 case XML_TOK_COMMENT
:
143 return XML_ROLE_NONE
;
144 case XML_TOK_INSTANCE_START
:
145 state
->handler
= error
;
146 return XML_ROLE_INSTANCE_START
;
148 return syntaxError(state
);
152 int doctype0(PROLOG_STATE
*state
,
159 case XML_TOK_PROLOG_S
:
160 return XML_ROLE_NONE
;
162 case XML_TOK_PREFIXED_NAME
:
163 state
->handler
= doctype1
;
164 return XML_ROLE_DOCTYPE_NAME
;
166 return syntaxError(state
);
170 int doctype1(PROLOG_STATE
*state
,
177 case XML_TOK_PROLOG_S
:
178 return XML_ROLE_NONE
;
179 case XML_TOK_OPEN_BRACKET
:
180 state
->handler
= internalSubset
;
181 return XML_ROLE_NONE
;
182 case XML_TOK_DECL_CLOSE
:
183 state
->handler
= prolog2
;
184 return XML_ROLE_DOCTYPE_CLOSE
;
186 if (XmlNameMatchesAscii(enc
, ptr
, "SYSTEM")) {
187 state
->handler
= doctype3
;
188 return XML_ROLE_NONE
;
190 if (XmlNameMatchesAscii(enc
, ptr
, "PUBLIC")) {
191 state
->handler
= doctype2
;
192 return XML_ROLE_NONE
;
196 return syntaxError(state
);
200 int doctype2(PROLOG_STATE
*state
,
207 case XML_TOK_PROLOG_S
:
208 return XML_ROLE_NONE
;
209 case XML_TOK_LITERAL
:
210 state
->handler
= doctype3
;
211 return XML_ROLE_DOCTYPE_PUBLIC_ID
;
213 return syntaxError(state
);
217 int doctype3(PROLOG_STATE
*state
,
224 case XML_TOK_PROLOG_S
:
225 return XML_ROLE_NONE
;
226 case XML_TOK_LITERAL
:
227 state
->handler
= doctype4
;
228 return XML_ROLE_DOCTYPE_SYSTEM_ID
;
230 return syntaxError(state
);
234 int doctype4(PROLOG_STATE
*state
,
241 case XML_TOK_PROLOG_S
:
242 return XML_ROLE_NONE
;
243 case XML_TOK_OPEN_BRACKET
:
244 state
->handler
= internalSubset
;
245 return XML_ROLE_NONE
;
246 case XML_TOK_DECL_CLOSE
:
247 state
->handler
= prolog2
;
248 return XML_ROLE_DOCTYPE_CLOSE
;
250 return syntaxError(state
);
254 int doctype5(PROLOG_STATE
*state
,
261 case XML_TOK_PROLOG_S
:
262 return XML_ROLE_NONE
;
263 case XML_TOK_DECL_CLOSE
:
264 state
->handler
= prolog2
;
265 return XML_ROLE_DOCTYPE_CLOSE
;
267 return syntaxError(state
);
271 int internalSubset(PROLOG_STATE
*state
,
278 case XML_TOK_PROLOG_S
:
279 return XML_ROLE_NONE
;
280 case XML_TOK_DECL_OPEN
:
281 if (XmlNameMatchesAscii(enc
,
282 ptr
+ 2 * MIN_BYTES_PER_CHAR(enc
),
284 state
->handler
= entity0
;
285 return XML_ROLE_NONE
;
287 if (XmlNameMatchesAscii(enc
,
288 ptr
+ 2 * MIN_BYTES_PER_CHAR(enc
),
290 state
->handler
= attlist0
;
291 return XML_ROLE_NONE
;
293 if (XmlNameMatchesAscii(enc
,
294 ptr
+ 2 * MIN_BYTES_PER_CHAR(enc
),
296 state
->handler
= element0
;
297 return XML_ROLE_NONE
;
299 if (XmlNameMatchesAscii(enc
,
300 ptr
+ 2 * MIN_BYTES_PER_CHAR(enc
),
302 state
->handler
= notation0
;
303 return XML_ROLE_NONE
;
307 case XML_TOK_COMMENT
:
308 return XML_ROLE_NONE
;
309 case XML_TOK_PARAM_ENTITY_REF
:
310 return XML_ROLE_PARAM_ENTITY_REF
;
311 case XML_TOK_CLOSE_BRACKET
:
312 state
->handler
= doctype5
;
313 return XML_ROLE_NONE
;
315 return syntaxError(state
);
319 int entity0(PROLOG_STATE
*state
,
326 case XML_TOK_PROLOG_S
:
327 return XML_ROLE_NONE
;
328 case XML_TOK_PERCENT
:
329 state
->handler
= entity1
;
330 return XML_ROLE_NONE
;
332 state
->handler
= entity2
;
333 return XML_ROLE_GENERAL_ENTITY_NAME
;
335 return syntaxError(state
);
339 int entity1(PROLOG_STATE
*state
,
346 case XML_TOK_PROLOG_S
:
347 return XML_ROLE_NONE
;
349 state
->handler
= entity7
;
350 return XML_ROLE_PARAM_ENTITY_NAME
;
352 return syntaxError(state
);
356 int entity2(PROLOG_STATE
*state
,
363 case XML_TOK_PROLOG_S
:
364 return XML_ROLE_NONE
;
366 if (XmlNameMatchesAscii(enc
, ptr
, "SYSTEM")) {
367 state
->handler
= entity4
;
368 return XML_ROLE_NONE
;
370 if (XmlNameMatchesAscii(enc
, ptr
, "PUBLIC")) {
371 state
->handler
= entity3
;
372 return XML_ROLE_NONE
;
375 case XML_TOK_LITERAL
:
376 state
->handler
= declClose
;
377 return XML_ROLE_ENTITY_VALUE
;
379 return syntaxError(state
);
383 int entity3(PROLOG_STATE
*state
,
390 case XML_TOK_PROLOG_S
:
391 return XML_ROLE_NONE
;
392 case XML_TOK_LITERAL
:
393 state
->handler
= entity4
;
394 return XML_ROLE_ENTITY_PUBLIC_ID
;
396 return syntaxError(state
);
401 int entity4(PROLOG_STATE
*state
,
408 case XML_TOK_PROLOG_S
:
409 return XML_ROLE_NONE
;
410 case XML_TOK_LITERAL
:
411 state
->handler
= entity5
;
412 return XML_ROLE_ENTITY_SYSTEM_ID
;
414 return syntaxError(state
);
418 int entity5(PROLOG_STATE
*state
,
425 case XML_TOK_PROLOG_S
:
426 return XML_ROLE_NONE
;
427 case XML_TOK_DECL_CLOSE
:
428 state
->handler
= internalSubset
;
429 return XML_ROLE_NONE
;
431 if (XmlNameMatchesAscii(enc
, ptr
, "NDATA")) {
432 state
->handler
= entity6
;
433 return XML_ROLE_NONE
;
437 return syntaxError(state
);
441 int entity6(PROLOG_STATE
*state
,
448 case XML_TOK_PROLOG_S
:
449 return XML_ROLE_NONE
;
451 state
->handler
= declClose
;
452 return XML_ROLE_ENTITY_NOTATION_NAME
;
454 return syntaxError(state
);
458 int entity7(PROLOG_STATE
*state
,
465 case XML_TOK_PROLOG_S
:
466 return XML_ROLE_NONE
;
468 if (XmlNameMatchesAscii(enc
, ptr
, "SYSTEM")) {
469 state
->handler
= entity9
;
470 return XML_ROLE_NONE
;
472 if (XmlNameMatchesAscii(enc
, ptr
, "PUBLIC")) {
473 state
->handler
= entity8
;
474 return XML_ROLE_NONE
;
477 case XML_TOK_LITERAL
:
478 state
->handler
= declClose
;
479 return XML_ROLE_ENTITY_VALUE
;
481 return syntaxError(state
);
485 int entity8(PROLOG_STATE
*state
,
492 case XML_TOK_PROLOG_S
:
493 return XML_ROLE_NONE
;
494 case XML_TOK_LITERAL
:
495 state
->handler
= entity9
;
496 return XML_ROLE_ENTITY_PUBLIC_ID
;
498 return syntaxError(state
);
502 int entity9(PROLOG_STATE
*state
,
509 case XML_TOK_PROLOG_S
:
510 return XML_ROLE_NONE
;
511 case XML_TOK_LITERAL
:
512 state
->handler
= declClose
;
513 return XML_ROLE_ENTITY_SYSTEM_ID
;
515 return syntaxError(state
);
519 int notation0(PROLOG_STATE
*state
,
526 case XML_TOK_PROLOG_S
:
527 return XML_ROLE_NONE
;
529 state
->handler
= notation1
;
530 return XML_ROLE_NOTATION_NAME
;
532 return syntaxError(state
);
536 int notation1(PROLOG_STATE
*state
,
543 case XML_TOK_PROLOG_S
:
544 return XML_ROLE_NONE
;
546 if (XmlNameMatchesAscii(enc
, ptr
, "SYSTEM")) {
547 state
->handler
= notation3
;
548 return XML_ROLE_NONE
;
550 if (XmlNameMatchesAscii(enc
, ptr
, "PUBLIC")) {
551 state
->handler
= notation2
;
552 return XML_ROLE_NONE
;
556 return syntaxError(state
);
560 int notation2(PROLOG_STATE
*state
,
567 case XML_TOK_PROLOG_S
:
568 return XML_ROLE_NONE
;
569 case XML_TOK_LITERAL
:
570 state
->handler
= notation4
;
571 return XML_ROLE_NOTATION_PUBLIC_ID
;
573 return syntaxError(state
);
577 int notation3(PROLOG_STATE
*state
,
584 case XML_TOK_PROLOG_S
:
585 return XML_ROLE_NONE
;
586 case XML_TOK_LITERAL
:
587 state
->handler
= declClose
;
588 return XML_ROLE_NOTATION_SYSTEM_ID
;
590 return syntaxError(state
);
594 int notation4(PROLOG_STATE
*state
,
601 case XML_TOK_PROLOG_S
:
602 return XML_ROLE_NONE
;
603 case XML_TOK_LITERAL
:
604 state
->handler
= declClose
;
605 return XML_ROLE_NOTATION_SYSTEM_ID
;
606 case XML_TOK_DECL_CLOSE
:
607 state
->handler
= internalSubset
;
608 return XML_ROLE_NOTATION_NO_SYSTEM_ID
;
610 return syntaxError(state
);
614 int attlist0(PROLOG_STATE
*state
,
621 case XML_TOK_PROLOG_S
:
622 return XML_ROLE_NONE
;
624 case XML_TOK_PREFIXED_NAME
:
625 state
->handler
= attlist1
;
626 return XML_ROLE_ATTLIST_ELEMENT_NAME
;
628 return syntaxError(state
);
632 int attlist1(PROLOG_STATE
*state
,
639 case XML_TOK_PROLOG_S
:
640 return XML_ROLE_NONE
;
641 case XML_TOK_DECL_CLOSE
:
642 state
->handler
= internalSubset
;
643 return XML_ROLE_NONE
;
645 case XML_TOK_PREFIXED_NAME
:
646 state
->handler
= attlist2
;
647 return XML_ROLE_ATTRIBUTE_NAME
;
649 return syntaxError(state
);
653 int attlist2(PROLOG_STATE
*state
,
660 case XML_TOK_PROLOG_S
:
661 return XML_ROLE_NONE
;
664 static const char *types
[] = {
675 for (i
= 0; i
< (int)(sizeof(types
)/sizeof(types
[0])); i
++)
676 if (XmlNameMatchesAscii(enc
, ptr
, types
[i
])) {
677 state
->handler
= attlist8
;
678 return XML_ROLE_ATTRIBUTE_TYPE_CDATA
+ i
;
681 if (XmlNameMatchesAscii(enc
, ptr
, "NOTATION")) {
682 state
->handler
= attlist5
;
683 return XML_ROLE_NONE
;
686 case XML_TOK_OPEN_PAREN
:
687 state
->handler
= attlist3
;
688 return XML_ROLE_NONE
;
690 return syntaxError(state
);
694 int attlist3(PROLOG_STATE
*state
,
701 case XML_TOK_PROLOG_S
:
702 return XML_ROLE_NONE
;
703 case XML_TOK_NMTOKEN
:
705 case XML_TOK_PREFIXED_NAME
:
706 state
->handler
= attlist4
;
707 return XML_ROLE_ATTRIBUTE_ENUM_VALUE
;
709 return syntaxError(state
);
713 int attlist4(PROLOG_STATE
*state
,
720 case XML_TOK_PROLOG_S
:
721 return XML_ROLE_NONE
;
722 case XML_TOK_CLOSE_PAREN
:
723 state
->handler
= attlist8
;
724 return XML_ROLE_NONE
;
726 state
->handler
= attlist3
;
727 return XML_ROLE_NONE
;
729 return syntaxError(state
);
733 int attlist5(PROLOG_STATE
*state
,
740 case XML_TOK_PROLOG_S
:
741 return XML_ROLE_NONE
;
742 case XML_TOK_OPEN_PAREN
:
743 state
->handler
= attlist6
;
744 return XML_ROLE_NONE
;
746 return syntaxError(state
);
751 int attlist6(PROLOG_STATE
*state
,
758 case XML_TOK_PROLOG_S
:
759 return XML_ROLE_NONE
;
761 state
->handler
= attlist7
;
762 return XML_ROLE_ATTRIBUTE_NOTATION_VALUE
;
764 return syntaxError(state
);
768 int attlist7(PROLOG_STATE
*state
,
775 case XML_TOK_PROLOG_S
:
776 return XML_ROLE_NONE
;
777 case XML_TOK_CLOSE_PAREN
:
778 state
->handler
= attlist8
;
779 return XML_ROLE_NONE
;
781 state
->handler
= attlist6
;
782 return XML_ROLE_NONE
;
784 return syntaxError(state
);
789 int attlist8(PROLOG_STATE
*state
,
796 case XML_TOK_PROLOG_S
:
797 return XML_ROLE_NONE
;
798 case XML_TOK_POUND_NAME
:
799 if (XmlNameMatchesAscii(enc
,
800 ptr
+ MIN_BYTES_PER_CHAR(enc
),
802 state
->handler
= attlist1
;
803 return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE
;
805 if (XmlNameMatchesAscii(enc
,
806 ptr
+ MIN_BYTES_PER_CHAR(enc
),
808 state
->handler
= attlist1
;
809 return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE
;
811 if (XmlNameMatchesAscii(enc
,
812 ptr
+ MIN_BYTES_PER_CHAR(enc
),
814 state
->handler
= attlist9
;
815 return XML_ROLE_NONE
;
818 case XML_TOK_LITERAL
:
819 state
->handler
= attlist1
;
820 return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE
;
822 return syntaxError(state
);
826 int attlist9(PROLOG_STATE
*state
,
833 case XML_TOK_PROLOG_S
:
834 return XML_ROLE_NONE
;
835 case XML_TOK_LITERAL
:
836 state
->handler
= attlist1
;
837 return XML_ROLE_FIXED_ATTRIBUTE_VALUE
;
839 return syntaxError(state
);
843 int element0(PROLOG_STATE
*state
,
850 case XML_TOK_PROLOG_S
:
851 return XML_ROLE_NONE
;
853 case XML_TOK_PREFIXED_NAME
:
854 state
->handler
= element1
;
855 return XML_ROLE_ELEMENT_NAME
;
857 return syntaxError(state
);
861 int element1(PROLOG_STATE
*state
,
868 case XML_TOK_PROLOG_S
:
869 return XML_ROLE_NONE
;
871 if (XmlNameMatchesAscii(enc
, ptr
, "EMPTY")) {
872 state
->handler
= declClose
;
873 return XML_ROLE_CONTENT_EMPTY
;
875 if (XmlNameMatchesAscii(enc
, ptr
, "ANY")) {
876 state
->handler
= declClose
;
877 return XML_ROLE_CONTENT_ANY
;
880 case XML_TOK_OPEN_PAREN
:
881 state
->handler
= element2
;
883 return XML_ROLE_GROUP_OPEN
;
885 return syntaxError(state
);
889 int element2(PROLOG_STATE
*state
,
896 case XML_TOK_PROLOG_S
:
897 return XML_ROLE_NONE
;
898 case XML_TOK_POUND_NAME
:
899 if (XmlNameMatchesAscii(enc
,
900 ptr
+ MIN_BYTES_PER_CHAR(enc
),
902 state
->handler
= element3
;
903 return XML_ROLE_CONTENT_PCDATA
;
906 case XML_TOK_OPEN_PAREN
:
908 state
->handler
= element6
;
909 return XML_ROLE_GROUP_OPEN
;
911 case XML_TOK_PREFIXED_NAME
:
912 state
->handler
= element7
;
913 return XML_ROLE_CONTENT_ELEMENT
;
914 case XML_TOK_NAME_QUESTION
:
915 state
->handler
= element7
;
916 return XML_ROLE_CONTENT_ELEMENT_OPT
;
917 case XML_TOK_NAME_ASTERISK
:
918 state
->handler
= element7
;
919 return XML_ROLE_CONTENT_ELEMENT_REP
;
920 case XML_TOK_NAME_PLUS
:
921 state
->handler
= element7
;
922 return XML_ROLE_CONTENT_ELEMENT_PLUS
;
924 return syntaxError(state
);
928 int element3(PROLOG_STATE
*state
,
935 case XML_TOK_PROLOG_S
:
936 return XML_ROLE_NONE
;
937 case XML_TOK_CLOSE_PAREN
:
938 case XML_TOK_CLOSE_PAREN_ASTERISK
:
939 state
->handler
= declClose
;
940 return XML_ROLE_GROUP_CLOSE_REP
;
942 state
->handler
= element4
;
943 return XML_ROLE_NONE
;
945 return syntaxError(state
);
949 int element4(PROLOG_STATE
*state
,
956 case XML_TOK_PROLOG_S
:
957 return XML_ROLE_NONE
;
959 case XML_TOK_PREFIXED_NAME
:
960 state
->handler
= element5
;
961 return XML_ROLE_CONTENT_ELEMENT
;
963 return syntaxError(state
);
967 int element5(PROLOG_STATE
*state
,
974 case XML_TOK_PROLOG_S
:
975 return XML_ROLE_NONE
;
976 case XML_TOK_CLOSE_PAREN_ASTERISK
:
977 state
->handler
= declClose
;
978 return XML_ROLE_GROUP_CLOSE_REP
;
980 state
->handler
= element4
;
981 return XML_ROLE_NONE
;
983 return syntaxError(state
);
987 int element6(PROLOG_STATE
*state
,
994 case XML_TOK_PROLOG_S
:
995 return XML_ROLE_NONE
;
996 case XML_TOK_OPEN_PAREN
:
998 return XML_ROLE_GROUP_OPEN
;
1000 case XML_TOK_PREFIXED_NAME
:
1001 state
->handler
= element7
;
1002 return XML_ROLE_CONTENT_ELEMENT
;
1003 case XML_TOK_NAME_QUESTION
:
1004 state
->handler
= element7
;
1005 return XML_ROLE_CONTENT_ELEMENT_OPT
;
1006 case XML_TOK_NAME_ASTERISK
:
1007 state
->handler
= element7
;
1008 return XML_ROLE_CONTENT_ELEMENT_REP
;
1009 case XML_TOK_NAME_PLUS
:
1010 state
->handler
= element7
;
1011 return XML_ROLE_CONTENT_ELEMENT_PLUS
;
1013 return syntaxError(state
);
1017 int element7(PROLOG_STATE
*state
,
1021 const ENCODING
*enc
)
1024 case XML_TOK_PROLOG_S
:
1025 return XML_ROLE_NONE
;
1026 case XML_TOK_CLOSE_PAREN
:
1028 if (state
->level
== 0)
1029 state
->handler
= declClose
;
1030 return XML_ROLE_GROUP_CLOSE
;
1031 case XML_TOK_CLOSE_PAREN_ASTERISK
:
1033 if (state
->level
== 0)
1034 state
->handler
= declClose
;
1035 return XML_ROLE_GROUP_CLOSE_REP
;
1036 case XML_TOK_CLOSE_PAREN_QUESTION
:
1038 if (state
->level
== 0)
1039 state
->handler
= declClose
;
1040 return XML_ROLE_GROUP_CLOSE_OPT
;
1041 case XML_TOK_CLOSE_PAREN_PLUS
:
1043 if (state
->level
== 0)
1044 state
->handler
= declClose
;
1045 return XML_ROLE_GROUP_CLOSE_PLUS
;
1047 state
->handler
= element6
;
1048 return XML_ROLE_GROUP_SEQUENCE
;
1050 state
->handler
= element6
;
1051 return XML_ROLE_GROUP_CHOICE
;
1053 return syntaxError(state
);
1057 int declClose(PROLOG_STATE
*state
,
1061 const ENCODING
*enc
)
1064 case XML_TOK_PROLOG_S
:
1065 return XML_ROLE_NONE
;
1066 case XML_TOK_DECL_CLOSE
:
1067 state
->handler
= internalSubset
;
1068 return XML_ROLE_NONE
;
1070 return syntaxError(state
);
1076 int ignore(PROLOG_STATE
*state
,
1080 const ENCODING
*enc
)
1083 case XML_TOK_DECL_CLOSE
:
1084 state
->handler
= internalSubset
;
1087 return XML_ROLE_NONE
;
1089 return syntaxError(state
);
1094 int error(PROLOG_STATE
*state
,
1098 const ENCODING
*enc
)
1100 return XML_ROLE_NONE
;
1104 int syntaxError(PROLOG_STATE
*state
)
1106 state
->handler
= error
;
1107 return XML_ROLE_ERROR
;
1110 void XmlPrologStateInit(PROLOG_STATE
*state
)
1112 state
->handler
= prolog0
;