1 |
#!/usr/bin/perl -w |
2 |
use strict; |
3 |
use Test; |
4 |
use Message::Markup::XML::QName qw/NULL_URI DEFAULT_PFX/; |
5 |
use Message::Markup::XML::Node; |
6 |
use Message::Markup::XML::Parser::Base; |
7 |
BEGIN { |
8 |
our $NS = |
9 |
{ |
10 |
(DEFAULT_PFX) => Message::Markup::XML::Parser::Base::URI_CONFIG, |
11 |
tree => q<http://suika.fam.cx/~wakaba/-temp/2004/2/22/Parser/TreeConstruct/>, |
12 |
test => q<mid:t.markup-xml-parser-base.t+2004.5.20@manakai.suika.fam.cx#>, |
13 |
Content => q<urn:x-suika-fam-cx:msgpm:header:mail:rfc822:content>, |
14 |
}; |
15 |
} |
16 |
use Message::Util::QName::General [qw/ExpandedURI/], our $NS; |
17 |
|
18 |
sub match ($$;%) { |
19 |
my ($result, $expect, %opt) = @_; |
20 |
my $c = +{ |
21 |
parse_attribute_specification => sub { |
22 |
no warnings 'uninitialized'; |
23 |
qq<<r $_[0] xmlns=""></r>>; |
24 |
}, |
25 |
}->{$opt{method}} || sub {shift}; |
26 |
if (ref $expect) { |
27 |
for (@$expect) { |
28 |
return 1 if $result eq $c->($_); |
29 |
} |
30 |
} else { |
31 |
$result eq $c->($expect); |
32 |
} |
33 |
} |
34 |
|
35 |
my @a = |
36 |
( |
37 |
{ |
38 |
t => q{"foo"}, |
39 |
method => 'parse_attribute_value_specification', |
40 |
option => {ExpandedURI q<match-or-error> => 1}, |
41 |
result => q(1), |
42 |
}, |
43 |
{ |
44 |
t => q{'foo'}, |
45 |
method => 'parse_attribute_value_specification', |
46 |
option => {ExpandedURI q<match-or-error> => 1}, |
47 |
result => q(1), |
48 |
}, |
49 |
{ |
50 |
t => q{"foo}, |
51 |
method => 'parse_attribute_value_specification', |
52 |
option => {ExpandedURI q<match-or-error> => 1}, |
53 |
result => q(0:4:SYNTAX_ALITC_REQUIRED), |
54 |
}, |
55 |
{ |
56 |
t => q{'foo}, |
57 |
method => 'parse_attribute_value_specification', |
58 |
option => {ExpandedURI q<match-or-error> => 1}, |
59 |
result => q(0:4:SYNTAX_ALITAC_REQUIRED), |
60 |
}, |
61 |
{ |
62 |
t => q{foo}, |
63 |
method => 'parse_attribute_value_specification', |
64 |
option => {ExpandedURI q<match-or-error> => 1}, |
65 |
result => q(0:0:SYNTAX_ATTRIBUTE_VALUE), |
66 |
}, |
67 |
{ |
68 |
t => q{foo}, |
69 |
method => 'parse_attribute_value_specification', |
70 |
option => {ExpandedURI q<match-or-error> => 0}, |
71 |
result => q(0:0:SYNTAX_ATTRIBUTE_VALUE), |
72 |
}, |
73 |
{ |
74 |
t => q{>}, |
75 |
method => 'parse_attribute_value_specification', |
76 |
option => {ExpandedURI q<match-or-error> => 0}, |
77 |
result => q(1), |
78 |
}, |
79 |
{ |
80 |
t => q{"foo<bar"}, |
81 |
method => 'parse_attribute_value_specification', |
82 |
result => q(0:4:SYNTAX_NO_LESS_THAN_IN_ATTR_VAL), |
83 |
}, |
84 |
{ |
85 |
t => q{'foo<bar'}, |
86 |
method => 'parse_attribute_value_specification', |
87 |
result => q(0:4:SYNTAX_NO_LESS_THAN_IN_ATTR_VAL), |
88 |
}, |
89 |
{ |
90 |
entity => {amp => q<&>}, |
91 |
t => q{"foo&bar"}, |
92 |
method => 'parse_attribute_value_specification', |
93 |
option => { |
94 |
ExpandedURI q<use-reference> => 1, |
95 |
ExpandedURI q<allow-general-entity-reference> => 1, |
96 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
97 |
ExpandedURI q<allow-hex-character-reference> => 1, |
98 |
}, |
99 |
result => q(1), |
100 |
}, |
101 |
{ |
102 |
entity => {amp => q<&>}, |
103 |
t => q{'foo&bar'}, |
104 |
method => 'parse_attribute_value_specification', |
105 |
option => { |
106 |
ExpandedURI q<use-reference> => 1, |
107 |
ExpandedURI q<allow-general-entity-reference> => 1, |
108 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
109 |
ExpandedURI q<allow-hex-character-reference> => 1, |
110 |
}, |
111 |
result => q(1), |
112 |
}, |
113 |
{ |
114 |
t => q{"fooӒbar"}, |
115 |
method => 'parse_attribute_value_specification', |
116 |
option => { |
117 |
ExpandedURI q<use-reference> => 1, |
118 |
ExpandedURI q<allow-general-entity-reference> => 1, |
119 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
120 |
ExpandedURI q<allow-hex-character-reference> => 1, |
121 |
}, |
122 |
result => q(1), |
123 |
}, |
124 |
{ |
125 |
t => q{'fooӒbar'}, |
126 |
method => 'parse_attribute_value_specification', |
127 |
result => q(1), |
128 |
option => { |
129 |
ExpandedURI q<use-reference> => 1, |
130 |
ExpandedURI q<allow-general-entity-reference> => 1, |
131 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
132 |
ExpandedURI q<allow-hex-character-reference> => 1, |
133 |
}, |
134 |
}, |
135 |
{ |
136 |
t => q{"foobar"}, |
137 |
method => 'parse_attribute_value_specification', |
138 |
option => { |
139 |
ExpandedURI q<use-reference> => 1, |
140 |
ExpandedURI q<allow-general-entity-reference> => 1, |
141 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
142 |
ExpandedURI q<allow-hex-character-reference> => 1, |
143 |
}, |
144 |
result => q(1), |
145 |
}, |
146 |
{ |
147 |
t => q{'foobar'}, |
148 |
method => 'parse_attribute_value_specification', |
149 |
option => { |
150 |
ExpandedURI q<use-reference> => 1, |
151 |
ExpandedURI q<allow-general-entity-reference> => 1, |
152 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
153 |
ExpandedURI q<allow-hex-character-reference> => 1, |
154 |
}, |
155 |
result => q(1), |
156 |
}, |
157 |
{ |
158 |
t => q{"foo&#SPACE;bar"}, |
159 |
method => 'parse_attribute_value_specification', |
160 |
option => { |
161 |
ExpandedURI q<use-reference> => 1, |
162 |
ExpandedURI q<allow-general-entity-reference> => 1, |
163 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
164 |
ExpandedURI q<allow-hex-character-reference> => 1, |
165 |
}, |
166 |
result => q(0:6:SYNTAX_NAMED_CHARACTER_REFERENCE), |
167 |
}, |
168 |
{ |
169 |
t => q{"foobar"}, |
170 |
method => 'parse_attribute_value_specification', |
171 |
option => { |
172 |
ExpandedURI q<use-reference> => 1, |
173 |
ExpandedURI q<allow-general-entity-reference> => 1, |
174 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
175 |
ExpandedURI q<allow-hex-character-reference> => 1, |
176 |
}, |
177 |
result => q(0:6:SYNTAX_HCRO_CASE), |
178 |
}, |
179 |
{ |
180 |
t => q{"foo& bar"}, |
181 |
method => 'parse_attribute_value_specification', |
182 |
result => q(0:5:SYNTAX_HASH_OR_NAME_REQUIRED), |
183 |
}, |
184 |
{ |
185 |
t => q{'foo&# bar'}, |
186 |
method => 'parse_attribute_value_specification', |
187 |
result => q(0:6:SYNTAX_X_OR_DIGIT_REQUIRED), |
188 |
}, |
189 |
{ |
190 |
t => q{"foo&#x bar"}, |
191 |
method => 'parse_attribute_value_specification', |
192 |
result => q(0:7:SYNTAX_HEXDIGIT_REQUIRED), |
193 |
}, |
194 |
{ |
195 |
t => q{"fooĠ bar"}, |
196 |
method => 'parse_attribute_value_specification', |
197 |
option => { |
198 |
ExpandedURI q<use-reference> => 1, |
199 |
ExpandedURI q<allow-general-entity-reference> => 1, |
200 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
201 |
ExpandedURI q<allow-hex-character-reference> => 1, |
202 |
}, |
203 |
result => q(0:11:SYNTAX_REFC_REQUIRED), |
204 |
}, |
205 |
{ |
206 |
t => q{"foox bar"}, |
207 |
method => 'parse_attribute_value_specification', |
208 |
option => { |
209 |
ExpandedURI q<use-reference> => 1, |
210 |
ExpandedURI q<allow-general-entity-reference> => 1, |
211 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
212 |
ExpandedURI q<allow-hex-character-reference> => 1, |
213 |
}, |
214 |
result => q(0:10:SYNTAX_REFC_REQUIRED), |
215 |
}, |
216 |
{ |
217 |
entity => {amp => q<&>}, |
218 |
t => q{"foo& bar"}, |
219 |
method => 'parse_attribute_value_specification', |
220 |
option => { |
221 |
ExpandedURI q<use-reference> => 1, |
222 |
ExpandedURI q<allow-general-entity-reference> => 1, |
223 |
ExpandedURI q<allow-numeric-character-reference> => 1, |
224 |
ExpandedURI q<allow-hex-character-reference> => 1, |
225 |
}, |
226 |
result => q(0:8:SYNTAX_REFC_REQUIRED), |
227 |
}, |
228 |
{ |
229 |
t => q{foo="bar"}, |
230 |
method => 'parse_attribute_specification', |
231 |
result => q(1), |
232 |
}, |
233 |
{ |
234 |
t => q{"bar"}, |
235 |
method => 'parse_attribute_specification', |
236 |
option => {ExpandedURI q<match-or-error> => 1}, |
237 |
result => q(0:0:SYNTAX_ATTR_NAME_REQUIRED), |
238 |
}, |
239 |
{ |
240 |
t => q{"bar"}, |
241 |
method => 'parse_attribute_specification', |
242 |
option => {ExpandedURI q<match-or-error> => 0}, |
243 |
result => q(1), |
244 |
output => q(), |
245 |
}, |
246 |
{ |
247 |
t => qq{foo \t= \x0D"bar"}, |
248 |
method => 'parse_attribute_specification', |
249 |
result => q(1), |
250 |
output => q(foo="bar"), |
251 |
}, |
252 |
{ |
253 |
t => q{foo"bar"}, |
254 |
method => 'parse_attribute_specification', |
255 |
result => q(0:3:SYNTAX_VI_REQUIRED), |
256 |
}, |
257 |
{ |
258 |
t => q{foo=}, |
259 |
method => 'parse_attribute_specification', |
260 |
result => q(0:4:SYNTAX_ALITO_OR_ALITAO_REQUIRED), |
261 |
}, |
262 |
{ |
263 |
t => q{foo:bar='baz'}, |
264 |
method => 'parse_attribute_specification', |
265 |
result => q(1), |
266 |
output => [q(foo:bar="baz"), q(foo:bar='baz')], |
267 |
}, |
268 |
{ |
269 |
t => q{:bar='baz'}, |
270 |
method => 'parse_attribute_specification', |
271 |
result => q(1), |
272 |
output => [q(:bar="baz"), q(:bar='baz')], |
273 |
}, |
274 |
{ |
275 |
t => q{r='baz'}, |
276 |
method => 'parse_attribute_specification', |
277 |
result => q(1), |
278 |
output => [q(r="baz"), q(r='baz')], |
279 |
}, |
280 |
{ |
281 |
t => q{r!='baz'}, |
282 |
method => 'parse_attribute_specification', |
283 |
result => q(0:1:SYNTAX_VI_REQUIRED), |
284 |
}, |
285 |
{ |
286 |
t => q{<foo>}, |
287 |
method => 'parse_start_tag', |
288 |
result => q(1), |
289 |
}, |
290 |
{ |
291 |
t => q{<foo >}, |
292 |
method => 'parse_start_tag', |
293 |
result => q(1), |
294 |
}, |
295 |
{ |
296 |
t => q{<foo}, |
297 |
method => 'parse_start_tag', |
298 |
result => q(0:4:SYNTAX_STAGC_OR_NESTC_REQUIRED), |
299 |
}, |
300 |
{ |
301 |
t => q{<foo bar="baz">}, |
302 |
method => 'parse_start_tag', |
303 |
result => q(1), |
304 |
}, |
305 |
{ |
306 |
t => q{<foo bar="baz" baz="bar">}, |
307 |
method => 'parse_start_tag', |
308 |
result => q(1), |
309 |
}, |
310 |
{ |
311 |
t => q{<foo bar="baz"baz="bar">}, |
312 |
method => 'parse_start_tag', |
313 |
result => q(0:14:SYNTAX_S_REQUIRED_BETWEEN_ATTR_SPEC), |
314 |
}, |
315 |
{ |
316 |
t => q{<foo bar="bazbaz="bar">}, |
317 |
method => 'parse_start_tag', |
318 |
result => q(0:18:SYNTAX_S_REQUIRED_BETWEEN_ATTR_SPEC), |
319 |
}, |
320 |
{ |
321 |
t => q{<foo "baz"baz="bar">}, |
322 |
method => 'parse_start_tag', |
323 |
result => q(0:5:SYNTAX_STAGC_OR_NESTC_REQUIRED), |
324 |
}, |
325 |
{ |
326 |
t => q{<foo="bar">}, |
327 |
method => 'parse_start_tag', |
328 |
result => q(0:4:SYNTAX_STAGC_OR_NESTC_REQUIRED), |
329 |
}, |
330 |
{ |
331 |
t => q{<foo a=bar>}, |
332 |
method => 'parse_start_tag', |
333 |
result => q(0:7:SYNTAX_ATTRIBUTE_VALUE), |
334 |
}, |
335 |
{ |
336 |
t => q{<foo/>}, |
337 |
method => 'parse_start_tag', |
338 |
result => q(1), |
339 |
}, |
340 |
{ |
341 |
t => q{<foo/}, |
342 |
method => 'parse_start_tag', |
343 |
result => q(0:5:SYNTAX_NET_REQUIRED), |
344 |
}, |
345 |
{ |
346 |
t => q{<foo />}, |
347 |
method => 'parse_start_tag', |
348 |
result => q(1), |
349 |
}, |
350 |
{ |
351 |
t => q{</foo>}, |
352 |
method => 'parse_start_tag', |
353 |
result => q(0:1:SYNTAX_ELEMENT_TYPE_NAME_FOLLOWING_STAGO_REQUIRED), |
354 |
}, |
355 |
{ |
356 |
t => q{<}, |
357 |
method => 'parse_start_tag', |
358 |
result => q(0:1:SYNTAX_ELEMENT_TYPE_NAME_FOLLOWING_STAGO_REQUIRED), |
359 |
}, |
360 |
{ |
361 |
t => q{<<}, |
362 |
method => 'parse_start_tag', |
363 |
result => q(0:1:SYNTAX_ELEMENT_TYPE_NAME_FOLLOWING_STAGO_REQUIRED), |
364 |
}, |
365 |
|
366 |
{ |
367 |
t => q{<e>text</e>}, |
368 |
method => 'parse_element', |
369 |
option => {}, |
370 |
result => q(1), |
371 |
}, |
372 |
{ |
373 |
t => q{<e>text<tag>text</tag>text<tag/>text</e>}, |
374 |
method => 'parse_element', |
375 |
option => {}, |
376 |
result => q(1), |
377 |
}, |
378 |
{ |
379 |
t => q{<e>text<tag</e>}, |
380 |
method => 'parse_element', |
381 |
result => q(0:11:SYNTAX_STAGC_OR_NESTC_REQUIRED), |
382 |
}, |
383 |
{ |
384 |
entity => {ref => q<ref>}, |
385 |
t => q{<e>text&ref;andӒtext</e>}, |
386 |
method => 'parse_element', |
387 |
result => q(1), |
388 |
}, |
389 |
|
390 |
{ |
391 |
t => q{<foo></foo bar="baz">}, |
392 |
method => 'parse_element', |
393 |
result => q(0:11:SYNTAX_ETAGC_REQUIRED), |
394 |
}, |
395 |
{ |
396 |
t => q{<foo></foo/>}, |
397 |
method => 'parse_element', |
398 |
result => q(0:10:SYNTAX_ETAGC_REQUIRED), |
399 |
}, |
400 |
{ |
401 |
t => q{<foo></foo}, |
402 |
method => 'parse_element', |
403 |
result => q(0:10:SYNTAX_ETAGC_REQUIRED), |
404 |
}, |
405 |
{ |
406 |
t => q{<foo></b>}, |
407 |
method => 'parse_element', |
408 |
result => q(0:7:WFC_ELEMENT_TYPE_MATCH), |
409 |
}, |
410 |
{ |
411 |
t => q{<e></}, |
412 |
method => 'parse_element', |
413 |
option => {ExpandedURI q<allow_end_tag> => 0}, |
414 |
result => q(0:5:SYNTAX_ELEMENT_TYPE_NAME_FOLLOWING_ETAGO_REQUIRED), |
415 |
}, |
416 |
{ |
417 |
t => q{<foo>aa}, |
418 |
method => 'parse_element', |
419 |
result => q(0:7:SYNTAX_END_TAG_REQUIRED), |
420 |
}, |
421 |
|
422 |
{ |
423 |
t => q{<!-- comment -->}, |
424 |
method => 'parse_markup_declaration', |
425 |
result => 1, |
426 |
}, |
427 |
{ |
428 |
t => q{<!-- comment- -->}, |
429 |
method => 'parse_markup_declaration', |
430 |
result => 1, |
431 |
}, |
432 |
{ |
433 |
t => q{<!-- comment-> -->}, |
434 |
method => 'parse_markup_declaration', |
435 |
result => 1, |
436 |
}, |
437 |
{ |
438 |
t => q{<!-- comment}, |
439 |
method => 'parse_markup_declaration', |
440 |
result => q(0:12:SYNTAX_COMC_REQUIRED), |
441 |
}, |
442 |
{ |
443 |
t => q{<!-- comment --}, |
444 |
method => 'parse_markup_declaration', |
445 |
result => q(0:15:SYNTAX_MDC_FOR_COMMENT_REQUIRED), |
446 |
}, |
447 |
{ |
448 |
t => q{<!-- comment --->}, |
449 |
method => 'parse_markup_declaration', |
450 |
result => q(0:15:SYNTAX_MDC_FOR_COMMENT_REQUIRED), |
451 |
}, |
452 |
{ |
453 |
t => q{<!--- comment -->}, |
454 |
method => 'parse_markup_declaration', |
455 |
result => 1, |
456 |
}, |
457 |
{ |
458 |
t => q{<!-- comment ----}, |
459 |
method => 'parse_markup_declaration', |
460 |
result => q(0:15:SYNTAX_MULTIPLE_COMMENT), |
461 |
}, |
462 |
{ |
463 |
t => q{<!-- comment ----aa-->}, |
464 |
method => 'parse_markup_declaration', |
465 |
result => q(0:15:SYNTAX_MULTIPLE_COMMENT), |
466 |
}, |
467 |
{ |
468 |
t => q{<!-- comment -- >}, |
469 |
method => 'parse_markup_declaration', |
470 |
result => q(0:15:SYNTAX_S_IN_COMMENT_DECLARATION), |
471 |
}, |
472 |
|
473 |
{ |
474 |
t => q{<e><!-- comment --></e>}, |
475 |
method => 'parse_element', |
476 |
result => 1, |
477 |
}, |
478 |
{ |
479 |
t => q{<e>bb<!-- comment -->aa</e>}, |
480 |
method => 'parse_element', |
481 |
result => 1, |
482 |
}, |
483 |
{ |
484 |
t => q{<e>bb<!-- comment -->aa<!--c--></e>}, |
485 |
method => 'parse_element', |
486 |
result => 1, |
487 |
}, |
488 |
|
489 |
{ |
490 |
t => q{<?pi?>}, |
491 |
method => 'parse_processing_instruction', |
492 |
result => 1, |
493 |
}, |
494 |
{ |
495 |
t => q{<?pi target-data?>}, |
496 |
method => 'parse_processing_instruction', |
497 |
result => 1, |
498 |
}, |
499 |
{ |
500 |
t => q{<?pi target-data ?>}, |
501 |
method => 'parse_processing_instruction', |
502 |
result => 1, |
503 |
}, |
504 |
{ |
505 |
t => q{<?pi target-data="something"?>}, |
506 |
method => 'parse_processing_instruction', |
507 |
result => 1, |
508 |
}, |
509 |
{ |
510 |
t => q{<?pi target-data="some?>}, |
511 |
method => 'parse_processing_instruction', |
512 |
result => 1, |
513 |
}, |
514 |
{ |
515 |
t => q{<? system-data ?>}, |
516 |
method => 'parse_processing_instruction', |
517 |
result => q(0:2:SYNTAX_TARGET_NAME_REQUIRED), |
518 |
}, |
519 |
{ |
520 |
t => q{<?pi}, |
521 |
method => 'parse_processing_instruction', |
522 |
result => q(0:4:SYNTAX_PIC_REQUIRED), |
523 |
}, |
524 |
{ |
525 |
t => q{<?pi!?>}, |
526 |
method => 'parse_processing_instruction', |
527 |
result => q(0:4:SYNTAX_PIC_REQUIRED), |
528 |
}, |
529 |
|
530 |
{ |
531 |
t => q{<e><?pi?>foo</e>}, |
532 |
method => 'parse_element', |
533 |
result => q(1), |
534 |
}, |
535 |
{ |
536 |
t => q{<e>bar<?pi?>foo</e>}, |
537 |
method => 'parse_element', |
538 |
result => q(1), |
539 |
}, |
540 |
|
541 |
{ |
542 |
t => q{<!foo>}, |
543 |
method => 'parse_markup_declaration', |
544 |
result => q(0:2:SYNTAX_UNKNOWN_MARKUP_DECLARATION), |
545 |
}, |
546 |
|
547 |
{ |
548 |
t => q{<!DOCTYPE>}, |
549 |
method => 'parse_markup_declaration', |
550 |
result => q(0:9:SYNTAX_DOCTYPE_PS_REQUIRED), |
551 |
}, |
552 |
{ |
553 |
t => q{<!DOCTYPE >}, |
554 |
method => 'parse_markup_declaration', |
555 |
result => q(0:10:SYNTAX_DOCTYPE_NAME_REQUIRED), |
556 |
}, |
557 |
{ |
558 |
t => q{<!DOCTYPE name>}, |
559 |
method => 'parse_markup_declaration', |
560 |
result => q(1), |
561 |
}, |
562 |
{ |
563 |
t => q{<!DOCTYPE #IMPLIED>}, |
564 |
method => 'parse_markup_declaration', |
565 |
result => q(0:11:SYNTAX_DOCTYPE_IMPLIED), |
566 |
}, |
567 |
{ |
568 |
t => q{<!DOCTYPE #keyword>}, |
569 |
method => 'parse_markup_declaration', |
570 |
result => q(0:11:SYNTAX_DOCTYPE_RNI_KEYWORD), |
571 |
}, |
572 |
{ |
573 |
t => q{<!DOCTYPE#IMPLIED>}, |
574 |
method => 'parse_markup_declaration', |
575 |
result => q(0:9:SYNTAX_DOCTYPE_PS_REQUIRED), |
576 |
}, |
577 |
{ |
578 |
t => q{<!DOCTYPE name >}, |
579 |
method => 'parse_markup_declaration', |
580 |
result => q(1), |
581 |
}, |
582 |
{ |
583 |
t => q{<!DOCTYPE name PUBLIC>}, |
584 |
method => 'parse_markup_declaration', |
585 |
result => q(0:21:SYNTAX_DOCTYPE_PS_REQUIRED), |
586 |
}, |
587 |
{ |
588 |
t => q{<!DOCTYPE name PUBLIC >}, |
589 |
method => 'parse_markup_declaration', |
590 |
result => q(0:22:SYNTAX_PUBID_LITERAL_REQUIRED), |
591 |
}, |
592 |
{ |
593 |
t => q{<!DOCTYPE name PUBLIC[]>}, |
594 |
method => 'parse_markup_declaration', |
595 |
result => q(0:21:SYNTAX_DOCTYPE_PS_REQUIRED), |
596 |
}, |
597 |
{ |
598 |
t => q{<!DOCTYPE name PUBLIC []>}, |
599 |
method => 'parse_markup_declaration', |
600 |
result => q(0:22:SYNTAX_PUBID_LITERAL_REQUIRED), |
601 |
}, |
602 |
{ |
603 |
t => q{<!DOCTYPE name PUBLIC"pubid">}, |
604 |
method => 'parse_markup_declaration', |
605 |
result => q(0:21:SYNTAX_DOCTYPE_PS_REQUIRED), |
606 |
}, |
607 |
{ |
608 |
t => q{<!DOCTYPE name PUBLIC "pubid">}, |
609 |
method => 'parse_markup_declaration', |
610 |
result => q(0:29:SYNTAX_DOCTYPE_PS_REQUIRED), |
611 |
}, |
612 |
{ |
613 |
t => q{<!DOCTYPE name PUBLIC 'pubid'>}, |
614 |
method => 'parse_markup_declaration', |
615 |
result => q(0:29:SYNTAX_DOCTYPE_PS_REQUIRED), |
616 |
}, |
617 |
{ |
618 |
t => q{<!DOCTYPE name PUBLIC "pubid}, |
619 |
method => 'parse_markup_declaration', |
620 |
result => q(0:28:SYNTAX_PUBLIT_MLITC_REQUIRED), |
621 |
}, |
622 |
{ |
623 |
t => q{<!DOCTYPE name PUBLIC 'pubid}, |
624 |
method => 'parse_markup_declaration', |
625 |
result => q(0:28:SYNTAX_PUBLIT_MLITAC_REQUIRED), |
626 |
}, |
627 |
{ |
628 |
t => q{<!DOCTYPE name PUBLIC "pubid" >}, |
629 |
method => 'parse_markup_declaration', |
630 |
result => q(0:30:SYNTAX_SYSTEM_LITERAL_REQUIRED), |
631 |
}, |
632 |
{ |
633 |
t => q{<!DOCTYPE name PUBLIC 'pubid' >}, |
634 |
method => 'parse_markup_declaration', |
635 |
result => q(0:30:SYNTAX_SYSTEM_LITERAL_REQUIRED), |
636 |
}, |
637 |
{ |
638 |
t => q{<!DOCTYPE name PUBLIC "pub<id" "">}, |
639 |
method => 'parse_markup_declaration', |
640 |
result => q(0:26:SYNTAX_PUBID_LITERAL_INVALID_CHAR), |
641 |
}, |
642 |
{ |
643 |
t => q{<!DOCTYPE name PUBLIC "pubid" "sysid">}, |
644 |
method => 'parse_markup_declaration', |
645 |
result => q(1), |
646 |
}, |
647 |
{ |
648 |
t => q{<!DOCTYPE name PUBLIC "pubid" "sysid" >}, |
649 |
method => 'parse_markup_declaration', |
650 |
result => q(1), |
651 |
}, |
652 |
{ |
653 |
t => q{<!DOCTYPE name PUBLIC "pubid" "sys<>id">}, |
654 |
method => 'parse_markup_declaration', |
655 |
result => q(1), |
656 |
}, |
657 |
{ |
658 |
t => q{<!DOCTYPE name PUBLIC "pubid" 'sysid'>}, |
659 |
method => 'parse_markup_declaration', |
660 |
result => q(1), |
661 |
}, |
662 |
{ |
663 |
t => q{<!DOCTYPE name PUBLIC "pubid" 'sysid' >}, |
664 |
method => 'parse_markup_declaration', |
665 |
result => q(1), |
666 |
}, |
667 |
{ |
668 |
t => q{<!DOCTYPE name PUBLIC "pubid" "sysid>}, |
669 |
method => 'parse_markup_declaration', |
670 |
result => q(0:37:SYNTAX_SLITC_REQUIRED), |
671 |
}, |
672 |
{ |
673 |
t => q{<!DOCTYPE name PUBLIC "pubid" 'sysid>}, |
674 |
method => 'parse_markup_declaration', |
675 |
result => q(0:37:SYNTAX_SLITAC_REQUIRED), |
676 |
}, |
677 |
|
678 |
{ |
679 |
t => q{<!DOCTYPE name SYSTEM>}, |
680 |
method => 'parse_markup_declaration', |
681 |
result => q(0:21:SYNTAX_DOCTYPE_PS_REQUIRED), |
682 |
}, |
683 |
{ |
684 |
t => q{<!DOCTYPE name SYSTEM >}, |
685 |
method => 'parse_markup_declaration', |
686 |
result => q(0:22:SYNTAX_SYSTEM_LITERAL_REQUIRED), |
687 |
}, |
688 |
{ |
689 |
t => q{<!DOCTYPE name SYSTEM[]>}, |
690 |
method => 'parse_markup_declaration', |
691 |
result => q(0:21:SYNTAX_DOCTYPE_PS_REQUIRED), |
692 |
}, |
693 |
{ |
694 |
t => q{<!DOCTYPE name SYSTEM []>}, |
695 |
method => 'parse_markup_declaration', |
696 |
result => q(0:22:SYNTAX_SYSTEM_LITERAL_REQUIRED), |
697 |
}, |
698 |
{ |
699 |
t => q{<!DOCTYPE name SYSTEM"sysid">}, |
700 |
method => 'parse_markup_declaration', |
701 |
result => q(0:21:SYNTAX_DOCTYPE_PS_REQUIRED), |
702 |
}, |
703 |
{ |
704 |
t => q{<!DOCTYPE name SYSTEM'sysid'>}, |
705 |
method => 'parse_markup_declaration', |
706 |
result => q(0:21:SYNTAX_DOCTYPE_PS_REQUIRED), |
707 |
}, |
708 |
{ |
709 |
t => q{<!DOCTYPE name SYSTEM "sysid">}, |
710 |
method => 'parse_markup_declaration', |
711 |
result => q(1), |
712 |
}, |
713 |
{ |
714 |
t => q{<!DOCTYPE name SYSTEM "sysid" >}, |
715 |
method => 'parse_markup_declaration', |
716 |
result => q(1), |
717 |
}, |
718 |
{ |
719 |
t => q{<!DOCTYPE name SYSTEM 'sysid'>}, |
720 |
method => 'parse_markup_declaration', |
721 |
result => q(1), |
722 |
}, |
723 |
{ |
724 |
t => q{<!DOCTYPE name SYSTEM 'sysid' >}, |
725 |
method => 'parse_markup_declaration', |
726 |
result => q(1), |
727 |
}, |
728 |
{ |
729 |
t => q{<!DOCTYPE name SYSTEM "sysid}, |
730 |
method => 'parse_markup_declaration', |
731 |
result => q(0:28:SYNTAX_SLITC_REQUIRED), |
732 |
}, |
733 |
{ |
734 |
t => q{<!DOCTYPE name SYSTEM 'sysid}, |
735 |
method => 'parse_markup_declaration', |
736 |
result => q(0:28:SYNTAX_SLITAC_REQUIRED), |
737 |
}, |
738 |
{ |
739 |
t => q{<!DOCTYPE name system}, |
740 |
method => 'parse_markup_declaration', |
741 |
result => q(0:15:SYNTAX_MARKUP_DECLARATION_UNKNOWN_KEYWORD), |
742 |
}, |
743 |
|
744 |
{ |
745 |
t => q{<!DOCTYPE name[]>}, |
746 |
method => 'parse_markup_declaration', |
747 |
result => q(1), |
748 |
}, |
749 |
{ |
750 |
t => q{<!DOCTYPE name []>}, |
751 |
method => 'parse_markup_declaration', |
752 |
result => q(1), |
753 |
}, |
754 |
{ |
755 |
t => q{<!DOCTYPE name[ ] >}, |
756 |
method => 'parse_markup_declaration', |
757 |
result => q(1), |
758 |
}, |
759 |
{ |
760 |
t => q{<!DOCTYPE name [] >}, |
761 |
method => 'parse_markup_declaration', |
762 |
result => q(1), |
763 |
}, |
764 |
{ |
765 |
t => q{<!DOCTYPE name PUBLIC "pubid" "sysid"[]>}, |
766 |
method => 'parse_markup_declaration', |
767 |
result => q(1), |
768 |
}, |
769 |
{ |
770 |
t => q{<!DOCTYPE name PUBLIC "pubid" "sysid" []>}, |
771 |
method => 'parse_markup_declaration', |
772 |
result => q(1), |
773 |
}, |
774 |
{ |
775 |
t => q{<!DOCTYPE name PUBLIC "pubid" 'sysid'[]>}, |
776 |
method => 'parse_markup_declaration', |
777 |
result => q(1), |
778 |
}, |
779 |
{ |
780 |
t => q{<!DOCTYPE name PUBLIC "pubid" 'sysid' []>}, |
781 |
method => 'parse_markup_declaration', |
782 |
result => q(1), |
783 |
}, |
784 |
{ |
785 |
t => q{<!DOCTYPE name PUBLIC "pubid" 'sysid'[] >}, |
786 |
method => 'parse_markup_declaration', |
787 |
result => q(1), |
788 |
}, |
789 |
{ |
790 |
t => q{<!DOCTYPE name PUBLIC "pubid" 'sysid' []>}, |
791 |
method => 'parse_markup_declaration', |
792 |
result => q(1), |
793 |
}, |
794 |
{ |
795 |
t => q{<!DOCTYPE name [] SYSTEM 'sysid'}, |
796 |
method => 'parse_markup_declaration', |
797 |
result => q(0:18:SYNTAX_MDC_REQUIRED), |
798 |
}, |
799 |
|
800 |
{ |
801 |
t => q{<!DOCTYPE name SYSTEM ""[ <!-- --> ]>}, |
802 |
method => 'parse_markup_declaration', |
803 |
result => q(1), |
804 |
}, |
805 |
{ |
806 |
t => q{<!DOCTYPE name SYSTEM ""[ <!-- --> ] >}, |
807 |
method => 'parse_markup_declaration', |
808 |
result => q(1), |
809 |
}, |
810 |
{ |
811 |
t => q{<!DOCTYPE name SYSTEM ""[ <!-- --> <!> ]>}, |
812 |
method => 'parse_markup_declaration', |
813 |
result => q(0:35:SYNTAX_EMPTY_COMMENT_DECLARATION), |
814 |
}, |
815 |
{ |
816 |
t => q{<!DOCTYPE name SYSTEM ""[ <!-- -- -- --> ]>}, |
817 |
method => 'parse_markup_declaration', |
818 |
result => q(0:33:SYNTAX_S_IN_COMMENT_DECLARATION), |
819 |
}, |
820 |
{ |
821 |
t => q{<!DOCTYPE name SYSTEM ""[ <!-- --> ] }, |
822 |
method => 'parse_markup_declaration', |
823 |
result => q(0:38:SYNTAX_MDC_REQUIRED), |
824 |
}, |
825 |
{ |
826 |
t => q{<!DOCTYPE name []aaa>}, |
827 |
method => 'parse_markup_declaration', |
828 |
result => q(0:17:SYNTAX_MDC_REQUIRED), |
829 |
}, |
830 |
{ |
831 |
t => q{<!DOCTYPE name PUBLIC "pub" "sys"aaa>}, |
832 |
method => 'parse_markup_declaration', |
833 |
result => q(0:33:SYNTAX_MDC_REQUIRED), |
834 |
}, |
835 |
{ |
836 |
t => q{<!DOCTYPE name SYSTEM "sys"aaa>}, |
837 |
method => 'parse_markup_declaration', |
838 |
result => q(0:27:SYNTAX_MDC_REQUIRED), |
839 |
}, |
840 |
{ |
841 |
t => q{<!DOCTYPE name [] >}, |
842 |
method => 'parse_markup_declaration', |
843 |
result => q(1), |
844 |
}, |
845 |
{ |
846 |
t => q{<!DOCTYPE name SYSTEM "sys" >}, |
847 |
method => 'parse_markup_declaration', |
848 |
result => q(1), |
849 |
}, |
850 |
{ |
851 |
entity => {param => 'aa'}, |
852 |
t => q{<!DOCTYPE %param; >}, |
853 |
method => 'parse_markup_declaration', |
854 |
result => q(0:10:SYNTAX_PARAENT_REF_NOT_ALLOWED), |
855 |
}, |
856 |
{ |
857 |
t => q{<!DOCTYPE --%param; -- >}, |
858 |
method => 'parse_markup_declaration', |
859 |
result => q(0:10:SYNTAX_PS_COMMENT), |
860 |
}, |
861 |
|
862 |
{ |
863 |
t => q{abcdefg}, |
864 |
method => 'parse_rpdata', |
865 |
result => q(1), |
866 |
}, |
867 |
{ |
868 |
t => q{abcd}efg}, |
869 |
method => 'parse_rpdata', |
870 |
result => q(1), |
871 |
}, |
872 |
{ |
873 |
t => q{abcdĥefg}, |
874 |
method => 'parse_rpdata', |
875 |
result => q(1), |
876 |
}, |
877 |
{ |
878 |
entity => {e5 => 'bb',}, |
879 |
t => q{abcd&e5;efg}, |
880 |
method => 'parse_rpdata', |
881 |
result => q(1), |
882 |
}, |
883 |
{ |
884 |
entity => {e5 => 'aa'}, |
885 |
t => q{abcd%e5;efg}, |
886 |
method => 'parse_rpdata', |
887 |
result => q(1), |
888 |
}, |
889 |
{ |
890 |
entity => {e5efg => 'aa'}, |
891 |
t => q{abcd&e5efg}, |
892 |
method => 'parse_rpdata', |
893 |
result => q(0:10:SYNTAX_REFC_REQUIRED), |
894 |
}, |
895 |
{ |
896 |
t => q{abcd๞ a}, |
897 |
method => 'parse_rpdata', |
898 |
result => q(0:10:SYNTAX_REFC_REQUIRED), |
899 |
}, |
900 |
{ |
901 |
entity => {e5efg => 'aa'}, |
902 |
t => q{abcd%e5efg}, |
903 |
method => 'parse_rpdata', |
904 |
result => q(0:10:SYNTAX_REFC_REQUIRED), |
905 |
}, |
906 |
{ |
907 |
t => q{abcd% e5efg}, |
908 |
method => 'parse_rpdata', |
909 |
result => q(0:5:SYNTAX_PARAENT_NAME_REQUIRED), |
910 |
}, |
911 |
|
912 |
{ |
913 |
t => q{<!ENTITY "a">}, |
914 |
method => 'parse_entity_declaration', |
915 |
result => q(0:9:SYNTAX_ENTITY_NAME_REQUIRED), |
916 |
}, |
917 |
{ |
918 |
t => q{<!ENTITY a "a">}, |
919 |
method => 'parse_entity_declaration', |
920 |
result => q(1), |
921 |
}, |
922 |
{ |
923 |
t => q{<!ENTITY % "a">}, |
924 |
method => 'parse_entity_declaration', |
925 |
result => q(0:11:SYNTAX_ENTITY_PARAM_NAME_REQUIRED), |
926 |
}, |
927 |
{ |
928 |
t => q{<!ENTITY % a "a">}, |
929 |
method => 'parse_entity_declaration', |
930 |
result => q(1), |
931 |
}, |
932 |
{ |
933 |
t => q{<!ENTITY #DEFAULT "a">}, |
934 |
method => 'parse_entity_declaration', |
935 |
result => q(0:10:SYNTAX_ENTITY_DEFAULT), |
936 |
}, |
937 |
{ |
938 |
t => q{<!ENTITY #ALL "a">}, |
939 |
method => 'parse_entity_declaration', |
940 |
result => q(0:10:SYNTAX_ENTITY_RNI_KEYWORD), |
941 |
}, |
942 |
{ |
943 |
t => q{<!ENTITY % #DEFAULT "a">}, |
944 |
method => 'parse_entity_declaration', |
945 |
result => q(0:11:SYNTAX_ENTITY_PARAM_NAME_REQUIRED), |
946 |
}, |
947 |
|
948 |
{ |
949 |
t => q{<!ENTITY a "abcde">}, |
950 |
method => 'parse_entity_declaration', |
951 |
result => q(1), |
952 |
}, |
953 |
{ |
954 |
# entity => {a => q<b>}, |
955 |
t => q{<!ENTITY a "ab&a;cde">}, |
956 |
method => 'parse_entity_declaration', |
957 |
result => q(1), |
958 |
}, |
959 |
{ |
960 |
entity => {a => 'aa'}, |
961 |
t => q{<!ENTITY a "ab%a;cde">}, |
962 |
method => 'parse_entity_declaration', |
963 |
result => q(1), |
964 |
}, |
965 |
{ |
966 |
t => q{<!ENTITY a "ab<c'de">}, |
967 |
method => 'parse_entity_declaration', |
968 |
result => q(1), |
969 |
}, |
970 |
{ |
971 |
t => q{<!ENTITY a 'ab<c"de'>}, |
972 |
method => 'parse_entity_declaration', |
973 |
result => q(1), |
974 |
}, |
975 |
{ |
976 |
t => q{<!ENTITY a "abcde>}, |
977 |
method => 'parse_entity_declaration', |
978 |
result => q(0:18:SYNTAX_PLITC_REQUIRED), |
979 |
}, |
980 |
{ |
981 |
t => q{<!ENTITY a 'abcde>}, |
982 |
method => 'parse_entity_declaration', |
983 |
result => q(0:18:SYNTAX_PLITAC_REQUIRED), |
984 |
}, |
985 |
{ |
986 |
t => q{<!ENTITY a "abcde" >}, |
987 |
method => 'parse_entity_declaration', |
988 |
result => q(1), |
989 |
}, |
990 |
{ |
991 |
t => q{<!ENTITY a "abcde"aa>}, |
992 |
method => 'parse_entity_declaration', |
993 |
result => q(0:18:SYNTAX_MDC_REQUIRED), |
994 |
}, |
995 |
{ |
996 |
t => q{<!ENTITY a "abcde" aa>}, |
997 |
method => 'parse_entity_declaration', |
998 |
result => q(0:19:SYNTAX_MDC_REQUIRED), |
999 |
}, |
1000 |
{ |
1001 |
t => q{<!ENTITY % pa "abcde" >}, |
1002 |
method => 'parse_entity_declaration', |
1003 |
result => q(1), |
1004 |
}, |
1005 |
|
1006 |
{ |
1007 |
t => q{<!ENTITY a SYSTEM "sys">}, |
1008 |
method => 'parse_entity_declaration', |
1009 |
result => q(1), |
1010 |
}, |
1011 |
{ |
1012 |
t => q{<!ENTITY a SYSTEM "sys" >}, |
1013 |
method => 'parse_entity_declaration', |
1014 |
result => q(1), |
1015 |
}, |
1016 |
{ |
1017 |
t => q{<!ENTITY a PUBLIC "pub" "sys">}, |
1018 |
method => 'parse_entity_declaration', |
1019 |
result => q(1), |
1020 |
}, |
1021 |
{ |
1022 |
t => q{<!ENTITY a PUBLIC "pub" "sys" >}, |
1023 |
method => 'parse_entity_declaration', |
1024 |
result => q(1), |
1025 |
}, |
1026 |
{ |
1027 |
t => q{<!ENTITY % a PUBLIC "pub" "sys" >}, |
1028 |
method => 'parse_entity_declaration', |
1029 |
result => q(1), |
1030 |
}, |
1031 |
{ |
1032 |
t => q{<!ENTITY a PUBLIC "pub" >}, |
1033 |
method => 'parse_entity_declaration', |
1034 |
result => q(0:24:SYNTAX_SYSTEM_LITERAL_REQUIRED), |
1035 |
}, |
1036 |
{ |
1037 |
t => q{<!ENTITY a PUBLIC >}, |
1038 |
method => 'parse_entity_declaration', |
1039 |
result => q(0:18:SYNTAX_PUBID_LITERAL_REQUIRED), |
1040 |
}, |
1041 |
{ |
1042 |
t => q{<!ENTITY a SYSTEM >}, |
1043 |
method => 'parse_entity_declaration', |
1044 |
result => q(0:18:SYNTAX_SYSTEM_LITERAL_REQUIRED), |
1045 |
}, |
1046 |
{ |
1047 |
t => q{<!ENTITY a SYSTEM "sys" "what?">}, |
1048 |
method => 'parse_entity_declaration', |
1049 |
result => q(0:24:SYNTAX_MDC_REQUIRED), |
1050 |
}, |
1051 |
{ |
1052 |
t => q{<!ENTITY a PUBLIC "pub" "sys" "what?">}, |
1053 |
method => 'parse_entity_declaration', |
1054 |
result => q(0:30:SYNTAX_MDC_REQUIRED), |
1055 |
}, |
1056 |
{ |
1057 |
t => q{<!ENTITY a PUBLIC "pub""sys">}, |
1058 |
method => 'parse_entity_declaration', |
1059 |
result => q(0:23:SYNTAX_ENTITY_PS_REQUIRED), |
1060 |
}, |
1061 |
{ |
1062 |
t => q{<!ENTITY a PUBLIC"pub" "sys">}, |
1063 |
method => 'parse_entity_declaration', |
1064 |
result => q(0:17:SYNTAX_ENTITY_PS_REQUIRED), |
1065 |
}, |
1066 |
{ |
1067 |
t => q{<!ENTITY a SYSTEM"sys">}, |
1068 |
method => 'parse_entity_declaration', |
1069 |
result => q(0:17:SYNTAX_ENTITY_PS_REQUIRED), |
1070 |
}, |
1071 |
{ |
1072 |
t => q{<!ENTITY a KEYWORD>}, |
1073 |
method => 'parse_entity_declaration', |
1074 |
result => q(0:11:SYNTAX_ENTITY_TEXT_KEYWORD), |
1075 |
}, |
1076 |
{ |
1077 |
t => q{<!ENTITY a CDATA "cdata">}, |
1078 |
method => 'parse_entity_declaration', |
1079 |
result => q(0:11:SYNTAX_ENTITY_TEXT_PRE_KEYWORD), |
1080 |
}, |
1081 |
{ |
1082 |
t => q{<!ENTITY a "cdata" CDATA>}, |
1083 |
method => 'parse_entity_declaration', |
1084 |
result => q(0:19:SYNTAX_MDC_REQUIRED), |
1085 |
}, |
1086 |
{ |
1087 |
t => q{<!ENTITY a SYSTEM "sys" NDATA notation>}, |
1088 |
method => 'parse_entity_declaration', |
1089 |
result => q(1), |
1090 |
}, |
1091 |
{ |
1092 |
t => q{<!ENTITY a SYSTEM "sys" NDATA notation >}, |
1093 |
method => 'parse_entity_declaration', |
1094 |
result => q(1), |
1095 |
}, |
1096 |
{ |
1097 |
t => q{<!ENTITY a SYSTEM "sys"NDATA notation>}, |
1098 |
method => 'parse_entity_declaration', |
1099 |
result => q(0:23:SYNTAX_ENTITY_PS_REQUIRED), |
1100 |
}, |
1101 |
{ |
1102 |
t => q{<!ENTITY a SYSTEM "sys" NDATAnotation>}, |
1103 |
method => 'parse_entity_declaration', |
1104 |
result => q(0:24:SYNTAX_ENTITY_DATA_TYPE_UNKNOWN_KEYWORD), |
1105 |
}, |
1106 |
{ |
1107 |
t => q{<!ENTITY a SYSTEM "sys" NDATA notation aa >}, |
1108 |
method => 'parse_entity_declaration', |
1109 |
result => q(0:40:SYNTAX_MDC_REQUIRED), |
1110 |
}, |
1111 |
{ |
1112 |
t => q{<!ENTITY a SYSTEM "sys" NDATA >}, |
1113 |
method => 'parse_entity_declaration', |
1114 |
result => q(0:30:SYNTAX_ENTITY_DATA_TYPE_NOTATION_NAME_REQUIRED), |
1115 |
}, |
1116 |
{ |
1117 |
t => q{<!ENTITY a SYSTEM "sys" NDATA #>}, |
1118 |
method => 'parse_entity_declaration', |
1119 |
result => q(0:30:SYNTAX_ENTITY_DATA_TYPE_NOTATION_NAME_REQUIRED), |
1120 |
}, |
1121 |
{ |
1122 |
t => q{<!ENTITY a SYSTEM "sys" CDATA a>}, |
1123 |
method => 'parse_entity_declaration', |
1124 |
result => q(0:24:SYNTAX_ENTITY_DATA_TYPE_SGML_KEYWORD), |
1125 |
}, |
1126 |
{ |
1127 |
t => q{<!ENTITY a SYSTEM "sys" SDATA a>}, |
1128 |
method => 'parse_entity_declaration', |
1129 |
result => q(0:24:SYNTAX_ENTITY_DATA_TYPE_SGML_KEYWORD), |
1130 |
}, |
1131 |
{ |
1132 |
t => q{<!ENTITY a SYSTEM "sys" SUBDOC a>}, |
1133 |
method => 'parse_entity_declaration', |
1134 |
result => q(0:24:SYNTAX_ENTITY_DATA_TYPE_SGML_KEYWORD), |
1135 |
}, |
1136 |
{ |
1137 |
t => q{<!ENTITY a SYSTEM "sys" NDATA b [ attr=val ]>}, |
1138 |
method => 'parse_entity_declaration', |
1139 |
result => q(0:32:SYNTAX_MDC_REQUIRED), |
1140 |
}, |
1141 |
|
1142 |
{ |
1143 |
entity => {b => ''}, |
1144 |
t => q{<!ENTITY a "%b;">}, |
1145 |
method => 'parse_entity_declaration', |
1146 |
result => q(1), |
1147 |
}, |
1148 |
{ |
1149 |
entity => {b => ''}, |
1150 |
t => q{<!ENTITY a %b; "aa">}, |
1151 |
method => 'parse_entity_declaration', |
1152 |
result => q(1), |
1153 |
}, |
1154 |
{ |
1155 |
entity => {b => '"aa"'}, |
1156 |
t => q{<!ENTITY a %b;>}, |
1157 |
method => 'parse_entity_declaration', |
1158 |
result => q(1), |
1159 |
}, |
1160 |
{ |
1161 |
entity => {b => q<SYSTEM "foo">}, |
1162 |
t => q{<!ENTITY a %b;>}, |
1163 |
method => 'parse_entity_declaration', |
1164 |
result => q(1), |
1165 |
}, |
1166 |
{ |
1167 |
entity => {b => q< PUBLIC "pub" 'sys' >}, |
1168 |
t => q{<!ENTITY a %b;>}, |
1169 |
method => 'parse_entity_declaration', |
1170 |
result => q(1), |
1171 |
}, |
1172 |
{ |
1173 |
entity => {b => 'SYSTEM'}, |
1174 |
t => q{<!ENTITY a %b;>}, |
1175 |
method => 'parse_entity_declaration', |
1176 |
result => q(0:14:SYNTAX_ENTITY_PS_REQUIRED), |
1177 |
}, |
1178 |
{ |
1179 |
entity => {b => "SYSTEM"}, |
1180 |
t => q{<!ENTITY a %b; >}, |
1181 |
method => 'parse_entity_declaration', |
1182 |
result => q(0:15:SYNTAX_SYSTEM_LITERAL_REQUIRED), |
1183 |
}, |
1184 |
{ |
1185 |
entity => {b => q< SYSTEM "foo" >}, |
1186 |
t => q{<!ENTITY a %b; >}, |
1187 |
method => 'parse_entity_declaration', |
1188 |
result => q(1), |
1189 |
}, |
1190 |
{ |
1191 |
entity => {b => q< SYSTEM %c; >, |
1192 |
c => q< "sys" >}, |
1193 |
t => q{<!ENTITY a %b; >}, |
1194 |
method => 'parse_entity_declaration', |
1195 |
result => q(1), |
1196 |
}, |
1197 |
{ |
1198 |
entity => {b => q<SYSTEM %c; >, |
1199 |
c => q< "sys" >}, |
1200 |
t => q{<!ENTITY%b; >}, |
1201 |
method => 'parse_entity_declaration', |
1202 |
result => q(1), |
1203 |
}, |
1204 |
{ |
1205 |
entity => {b => q[SYSTEM %c; > ], |
1206 |
c => q< "sys" >}, |
1207 |
t => q{<!ENTITY%b; >}, |
1208 |
method => 'parse_entity_declaration', |
1209 |
result => q(0:11:SYNTAX_MARKUP_DECLARATION_TOO_MANY_PARAM), |
1210 |
}, |
1211 |
|
1212 |
{ |
1213 |
t => q{<!ENTITY --comment-->}, |
1214 |
method => 'parse_entity_declaration', |
1215 |
result => q(0:9:SYNTAX_PS_COMMENT), |
1216 |
}, |
1217 |
{ |
1218 |
t => q{<!ENTITY a --comment-->}, |
1219 |
method => 'parse_entity_declaration', |
1220 |
result => q(0:11:SYNTAX_PS_COMMENT), |
1221 |
}, |
1222 |
{ |
1223 |
t => q{<!ENTITY a "a" --comment-->}, |
1224 |
method => 'parse_entity_declaration', |
1225 |
result => q(0:15:SYNTAX_PS_COMMENT), |
1226 |
}, |
1227 |
|
1228 |
{ |
1229 |
t => q{<!ELEMENT el ANY>}, |
1230 |
method => 'parse_element_declaration', |
1231 |
result => q(1), |
1232 |
}, |
1233 |
{ |
1234 |
t => q{<!ELEMENT el EMPTY >}, |
1235 |
method => 'parse_element_declaration', |
1236 |
result => q(1), |
1237 |
}, |
1238 |
{ |
1239 |
t => q{<!ELEMENT el CDATA>}, |
1240 |
method => 'parse_element_declaration', |
1241 |
result => q(0:13:SYNTAX_ELEMENT_SGML_CONTENT_KEYWORD), |
1242 |
}, |
1243 |
{ |
1244 |
t => q{<!ELEMENT el RCDATA>}, |
1245 |
method => 'parse_element_declaration', |
1246 |
result => q(0:13:SYNTAX_ELEMENT_SGML_CONTENT_KEYWORD), |
1247 |
}, |
1248 |
{ |
1249 |
t => q{<!ELEMENT el foo>}, |
1250 |
method => 'parse_element_declaration', |
1251 |
result => q(0:13:SYNTAX_ELEMENT_UNKNOWN_CONTENT_KEYWORD), |
1252 |
}, |
1253 |
{ |
1254 |
t => q{<!ELEMENT el ANY foo>}, |
1255 |
method => 'parse_element_declaration', |
1256 |
result => q(0:17:SYNTAX_MDC_REQUIRED), |
1257 |
}, |
1258 |
{ |
1259 |
t => q{<!ELEMENT el - - ANY>}, |
1260 |
method => 'parse_element_declaration', |
1261 |
result => q(0:13:SYNTAX_ELEMENT_TAG_MIN), |
1262 |
}, |
1263 |
{ |
1264 |
t => q{<!ELEMENT el o - ANY>}, |
1265 |
method => 'parse_element_declaration', |
1266 |
result => q(0:13:SYNTAX_ELEMENT_TAG_MIN), |
1267 |
}, |
1268 |
{ |
1269 |
t => q{<!ELEMENT (el) o - ANY>}, |
1270 |
method => 'parse_element_declaration', |
1271 |
result => q(0:10:SYNTAX_ELEMENT_DECLARATION_TYPE_NAME_GROUP), |
1272 |
}, |
1273 |
{ |
1274 |
t => q{<!ELEMENT el 1 o - ANY>}, |
1275 |
method => 'parse_element_declaration', |
1276 |
result => q(0:13:SYNTAX_ELEMENT_RANK_SUFFIX), |
1277 |
}, |
1278 |
{ |
1279 |
t => q{<!ELEMENT>}, |
1280 |
method => 'parse_element_declaration', |
1281 |
result => q(0:9:SYNTAX_ELEMENT_PS_REQUIRED), |
1282 |
}, |
1283 |
{ |
1284 |
t => q{<!ELEMENT >}, |
1285 |
method => 'parse_element_declaration', |
1286 |
result => q(0:10:SYNTAX_ELEMENT_DECLARATION_TYPE_NAME_REQUIRED), |
1287 |
}, |
1288 |
{ |
1289 |
t => q{<!ELEMENT e>}, |
1290 |
method => 'parse_element_declaration', |
1291 |
result => q(0:11:SYNTAX_ELEMENT_PS_REQUIRED), |
1292 |
}, |
1293 |
{ |
1294 |
t => q{<!ELEMENT e >}, |
1295 |
method => 'parse_element_declaration', |
1296 |
result => q(0:12:SYNTAX_ELEMENT_MODEL_OR_MIN_OR_RANK_REQUIRED), |
1297 |
}, |
1298 |
{ |
1299 |
t => q{<!ELEMENT e ANY}, |
1300 |
method => 'parse_element_declaration', |
1301 |
result => q(0:15:SYNTAX_MDC_REQUIRED), |
1302 |
}, |
1303 |
|
1304 |
{ |
1305 |
t => q<(a)>, |
1306 |
method => 'parse_model_group', |
1307 |
result => 1, |
1308 |
}, |
1309 |
{ |
1310 |
t => q<(a,b)>, |
1311 |
method => 'parse_model_group', |
1312 |
result => 1, |
1313 |
}, |
1314 |
{ |
1315 |
t => q<(a,b,c)>, |
1316 |
method => 'parse_model_group', |
1317 |
result => 1, |
1318 |
}, |
1319 |
{ |
1320 |
t => q<( a , b )>, |
1321 |
method => 'parse_model_group', |
1322 |
result => 1, |
1323 |
}, |
1324 |
{ |
1325 |
t => q<( a , b >, |
1326 |
method => 'parse_model_group', |
1327 |
result => '0:11:SYNTAX_MODEL_GROUP_GRPC_REQUIRED', |
1328 |
}, |
1329 |
{ |
1330 |
t => q<( a , >, |
1331 |
method => 'parse_model_group', |
1332 |
result => '0:10:SYNTAX_MODEL_GROUP_ITEM_REQUIRED', |
1333 |
}, |
1334 |
|
1335 |
{ |
1336 |
t => q<( a+ )>, |
1337 |
method => 'parse_model_group', |
1338 |
result => 1, |
1339 |
}, |
1340 |
{ |
1341 |
t => q<( a* )>, |
1342 |
method => 'parse_model_group', |
1343 |
result => 1, |
1344 |
}, |
1345 |
{ |
1346 |
t => q<( a? )>, |
1347 |
method => 'parse_model_group', |
1348 |
result => 1, |
1349 |
}, |
1350 |
{ |
1351 |
t => q<( a?, b )>, |
1352 |
method => 'parse_model_group', |
1353 |
result => 1, |
1354 |
}, |
1355 |
{ |
1356 |
t => q<( a?, b, c+ )>, |
1357 |
method => 'parse_model_group', |
1358 |
result => 1, |
1359 |
}, |
1360 |
{ |
1361 |
t => q<( a?, b*, c+ )>, |
1362 |
method => 'parse_model_group', |
1363 |
result => 1, |
1364 |
}, |
1365 |
{ |
1366 |
t => q<( a?>, |
1367 |
method => 'parse_model_group', |
1368 |
result => '0:4:SYNTAX_MODEL_GROUP_GRPC_REQUIRED', |
1369 |
}, |
1370 |
{ |
1371 |
t => q<( a ?>, |
1372 |
method => 'parse_model_group', |
1373 |
result => '0:4:SYNTAX_MODEL_GROUP_GRPC_REQUIRED', |
1374 |
}, |
1375 |
|
1376 |
{ |
1377 |
t => q<( a | b )>, |
1378 |
method => 'parse_model_group', |
1379 |
result => 1, |
1380 |
}, |
1381 |
{ |
1382 |
t => q<( a & b )>, |
1383 |
method => 'parse_model_group', |
1384 |
result => '0:4:SYNTAX_CONNECTOR', |
1385 |
}, |
1386 |
|
1387 |
{ |
1388 |
t => q<( a , b )*>, |
1389 |
method => 'parse_model_group', |
1390 |
result => 1, |
1391 |
}, |
1392 |
{ |
1393 |
t => q<( a , b )+>, |
1394 |
method => 'parse_model_group', |
1395 |
result => 1, |
1396 |
}, |
1397 |
{ |
1398 |
t => q<( a , b )?>, |
1399 |
method => 'parse_model_group', |
1400 |
result => 1, |
1401 |
}, |
1402 |
{ |
1403 |
t => q<( a , (b)* )>, |
1404 |
method => 'parse_model_group', |
1405 |
result => 1, |
1406 |
}, |
1407 |
{ |
1408 |
t => q<( a , (b, c)* )>, |
1409 |
method => 'parse_model_group', |
1410 |
result => 1, |
1411 |
}, |
1412 |
{ |
1413 |
t => q<( a , (b, (c, d)+)* )>, |
1414 |
method => 'parse_model_group', |
1415 |
result => 1, |
1416 |
}, |
1417 |
{ |
1418 |
entity => {ry => 'aa'}, |
1419 |
t => q<( a , ([b, %ry; ], (c, d)+)* )>, |
1420 |
method => 'parse_model_group', |
1421 |
result => '0:7:SYNTAX_DATA_TAG_GROUP', |
1422 |
}, |
1423 |
|
1424 |
{ |
1425 |
t => q<( a -- , b -- )>, |
1426 |
method => 'parse_model_group', |
1427 |
result => '0:4:SYNTAX_PS_COMMENT', |
1428 |
}, |
1429 |
{ |
1430 |
entity => { |
1431 |
b => q<, b>, |
1432 |
}, |
1433 |
t => q<( a %b; )>, |
1434 |
method => 'parse_model_group', |
1435 |
result => 1, |
1436 |
}, |
1437 |
{ |
1438 |
entity => { |
1439 |
b => q<, >, |
1440 |
}, |
1441 |
t => q<( a %b; )>, |
1442 |
method => 'parse_model_group', |
1443 |
result => '0:8:SYNTAX_MODEL_GROUP_ITEM_REQUIRED', |
1444 |
}, |
1445 |
{ |
1446 |
entity => { |
1447 |
b => q<, (b) >, |
1448 |
}, |
1449 |
t => q<( a %b; )>, |
1450 |
method => 'parse_model_group', |
1451 |
result => 1, |
1452 |
}, |
1453 |
{ |
1454 |
entity => { |
1455 |
b => q<, (b >, |
1456 |
}, |
1457 |
t => q<( a %b; ))>, |
1458 |
method => 'parse_model_group', |
1459 |
result => '0:5:SYNTAX_MODEL_GROUP_GRPC_REQUIRED', |
1460 |
}, |
1461 |
{ |
1462 |
entity => { |
1463 |
b => q<, b) >, |
1464 |
}, |
1465 |
t => q<( a %b; >, |
1466 |
method => 'parse_model_group', |
1467 |
result => '0:3:SYNTAX_MARKUP_DECLARATION_TOO_MANY_PARAM', |
1468 |
}, |
1469 |
|
1470 |
{ |
1471 |
t => q<( #PCDATA )* >, |
1472 |
method => 'parse_model_group', |
1473 |
result => 1, |
1474 |
}, |
1475 |
{ |
1476 |
t => q<( #PCDATA ) >, |
1477 |
method => 'parse_model_group', |
1478 |
result => 1, |
1479 |
}, |
1480 |
{ |
1481 |
t => q<( #PCDATA | a )* >, |
1482 |
method => 'parse_model_group', |
1483 |
result => 1, |
1484 |
}, |
1485 |
{ |
1486 |
t => q<( #PCDATA | a | b)* >, |
1487 |
method => 'parse_model_group', |
1488 |
result => 1, |
1489 |
}, |
1490 |
{ |
1491 |
t => q<( #PCDATA )+ >, |
1492 |
method => 'parse_model_group', |
1493 |
result => '0:11:SYNTAX_MODEL_GROUP_PCDATA_OCCUR', |
1494 |
}, |
1495 |
{ |
1496 |
t => q<( #PCDATA | a )+ >, |
1497 |
method => 'parse_model_group', |
1498 |
result => '0:15:SYNTAX_MODEL_GROUP_MIXED_OCCUR', |
1499 |
}, |
1500 |
{ |
1501 |
t => q<( #PCDATA , a )* >, |
1502 |
method => 'parse_model_group', |
1503 |
result => '0:10:SYNTAX_MODEL_GROUP_MIXED_CONNECTOR', |
1504 |
}, |
1505 |
{ |
1506 |
t => q<( #PCDATA | (a) )* >, |
1507 |
method => 'parse_model_group', |
1508 |
result => '0:12:SYNTAX_MODEL_GROUP_MIXED_NESTED', |
1509 |
}, |
1510 |
{ |
1511 |
t => q<( b | #PCDATA )* >, |
1512 |
method => 'parse_model_group', |
1513 |
result => '0:7:SYNTAX_MODEL_GROUP_PCDATA_POSITION', |
1514 |
}, |
1515 |
{ |
1516 |
t => q<( b | #foo )* >, |
1517 |
method => 'parse_model_group', |
1518 |
result => '0:7:SYNTAX_MODEL_GROUP_UNKNOWN_KEYWORD', |
1519 |
}, |
1520 |
{ |
1521 |
t => q<( #PCDATA | a , b ) >, |
1522 |
method => 'parse_model_group', |
1523 |
result => '0:14:SYNTAX_MODEL_GROUP_CONNECTOR_MATCH', |
1524 |
}, |
1525 |
{ |
1526 |
t => q<( a , b | a) >, |
1527 |
method => 'parse_model_group', |
1528 |
result => '0:8:SYNTAX_MODEL_GROUP_CONNECTOR_MATCH', |
1529 |
}, |
1530 |
|
1531 |
{ |
1532 |
t => q<<!ELEMENT e ( a , b , a) >>, |
1533 |
method => 'parse_element_declaration', |
1534 |
result => '1', |
1535 |
}, |
1536 |
{ |
1537 |
t => q<<!ELEMENT e ( a , b >>, |
1538 |
method => 'parse_element_declaration', |
1539 |
result => '0:21:SYNTAX_MODEL_GROUP_GRPC_REQUIRED', |
1540 |
}, |
1541 |
{ |
1542 |
entity => {b => q<(a, b>}, |
1543 |
t => q<<!ELEMENT e %b; ) >>, |
1544 |
method => 'parse_element_declaration', |
1545 |
result => '0:5:SYNTAX_MODEL_GROUP_GRPC_REQUIRED', |
1546 |
}, |
1547 |
{ |
1548 |
entity => {b => q[(a, b )>]}, |
1549 |
t => q[<!ELEMENT e %b; ], |
1550 |
method => 'parse_element_declaration', |
1551 |
result => '0:7:SYNTAX_MARKUP_DECLARATION_TOO_MANY_PARAM', |
1552 |
}, |
1553 |
|
1554 |
{ |
1555 |
t => q<<!NOTATION n PUBLIC "pub">>, |
1556 |
method => 'parse_notation_declaration', |
1557 |
result => 1, |
1558 |
}, |
1559 |
{ |
1560 |
t => q<<!NOTATION n PUBLIC "pub" "sys" >>, |
1561 |
method => 'parse_notation_declaration', |
1562 |
result => 1, |
1563 |
}, |
1564 |
{ |
1565 |
t => q<<!NOTATION n SYSTEM "sys">>, |
1566 |
method => 'parse_notation_declaration', |
1567 |
result => 1, |
1568 |
}, |
1569 |
{ |
1570 |
t => q[<!NOTATION n SYSTEM "sys"], |
1571 |
method => 'parse_notation_declaration', |
1572 |
result => '0:25:SYNTAX_MDC_REQUIRED', |
1573 |
}, |
1574 |
{ |
1575 |
t => q[<!NOTATION n SYSTEM "sys>], |
1576 |
method => 'parse_notation_declaration', |
1577 |
result => '0:25:SYNTAX_SLITC_REQUIRED', |
1578 |
}, |
1579 |
{ |
1580 |
t => q[<!NOTATION n ], |
1581 |
method => 'parse_notation_declaration', |
1582 |
result => '0:13:SYNTAX_NOTATION_EXTERNAL_IDENTIFIER_REQUIRED', |
1583 |
}, |
1584 |
{ |
1585 |
t => q[<!NOTATION>], |
1586 |
method => 'parse_notation_declaration', |
1587 |
result => '0:10:SYNTAX_NOTATION_PS_REQUIRED', |
1588 |
}, |
1589 |
{ |
1590 |
t => q[<!NOTATION >], |
1591 |
method => 'parse_notation_declaration', |
1592 |
result => '0:11:SYNTAX_NOTATION_NAME_REQUIRED', |
1593 |
}, |
1594 |
{ |
1595 |
t => q[<!NOTATION n>], |
1596 |
method => 'parse_notation_declaration', |
1597 |
result => '0:12:SYNTAX_NOTATION_PS_REQUIRED', |
1598 |
}, |
1599 |
{ |
1600 |
t => q[<!NOTATION n SYSTEM >], |
1601 |
method => 'parse_notation_declaration', |
1602 |
result => '0:20:SYNTAX_SYSTEM_LITERAL_REQUIRED', |
1603 |
}, |
1604 |
{ |
1605 |
entity => {n => q<not SYSTEM %sys;>, sys => q< "sys" >}, |
1606 |
t => q[<!NOTATION %n;>], |
1607 |
method => 'parse_notation_declaration', |
1608 |
result => 1, |
1609 |
}, |
1610 |
|
1611 |
{ |
1612 |
t => q[<!ATTLIST a>], |
1613 |
method => 'parse_attlist_declaration', |
1614 |
result => 1, |
1615 |
}, |
1616 |
{ |
1617 |
t => q[<!ATTLIST attr >], |
1618 |
method => 'parse_attlist_declaration', |
1619 |
result => 1, |
1620 |
}, |
1621 |
{ |
1622 |
t => q[<!ATTLIST el <], |
1623 |
method => 'parse_attlist_declaration', |
1624 |
result => '0:13:SYNTAX_MDC_REQUIRED', |
1625 |
}, |
1626 |
{ |
1627 |
t => q[<!ATTLIST >], |
1628 |
method => 'parse_attlist_declaration', |
1629 |
result => '0:10:SYNTAX_ATTLIST_ASSOCIATED_NAME_REQUIRED', |
1630 |
}, |
1631 |
{ |
1632 |
t => q[<!ATTLIST>], |
1633 |
method => 'parse_attlist_declaration', |
1634 |
result => '0:9:SYNTAX_ATTLIST_PS_REQUIRED', |
1635 |
}, |
1636 |
|
1637 |
{ |
1638 |
t => q[<!ATTLIST foo a CDATA #IMPLIED>], |
1639 |
method => 'parse_attlist_declaration', |
1640 |
result => 1, |
1641 |
}, |
1642 |
{ |
1643 |
t => q[<!ATTLIST foo a CDATA #REQUIRED>], |
1644 |
method => 'parse_attlist_declaration', |
1645 |
result => 1, |
1646 |
}, |
1647 |
{ |
1648 |
t => q[<!ATTLIST foo a NMTOKEN #IMPLIED>], |
1649 |
method => 'parse_attlist_declaration', |
1650 |
result => 1, |
1651 |
}, |
1652 |
{ |
1653 |
t => q[<!ATTLIST foo a ID #IMPLIED>], |
1654 |
method => 'parse_attlist_declaration', |
1655 |
result => 1, |
1656 |
}, |
1657 |
{ |
1658 |
t => q[<!ATTLIST foo a IDREF #IMPLIED>], |
1659 |
method => 'parse_attlist_declaration', |
1660 |
result => 1, |
1661 |
}, |
1662 |
{ |
1663 |
t => q[<!ATTLIST foo a IDREFS #IMPLIED>], |
1664 |
method => 'parse_attlist_declaration', |
1665 |
result => 1, |
1666 |
}, |
1667 |
{ |
1668 |
t => q[<!ATTLIST foo a NMTOKENS #IMPLIED>], |
1669 |
method => 'parse_attlist_declaration', |
1670 |
result => 1, |
1671 |
}, |
1672 |
{ |
1673 |
t => q[<!ATTLIST foo a NMTOKENS #IMPLIED b CDATA #REQUIRED>], |
1674 |
method => 'parse_attlist_declaration', |
1675 |
result => 1, |
1676 |
}, |
1677 |
{ |
1678 |
t => q[<!ATTLIST foo a NMTOKENS #IMPLIED a NMTOKENS #IMPLIED |
1679 |
b CDATA #REQUIRED id ID #IMPLIED>], |
1680 |
method => 'parse_attlist_declaration', |
1681 |
result => 1, |
1682 |
}, |
1683 |
{ |
1684 |
t => q[<!ATTLIST foo a NMTOKENS #CURRENT>], |
1685 |
method => 'parse_attlist_declaration', |
1686 |
result => '0:26:SYNTAX_ATTRDEF_DEFAULT_SGML_KEYWORD', |
1687 |
}, |
1688 |
{ |
1689 |
t => q[<!ATTLIST foo a NMTOKENS #NEW>], |
1690 |
method => 'parse_attlist_declaration', |
1691 |
result => '0:26:SYNTAX_ATTRDEF_DEFAULT_UNKNOWN_KEYWORD', |
1692 |
}, |
1693 |
{ |
1694 |
t => q[<!ATTLIST foo a NMTOKENS >], |
1695 |
method => 'parse_attlist_declaration', |
1696 |
result => '0:25:SYNTAX_ATTRDEF_DEFAULT_REQUIRED', |
1697 |
}, |
1698 |
{ |
1699 |
t => q[<!ATTLIST foo a NMTOKENS#IMPLIED>], |
1700 |
method => 'parse_attlist_declaration', |
1701 |
result => '0:24:SYNTAX_ATTLIST_PS_REQUIRED', |
1702 |
}, |
1703 |
{ |
1704 |
t => q[<!ATTLIST foo a NAME #IMPLIED>], |
1705 |
method => 'parse_attlist_declaration', |
1706 |
result => '0:16:SYNTAX_ATTRDEF_TYPE_SGML_KEYWORD', |
1707 |
}, |
1708 |
{ |
1709 |
t => q[<!ATTLIST foo a URI #IMPLIED>], |
1710 |
method => 'parse_attlist_declaration', |
1711 |
result => '0:16:SYNTAX_ATTRDEF_TYPE_UNKNOWN_KEYWORD', |
1712 |
}, |
1713 |
{ |
1714 |
t => q[<!ATTLIST foo a #IMPLIED>], |
1715 |
method => 'parse_attlist_declaration', |
1716 |
result => '0:16:SYNTAX_ATTRDEF_TYPE_REQUIRED', |
1717 |
}, |
1718 |
{ |
1719 |
t => q[<!ATTLIST foo a#IMPLIED>], |
1720 |
method => 'parse_attlist_declaration', |
1721 |
result => '0:15:SYNTAX_ATTLIST_PS_REQUIRED', |
1722 |
}, |
1723 |
{ |
1724 |
t => q[<!ATTLIST foo a CDATA #IMPLIED ab>], |
1725 |
method => 'parse_attlist_declaration', |
1726 |
result => '0:33:SYNTAX_ATTLIST_PS_REQUIRED', |
1727 |
}, |
1728 |
{ |
1729 |
t => q[<!ATTLIST foo a CDATA "def">], |
1730 |
method => 'parse_attlist_declaration', |
1731 |
result => 1, |
1732 |
}, |
1733 |
{ |
1734 |
t => q[<!ATTLIST foo a CDATA #FIXED "def">], |
1735 |
method => 'parse_attlist_declaration', |
1736 |
result => 1, |
1737 |
}, |
1738 |
{ |
1739 |
t => q[<!ATTLIST foo a (a) #IMPLIED>], |
1740 |
method => 'parse_attlist_declaration', |
1741 |
result => 1, |
1742 |
}, |
1743 |
{ |
1744 |
t => q[<!ATTLIST foo a (a|b) #IMPLIED>], |
1745 |
method => 'parse_attlist_declaration', |
1746 |
result => 1, |
1747 |
}, |
1748 |
{ |
1749 |
t => q[<!ATTLIST foo a (a|b|c) #IMPLIED>], |
1750 |
method => 'parse_attlist_declaration', |
1751 |
result => 1, |
1752 |
}, |
1753 |
{ |
1754 |
t => q[<!ATTLIST foo a (a|b|c #IMPLIED>], |
1755 |
method => 'parse_attlist_declaration', |
1756 |
result => '0:24:SYNTAX_ATTRDEF_TYPE_GROUP_GRPC_REQUIRED', |
1757 |
}, |
1758 |
{ |
1759 |
t => q[<!ATTLIST foo a (a,b) #IMPLIED>], |
1760 |
method => 'parse_attlist_declaration', |
1761 |
result => '0:19:SYNTAX_CONNECTOR', |
1762 |
}, |
1763 |
{ |
1764 |
t => q[<!ATTLIST foo a (a+|b) #IMPLIED>], |
1765 |
method => 'parse_attlist_declaration', |
1766 |
result => '0:19:SYNTAX_ATTRDEF_TYPE_GROUP_GRPC_REQUIRED', |
1767 |
}, |
1768 |
{ |
1769 |
t => q[<!ATTLIST foo a (a|(b)) #IMPLIED>], |
1770 |
method => 'parse_attlist_declaration', |
1771 |
result => '0:20:SYNTAX_ATTRDEF_TYPE_GROUP_NMTOKEN_REQUIRED', |
1772 |
}, |
1773 |
{ |
1774 |
t => q[<!ATTLIST foo a (a|b)* #IMPLIED>], |
1775 |
method => 'parse_attlist_declaration', |
1776 |
result => '0:22:SYNTAX_ATTLIST_PS_REQUIRED', |
1777 |
}, |
1778 |
{ |
1779 |
t => q[<!ATTLIST foo a (a|b|c ) "c">], |
1780 |
method => 'parse_attlist_declaration', |
1781 |
result => 1, |
1782 |
}, |
1783 |
{ |
1784 |
t => q[<!ATTLIST foo a NOTATION ( a|b|c ) "c">], |
1785 |
method => 'parse_attlist_declaration', |
1786 |
result => 1, |
1787 |
}, |
1788 |
{ |
1789 |
entity => {lt => qq{&#@{[ord '<']};}}, |
1790 |
t => q[<!ATTLIST foo a NOTATION ( a|b|c ) 'c<b!!Jb'>], |
1791 |
method => 'parse_attlist_declaration', |
1792 |
result => 1, |
1793 |
}, |
1794 |
{ |
1795 |
t => q[<!ATTLIST foo a NOTATION ( a|b|c ) 'c<b'>], |
1796 |
method => 'parse_attlist_declaration', |
1797 |
result => '0:37:SYNTAX_NO_LESS_THAN_IN_ATTR_VAL', |
1798 |
}, |
1799 |
|
1800 |
{ |
1801 |
t => q{<![INCLUDE[<!---->]]>}, |
1802 |
method => 'parse_marked_section', |
1803 |
option => { |
1804 |
ExpandedURI q<allow-section> => {INCLUDE => 1,}, |
1805 |
}, |
1806 |
result => 1, |
1807 |
}, |
1808 |
{ |
1809 |
t => q{<![ INCLUDE [<!---->]]>}, |
1810 |
method => 'parse_marked_section', |
1811 |
option => { |
1812 |
ExpandedURI q<allow-section> => {INCLUDE => 1,}, |
1813 |
ExpandedURI q<allow-section-ps> => 1, |
1814 |
}, |
1815 |
result => 1, |
1816 |
}, |
1817 |
{ |
1818 |
t => q{<![ INCLUDE [<!---->]>}, |
1819 |
method => 'parse_marked_section', |
1820 |
option => { |
1821 |
ExpandedURI q<allow-section> => {INCLUDE => 1,}, |
1822 |
ExpandedURI q<allow-section-ps> => 1, |
1823 |
}, |
1824 |
result => '0:24:SYNTAX_MSE_REQUIRED', |
1825 |
}, |
1826 |
{ |
1827 |
t => q{<![ INCLUDE <!---->]>}, |
1828 |
method => 'parse_marked_section', |
1829 |
option => { |
1830 |
ExpandedURI q<allow-section> => {INCLUDE => 1,}, |
1831 |
ExpandedURI q<allow-section-ps> => 1, |
1832 |
}, |
1833 |
result => '0:14:SYNTAX_MSO_REQUIRED', |
1834 |
}, |
1835 |
{ |
1836 |
t => q{<![ INCLUDE IGNORE[<!---->]]>}, |
1837 |
method => 'parse_marked_section', |
1838 |
option => { |
1839 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1840 |
ExpandedURI q<allow-section-ps> => 1, |
1841 |
}, |
1842 |
result => '0:14:SYNTAX_MARKED_SECTION_KEYWORDS', |
1843 |
}, |
1844 |
{ |
1845 |
t => q{<![RCDATA[<!---->]]>}, |
1846 |
method => 'parse_marked_section', |
1847 |
option => { |
1848 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1849 |
ExpandedURI q<allow-section-ps> => 1, |
1850 |
}, |
1851 |
result => '0:3:SYNTAX_MARKED_SECTION_KEYWORD', |
1852 |
}, |
1853 |
{ |
1854 |
t => q{<![DATA[<!---->]]>}, |
1855 |
method => 'parse_marked_section', |
1856 |
option => { |
1857 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1858 |
ExpandedURI q<allow-section-ps> => 1, |
1859 |
}, |
1860 |
result => '0:3:SYNTAX_MARKED_SECTION_KEYWORD', |
1861 |
}, |
1862 |
{ |
1863 |
t => q{<![IGNORE[<!---->]]>}, |
1864 |
method => 'parse_marked_section', |
1865 |
option => { |
1866 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1867 |
ExpandedURI q<allow-section-ps> => 1, |
1868 |
}, |
1869 |
result => 1, |
1870 |
}, |
1871 |
{ |
1872 |
t => q{<![IGNORE[<!---->}, |
1873 |
method => 'parse_marked_section', |
1874 |
option => { |
1875 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1876 |
ExpandedURI q<allow-section-ps> => 1, |
1877 |
}, |
1878 |
result => '0:17:SYNTAX_MSE_REQUIRED', |
1879 |
}, |
1880 |
{ |
1881 |
t => q{<![IGNORE[<!----><![IGNORE[ ]]>...]]>}, |
1882 |
method => 'parse_marked_section', |
1883 |
option => { |
1884 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1885 |
ExpandedURI q<allow-section-ps> => 1, |
1886 |
}, |
1887 |
result => 1, |
1888 |
}, |
1889 |
{ |
1890 |
t => q{<![IGNORE[<!----><![IGNORE[ <e><![CDATA[a&b ]]></e> ]]>...]]>}, |
1891 |
method => 'parse_marked_section', |
1892 |
option => { |
1893 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1894 |
ExpandedURI q<allow-section-ps> => 1, |
1895 |
}, |
1896 |
result => 1, |
1897 |
}, |
1898 |
{ |
1899 |
t => q{<![IGNORE[<!----><![IGNORE[ <e><![CDATA[a&b ]]></e> ]>...]]>}, |
1900 |
method => 'parse_marked_section', |
1901 |
option => { |
1902 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1903 |
ExpandedURI q<allow-section-ps> => 1, |
1904 |
}, |
1905 |
result => '0:60:SYNTAX_MSE_REQUIRED', |
1906 |
}, |
1907 |
{ |
1908 |
t => q{<![IGNORE[<!----><![ <e]]>.]]>}, |
1909 |
method => 'parse_marked_section', |
1910 |
option => { |
1911 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1912 |
ExpandedURI q<allow-section-ps> => 1, |
1913 |
}, |
1914 |
result => 1, |
1915 |
}, |
1916 |
{ |
1917 |
t => q{<![ [<!----><![ <e]]>.]]>}, |
1918 |
method => 'parse_marked_section', |
1919 |
option => { |
1920 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1921 |
ExpandedURI q<allow-section-ps> => 1, |
1922 |
}, |
1923 |
result => '0:5:SYNTAX_MARKED_SECTION_KEYWORD_REQUIRED', |
1924 |
}, |
1925 |
{ |
1926 |
t => q{<![[<!----><![ <e]]>.]]>}, |
1927 |
method => 'parse_marked_section', |
1928 |
option => { |
1929 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1930 |
ExpandedURI q<allow-section-ps> => 1, |
1931 |
}, |
1932 |
result => '0:3:SYNTAX_MARKED_SECTION_KEYWORD_REQUIRED', |
1933 |
}, |
1934 |
{ |
1935 |
entity => {kwd => ' INCLUDE '}, |
1936 |
t => q{<![%kwd; [ <!-- --> ]]>}, |
1937 |
method => 'parse_marked_section', |
1938 |
option => { |
1939 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1940 |
ExpandedURI q<allow-section-ps> => 1, |
1941 |
ExpandedURI q<allow-param-entref> => 1, |
1942 |
}, |
1943 |
result => 1, |
1944 |
}, |
1945 |
{ |
1946 |
entity => {kwd => ' INCLUDE ', kwd2 => '%kwd3;', kwd3 => ''}, |
1947 |
t => q{<![%kwd; %kwd2; [ <!-- --> ]]>}, |
1948 |
method => 'parse_marked_section', |
1949 |
option => { |
1950 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1951 |
ExpandedURI q<allow-section-ps> => 1, |
1952 |
ExpandedURI q<allow-param-entref> => 1, |
1953 |
}, |
1954 |
result => 1, |
1955 |
}, |
1956 |
{ |
1957 |
entity => {kwd => ' INCLUDE ', kwd2 => ' -- comment --'}, |
1958 |
t => q{<![%kwd; %kwd2; [ <!-- --> ]]>}, |
1959 |
method => 'parse_marked_section', |
1960 |
option => { |
1961 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1962 |
ExpandedURI q<allow-section-ps> => 1, |
1963 |
ExpandedURI q<allow-param-entref> => 1, |
1964 |
}, |
1965 |
result => '0:1:SYNTAX_PS_COMMENT', |
1966 |
}, |
1967 |
{ |
1968 |
t => q{<![INCLUDE[ <!-- -- ]]>}, |
1969 |
method => 'parse_marked_section', |
1970 |
option => { |
1971 |
ExpandedURI q<allow-section> => {INCLUDE => 1, IGNORE => 1}, |
1972 |
ExpandedURI q<allow-section-ps> => 1, |
1973 |
ExpandedURI q<section-content-parser> => 'parse_doctype_subset', |
1974 |
}, |
1975 |
result => '0:19:SYNTAX_S_IN_COMMENT_DECLARATION', |
1976 |
}, |
1977 |
|
1978 |
{ |
1979 |
t => q{<![CDATA[ <!-- -- ]]>}, |
1980 |
method => 'parse_marked_section', |
1981 |
option => { |
1982 |
ExpandedURI q<allow-section> => {CDATA => 1}, |
1983 |
}, |
1984 |
result => 1, |
1985 |
}, |
1986 |
{ |
1987 |
t => q{<![CDATA [ <!-- -- ]]>}, |
1988 |
method => 'parse_marked_section', |
1989 |
option => { |
1990 |
ExpandedURI q<allow-section> => {CDATA => 1}, |
1991 |
}, |
1992 |
result => '0:8:SYNTAX_MARKED_SECTION_STATUS_PS', |
1993 |
}, |
1994 |
{ |
1995 |
t => q{<![ CDATA[ <!-- -- ]]>}, |
1996 |
method => 'parse_marked_section', |
1997 |
option => { |
1998 |
ExpandedURI q<allow-section> => {CDATA => 1}, |
1999 |
}, |
2000 |
result => '0:3:SYNTAX_MARKED_SECTION_STATUS_PS', |
2001 |
}, |
2002 |
{ |
2003 |
t => q{<![CDATA[ <!-- ]]-]>- ]]>}, |
2004 |
method => 'parse_marked_section', |
2005 |
option => { |
2006 |
ExpandedURI q<allow-section> => {CDATA => 1}, |
2007 |
}, |
2008 |
result => 1, |
2009 |
}, |
2010 |
{ |
2011 |
entity => {kwd => 'CDATA'}, |
2012 |
t => q{<![%kwd;[ <!-- ]]-]>- ]]>}, |
2013 |
method => 'parse_marked_section', |
2014 |
option => { |
2015 |
ExpandedURI q<allow-section> => {CDATA => 1}, |
2016 |
ExpandedURI q<allow-param-entref> => 1, |
2017 |
}, |
2018 |
result => '0:3:SYNTAX_MARKED_SECTION_STATUS_PS', |
2019 |
}, |
2020 |
|
2021 |
{ |
2022 |
t => q{<!----> <!ENTITY e "entity text"> |
2023 |
<!ELEMENT el ANY> <!ATTLIST el foo CDATA "bar"> |
2024 |
<?pi ?> <![ INCLUDE |
2025 |
[ <!ATTLIST el bar ID #IMPLIED> ]]> |
2026 |
<!NOTATION n SYSTEM "not">}, |
2027 |
method => 'parse_doctype_subset', |
2028 |
option => { |
2029 |
ExpandedURI q<allow-section> => {INCLUDE => 1}, |
2030 |
ExpandedURI q<allow-param-entref> => 1, |
2031 |
}, |
2032 |
result => 1, |
2033 |
}, |
2034 |
{ |
2035 |
t => q{<!----> <!ENTITY e "entity text"> |
2036 |
<!DOCTYPE doc []>}, |
2037 |
method => 'parse_doctype_subset', |
2038 |
option => { |
2039 |
ExpandedURI q<allow-section> => {CDATA => 1}, |
2040 |
}, |
2041 |
result => '1:9:SYNTAX_MARKUP_DECLARATION_NOT_ALLOWED', |
2042 |
}, |
2043 |
{ |
2044 |
t => q{<!----> <!ENTITY e "entity text"> ]>}, |
2045 |
method => 'parse_doctype_subset', |
2046 |
option => { |
2047 |
ExpandedURI q<allow-section> => {CDATA => 1}, |
2048 |
}, |
2049 |
result => '0:34:SYNTAX_DOCTYPE_SUBSET_INVALID_CHAR', |
2050 |
}, |
2051 |
|
2052 |
{ |
2053 |
t => q{<!DOCTYPE d [<!----> <!ENTITY e "entity text"> ]>}, |
2054 |
method => 'parse_doctype_declaration', |
2055 |
result => 1, |
2056 |
}, |
2057 |
{ |
2058 |
t => q{<!DOCTYPE d [<!----> <![INCLUDE[<!ENTITY e "entity text">]]> ]>}, |
2059 |
method => 'parse_doctype_declaration', |
2060 |
result => '0:21:SYNTAX_MARKED_SECTION_NOT_ALLOWED', |
2061 |
}, |
2062 |
{ |
2063 |
entity => {d => {replace => q< <![INCLUDE[<!ENTITY e "entity text">]]>>, |
2064 |
external => 0}}, |
2065 |
t => q{<!DOCTYPE d [<!----> %d; <!-- --> ]>}, |
2066 |
method => 'parse_doctype_declaration', |
2067 |
result => '0:2:SYNTAX_MARKED_SECTION_NOT_ALLOWED', |
2068 |
}, |
2069 |
{ |
2070 |
entity => {d => {replace => q{ <![INCLUDE[<!ENTITY e "entity text">]]>}, |
2071 |
external => 1}}, |
2072 |
t => q{<!DOCTYPE d [<!----> %d; <!-- --> ]>}, |
2073 |
method => 'parse_doctype_declaration', |
2074 |
result => 1, |
2075 |
}, |
2076 |
{ |
2077 |
entity => {d => {replace |
2078 |
=> q{<![INCLUDE[<!ENTITY e -- SYSTEM -- "entity text">]]>}, |
2079 |
external => 1}}, |
2080 |
t => q{<!DOCTYPE d [<!----> %d; ]>}, |
2081 |
method => 'parse_doctype_declaration', |
2082 |
result => '0:22:SYNTAX_PS_COMMENT', |
2083 |
}, |
2084 |
|
2085 |
{ |
2086 |
t => q{<?xml?>}, |
2087 |
method => 'parse_processing_instruction', |
2088 |
result => q(0:0:SYNTAX_XML_DECLARATION_IN_MIDDLE), |
2089 |
}, |
2090 |
{ |
2091 |
t => q{<?XML?>}, |
2092 |
method => 'parse_processing_instruction', |
2093 |
result => q(0:2:SYNTAX_PI_TARGET_XML), |
2094 |
}, |
2095 |
{ |
2096 |
t => q{<?XmL?>}, |
2097 |
method => 'parse_processing_instruction', |
2098 |
result => q(0:2:SYNTAX_PI_TARGET_XML), |
2099 |
}, |
2100 |
{ |
2101 |
t => q{<?XmL1?>}, |
2102 |
method => 'parse_processing_instruction', |
2103 |
result => 1, |
2104 |
}, |
2105 |
|
2106 |
{ |
2107 |
t => q{<?xml?>}, |
2108 |
method => 'parse_xml_declaration', |
2109 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2110 |
result => q(0:5:SYNTAX_XML_VERSION_REQUIRED), |
2111 |
}, |
2112 |
{ |
2113 |
t => q{<?xml ?>}, |
2114 |
method => 'parse_xml_declaration', |
2115 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2116 |
result => q(0:6:SYNTAX_XML_VERSION_REQUIRED), |
2117 |
}, |
2118 |
{ |
2119 |
t => q{<?xml ?>}, |
2120 |
method => 'parse_xml_declaration', |
2121 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2122 |
result => q(0:6:SYNTAX_XML_ENCODING_REQUIRED), |
2123 |
}, |
2124 |
{ |
2125 |
t => q{<?xml ?>}, |
2126 |
method => 'parse_xml_declaration', |
2127 |
option => {ExpandedURI q<allow-xml-declaration> => 1, |
2128 |
ExpandedURI q<allow-text-declaration> => 1}, |
2129 |
result => q(0:6:SYNTAX_XML_ENCODING_REQUIRED), |
2130 |
}, |
2131 |
{ |
2132 |
t => q{<?xml version="1.0"?>}, |
2133 |
method => 'parse_xml_declaration', |
2134 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2135 |
result => 1, |
2136 |
}, |
2137 |
{ |
2138 |
t => q{<?xml version="1.0" ?>}, |
2139 |
method => 'parse_xml_declaration', |
2140 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2141 |
result => 1, |
2142 |
}, |
2143 |
{ |
2144 |
t => qq{<?xml \tversion = "1.0"?>}, |
2145 |
method => 'parse_xml_declaration', |
2146 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2147 |
result => 1, |
2148 |
}, |
2149 |
{ |
2150 |
t => q{<?xml version='1.0' ?>}, |
2151 |
method => 'parse_xml_declaration', |
2152 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2153 |
result => 1, |
2154 |
}, |
2155 |
{ |
2156 |
t => q{<?xml version="1.0"encoding="iso-2022-jp"?>}, |
2157 |
method => 'parse_xml_declaration', |
2158 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2159 |
result => q(0:19:SYNTAX_S_REQUIRED_BETWEEN_ATTR_SPEC), |
2160 |
}, |
2161 |
{ |
2162 |
t => q{<?xml version="1.0?>}, |
2163 |
method => 'parse_xml_declaration', |
2164 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2165 |
result => q(0:18:SYNTAX_ALITC_REQUIRED), |
2166 |
}, |
2167 |
{ |
2168 |
t => q{<?xml version=1.0?>}, |
2169 |
method => 'parse_xml_declaration', |
2170 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2171 |
result => q(0:14:SYNTAX_ALITO_OR_ALITAO_REQUIRED), |
2172 |
}, |
2173 |
{ |
2174 |
t => q{<?xml version="1.1"?>}, |
2175 |
method => 'parse_xml_declaration', |
2176 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2177 |
result => 1, |
2178 |
}, |
2179 |
{ |
2180 |
t => q{<?xml version="1.2"?>}, |
2181 |
method => 'parse_xml_declaration', |
2182 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2183 |
result => q(0:15:SYNTAX_XML_VERSION_UNSUPPORTED), |
2184 |
}, |
2185 |
{ |
2186 |
t => q{<?xml version="1+2"?>}, |
2187 |
method => 'parse_xml_declaration', |
2188 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2189 |
result => q(0:15:SYNTAX_XML_VERSION_INVALID), |
2190 |
}, |
2191 |
{ |
2192 |
t => q{<?xml version=""?>}, |
2193 |
method => 'parse_xml_declaration', |
2194 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2195 |
result => q(0:15:SYNTAX_XML_VERSION_INVALID), |
2196 |
}, |
2197 |
|
2198 |
{ |
2199 |
t => q{<?xml encoding=""?>}, |
2200 |
method => 'parse_xml_declaration', |
2201 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2202 |
result => q(0:16:SYNTAX_XML_ENCODING_INVALID), |
2203 |
}, |
2204 |
{ |
2205 |
t => q{<?xml encoding = 'iso-2022-jp'?>}, |
2206 |
method => 'parse_xml_declaration', |
2207 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2208 |
result => 1, |
2209 |
}, |
2210 |
{ |
2211 |
t => q{<?xml encoding = 'iso-2022-jp'?>}, |
2212 |
method => 'parse_xml_declaration', |
2213 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2214 |
result => q(0:7:SYNTAX_XML_VERSION_REQUIRED), |
2215 |
}, |
2216 |
{ |
2217 |
t => q{<?xml encoding = 'iso+2022+jp'?>}, |
2218 |
method => 'parse_xml_declaration', |
2219 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2220 |
result => q(0:19:SYNTAX_XML_ENCODING_INVALID), |
2221 |
}, |
2222 |
{ |
2223 |
t => q{<?xml encoding = ""?>}, |
2224 |
method => 'parse_xml_declaration', |
2225 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2226 |
result => q(0:18:SYNTAX_XML_ENCODING_INVALID), |
2227 |
}, |
2228 |
{ |
2229 |
t => q{<?xml encoding = 'iso-2022-jp' version="1.0"?>}, |
2230 |
method => 'parse_xml_declaration', |
2231 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2232 |
result => q(0:7:SYNTAX_XML_VERSION_REQUIRED), |
2233 |
}, |
2234 |
{ |
2235 |
t => q{<?xml version="1.0" encoding = 'iso-2022-jp'?>}, |
2236 |
method => 'parse_xml_declaration', |
2237 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2238 |
result => 1, |
2239 |
}, |
2240 |
{ |
2241 |
t => q{<?xml version="1.0" encoding = 'iso-2022-jp'?>}, |
2242 |
method => 'parse_xml_declaration', |
2243 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2244 |
result => 1, |
2245 |
}, |
2246 |
{ |
2247 |
t => q{<?xml version="1.0" encoding = 'iso-2022-jp'?>}, |
2248 |
method => 'parse_xml_declaration', |
2249 |
option => {ExpandedURI q<allow-xml-declaration> => 1, |
2250 |
ExpandedURI q<allow-text-declaration> => 1}, |
2251 |
result => 1, |
2252 |
}, |
2253 |
|
2254 |
{ |
2255 |
t => q{<?xml version="1.0" encoding = 'UTF-8' standalone="yes" ?>}, |
2256 |
method => 'parse_xml_declaration', |
2257 |
option => {ExpandedURI q<allow-xml-declaration> => 1, |
2258 |
ExpandedURI q<allow-text-declaration> => 1}, |
2259 |
result => 1, |
2260 |
}, |
2261 |
{ |
2262 |
t => q{<?xml version="1.0" encoding = 'UTF-8' standalone="no" ?>}, |
2263 |
method => 'parse_xml_declaration', |
2264 |
option => {ExpandedURI q<allow-xml-declaration> => 1, |
2265 |
ExpandedURI q<allow-text-declaration> => 1}, |
2266 |
result => 1, |
2267 |
}, |
2268 |
{ |
2269 |
t => q{<?xml version="1.0" encoding = 'UTF-8' standalone="no" ?>}, |
2270 |
method => 'parse_xml_declaration', |
2271 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2272 |
result => q(0:39:SYNTAX_XML_STANDALONE), |
2273 |
}, |
2274 |
{ |
2275 |
t => q{<?xml version="1.0" encoding = 'UTF-8' standalone="unknown" ?>}, |
2276 |
method => 'parse_xml_declaration', |
2277 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2278 |
result => q(0:51:SYNTAX_XML_STANDALONE_INVALID), |
2279 |
}, |
2280 |
{ |
2281 |
t => qq{<?xml version="1.1" encoding = 'UTF-8' \tstandalone="no" ?>}, |
2282 |
method => 'parse_xml_declaration', |
2283 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2284 |
result => q(0:38:SYNTAX_XML_STANDALONE_S), |
2285 |
}, |
2286 |
{ |
2287 |
t => qq{<?xml standalone = "yes" ?>}, |
2288 |
method => 'parse_xml_declaration', |
2289 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2290 |
result => q(0:6:SYNTAX_XML_VERSION_REQUIRED), |
2291 |
}, |
2292 |
{ |
2293 |
t => qq{<?xml standalone = "yes" ?>}, |
2294 |
method => 'parse_xml_declaration', |
2295 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2296 |
result => q(0:6:SYNTAX_XML_ENCODING_REQUIRED), |
2297 |
}, |
2298 |
{ |
2299 |
t => qq{<?xml encoding="iso-2022-jp" standalone = "yes" ?>}, |
2300 |
method => 'parse_xml_declaration', |
2301 |
option => {ExpandedURI q<allow-text-declaration> => 1}, |
2302 |
result => q(0:29:SYNTAX_XML_STANDALONE), |
2303 |
}, |
2304 |
{ |
2305 |
t => qq{<?xml version="1.1" encode="iso-2022-jp" ?>}, |
2306 |
method => 'parse_xml_declaration', |
2307 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2308 |
result => q(0:20:SYNTAX_XML_UNKNOWN_ATTR), |
2309 |
}, |
2310 |
{ |
2311 |
t => q{<?xml <#version="1.1" ?>}, |
2312 |
method => 'parse_xml_declaration', |
2313 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2314 |
result => q(0:6:SYNTAX_ATTR_SPEC_REQUIRED), |
2315 |
}, |
2316 |
{ |
2317 |
t => qq{<?xml version="&version;" ?>}, |
2318 |
method => 'parse_xml_declaration', |
2319 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2320 |
result => q(0:15:SYNTAX_XML_VERSION_INVALID), |
2321 |
}, |
2322 |
{ |
2323 |
t => q{<?xml version=" 1.1" ?>}, |
2324 |
method => 'parse_xml_declaration', |
2325 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2326 |
result => q(0:15:SYNTAX_XML_VERSION_INVALID), |
2327 |
}, |
2328 |
{ |
2329 |
t => qq{<?xml version="--" ?>}, |
2330 |
method => 'parse_xml_declaration', |
2331 |
option => {ExpandedURI q<allow-xml-declaration> => 1}, |
2332 |
result => q(0:15:SYNTAX_XML_VERSION_INVALID), |
2333 |
}, |
2334 |
|
2335 |
{ |
2336 |
t => q{<el>data</el>}, |
2337 |
method => 'parse_document_entity', |
2338 |
result => 1, |
2339 |
}, |
2340 |
{ |
2341 |
t => q{ |
2342 |
|
2343 |
<el>data</el> |
2344 |
|
2345 |
}, |
2346 |
method => 'parse_document_entity', |
2347 |
result => 1, |
2348 |
}, |
2349 |
{ |
2350 |
t => q{<?xml version="1.0"?> |
2351 |
|
2352 |
<el>data</el> |
2353 |
|
2354 |
}, |
2355 |
method => 'parse_document_entity', |
2356 |
result => 1, |
2357 |
}, |
2358 |
{ |
2359 |
t => q{<?xml version="1.0"?> |
2360 |
|
2361 |
<el>data</el> |
2362 |
<!-- |
2363 |
comment --> |
2364 |
}, |
2365 |
method => 'parse_document_entity', |
2366 |
result => 1, |
2367 |
}, |
2368 |
{ |
2369 |
t => q{<?xml-stylesheet href="1.0"?> |
2370 |
|
2371 |
<el>data</el> |
2372 |
<!-- |
2373 |
comment --> |
2374 |
}, |
2375 |
method => 'parse_document_entity', |
2376 |
result => 1, |
2377 |
}, |
2378 |
{ |
2379 |
t => q{<!DOCTYPE el []> |
2380 |
<el>data</el> |
2381 |
<!-- |
2382 |
comment --> |
2383 |
}, |
2384 |
method => 'parse_document_entity', |
2385 |
result => 1, |
2386 |
}, |
2387 |
{ |
2388 |
t => q{<el>a</el> |
2389 |
<el>data</el> |
2390 |
<!-- |
2391 |
comment --> |
2392 |
}, |
2393 |
method => 'parse_document_entity', |
2394 |
result => '1:0:SYNTAX_MULTIPLE_DOCUMENT_ELEMENTS', |
2395 |
}, |
2396 |
{ |
2397 |
t => q{a<el>a</el>}, |
2398 |
method => 'parse_document_entity', |
2399 |
result => '0:0:SYNTAX_CDATA_OUTSIDE_DOCUMENT_ELEMENT', |
2400 |
}, |
2401 |
{ |
2402 |
t => q{<el>a</el> |
2403 |
b}, |
2404 |
method => 'parse_document_entity', |
2405 |
result => '1:2:SYNTAX_CDATA_OUTSIDE_DOCUMENT_ELEMENT', |
2406 |
}, |
2407 |
{ |
2408 |
t => q{<el>a</el> |
2409 |
<?xml version="1.0"?>}, |
2410 |
method => 'parse_document_entity', |
2411 |
result => '1:2:SYNTAX_XML_DECLARATION_IN_MIDDLE', |
2412 |
}, |
2413 |
{ |
2414 |
t => q{ |
2415 |
<?xml version="1.0"?> <el/>}, |
2416 |
method => 'parse_document_entity', |
2417 |
result => '1:2:SYNTAX_XML_DECLARATION_IN_MIDDLE', |
2418 |
}, |
2419 |
{ |
2420 |
t => q{<!DOCTYPE el []> |
2421 |
<?xml version="1.0"?> <el/>}, |
2422 |
method => 'parse_document_entity', |
2423 |
result => '1:2:SYNTAX_XML_DECLARATION_IN_MIDDLE', |
2424 |
}, |
2425 |
{ |
2426 |
t => q{<el/><!DOCTYPE el []>}, |
2427 |
method => 'parse_document_entity', |
2428 |
result => '0:5:SYNTAX_MARKUP_DECLARATION_NOT_ALLOWED', |
2429 |
}, |
2430 |
{ |
2431 |
t => q{<el/><![IGNORE[]]>}, |
2432 |
method => 'parse_document_entity', |
2433 |
result => '0:5:SYNTAX_MARKED_SECTION_NOT_ALLOWED', |
2434 |
}, |
2435 |
{ |
2436 |
t => q{<el/>< }, |
2437 |
method => 'parse_document_entity', |
2438 |
result => '0:5:SYNTAX_CDATA_OUTSIDE_DOCUMENT_ELEMENT', |
2439 |
}, |
2440 |
{ |
2441 |
t => q{<!-- -->}, |
2442 |
method => 'parse_document_entity', |
2443 |
result => '0:8:SYNTAX_NO_DOCUMENT_ELEMENT', |
2444 |
}, |
2445 |
{ |
2446 |
t => q{<el><!-- -->}, |
2447 |
method => 'parse_document_entity', |
2448 |
result => '0:12:SYNTAX_END_TAG_REQUIRED', |
2449 |
}, |
2450 |
{ |
2451 |
t => q{<?xml?><el><!-- --></el>}, |
2452 |
method => 'parse_document_entity', |
2453 |
result => '0:5:SYNTAX_XML_VERSION_REQUIRED', |
2454 |
}, |
2455 |
|
2456 |
{ |
2457 |
entity => {f => q{baz}}, |
2458 |
t => q{<e>foo&f;bar</e>}, |
2459 |
method => 'parse_element', |
2460 |
result => 1, |
2461 |
}, |
2462 |
{ |
2463 |
entity => {f => q{baz<bar/>}}, |
2464 |
t => q{<e>foo&f;bar</e>}, |
2465 |
method => 'parse_element', |
2466 |
result => 1, |
2467 |
}, |
2468 |
{ |
2469 |
entity => {f => q{baz<bar>bar</bar>z}}, |
2470 |
t => q{<e>foo&f;bar</e>}, |
2471 |
method => 'parse_element', |
2472 |
result => 1, |
2473 |
}, |
2474 |
{ |
2475 |
entity => {f => q{baz&l;z}, l => q{foo}}, |
2476 |
t => q{<e>foo&f;bar</e>}, |
2477 |
method => 'parse_element', |
2478 |
result => 1, |
2479 |
}, |
2480 |
{ |
2481 |
entity => {f => q{baz<bar>bar</bar}}, |
2482 |
t => q{<e>foo&f;bar</e>}, |
2483 |
method => 'parse_element', |
2484 |
result => '0:16:SYNTAX_ETAGC_REQUIRED', |
2485 |
}, |
2486 |
{ |
2487 |
entity => {f => q{baz<bar>bar}}, |
2488 |
t => q{<e>foo&f;bar</e>}, |
2489 |
method => 'parse_element', |
2490 |
result => '0:11:SYNTAX_END_TAG_REQUIRED', |
2491 |
}, |
2492 |
{ |
2493 |
entity => {f => q{baz</bar>bar}}, |
2494 |
t => q{<e>foo&f;bar</e>}, |
2495 |
method => 'parse_element', |
2496 |
result => '0:3:SYNTAX_END_TAG_NOT_ALLOWED', |
2497 |
}, |
2498 |
{ |
2499 |
entity => {f => q{baz&bar}, bar => q<bar>}, |
2500 |
t => q{<e>foo&f;bar</e>}, |
2501 |
method => 'parse_element', |
2502 |
result => '0:7:SYNTAX_REFC_REQUIRED', |
2503 |
}, |
2504 |
{ |
2505 |
entity => {f => q{baz< bar}}, |
2506 |
t => q{<e>foo&f;bar</e>}, |
2507 |
method => 'parse_element', |
2508 |
result => '0:4:SYNTAX_ELEMENT_TYPE_NAME_FOLLOWING_STAGO_REQUIRED', |
2509 |
}, |
2510 |
{ |
2511 |
entity => {f => q{baz &g;bar}, g => {replace => q{fff}, external => 1}}, |
2512 |
t => q{<e>foo&f;bar</e>}, |
2513 |
method => 'parse_element', |
2514 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2515 |
ExpandedURI q<use-reference> => 1}, |
2516 |
result => 1, |
2517 |
}, |
2518 |
{ |
2519 |
entity => {f => q{baz &g;bar}, g => {unparsed => 1, external => 1}}, |
2520 |
t => q{<e>foo&f;bar</e>}, |
2521 |
method => 'parse_element', |
2522 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2523 |
ExpandedURI q<use-reference> => 1}, |
2524 |
result => '0:5:WFC_PARSED_ENTITY', |
2525 |
}, |
2526 |
{ |
2527 |
entity => {f => q{baz &f;bar}}, |
2528 |
t => q{<e>foo&f;bar</e>}, |
2529 |
method => 'parse_element', |
2530 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2531 |
ExpandedURI q<use-reference> => 1}, |
2532 |
result => '0:5:WFC_NO_RECURSION', |
2533 |
}, |
2534 |
{ |
2535 |
entity => {f => q{baz &g;bar}, g => q{foo &f;bar}}, |
2536 |
t => q{<e>foo&f;bar</e>}, |
2537 |
method => 'parse_element', |
2538 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2539 |
ExpandedURI q<use-reference> => 1}, |
2540 |
result => '0:5:WFC_NO_RECURSION', |
2541 |
}, |
2542 |
{ |
2543 |
entity => {f => {replace => q{baz bar}, externally => 1}}, |
2544 |
t => q{<e>foo&f;bar</e>}, |
2545 |
method => 'parse_element', |
2546 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2547 |
ExpandedURI q<use-reference> => 1, |
2548 |
ExpandedURI q<test:standalone> => 1}, |
2549 |
result => '0:7:WFC_ENTITY_DECLARED__INTERNAL', |
2550 |
}, |
2551 |
{ |
2552 |
entity => {f => {replace => q{baz bar}, externally => 1}}, |
2553 |
t => q{<e>foo&f;bar</e>}, |
2554 |
method => 'parse_element', |
2555 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2556 |
ExpandedURI q<use-reference> => 1, |
2557 |
ExpandedURI q<test:standalone> => 0}, |
2558 |
result => 1, |
2559 |
}, |
2560 |
|
2561 |
{ |
2562 |
entity => {f => q{baz bar}}, |
2563 |
t => q{"foo&f;bar"}, |
2564 |
method => 'parse_attribute_value_specification', |
2565 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2566 |
ExpandedURI q<use-reference> => 1}, |
2567 |
result => 1, |
2568 |
}, |
2569 |
{ |
2570 |
entity => {f => q{baz &g;bar}, g => q{fff}}, |
2571 |
t => q{"foo&f;bar"}, |
2572 |
method => 'parse_attribute_value_specification', |
2573 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2574 |
ExpandedURI q<use-reference> => 1}, |
2575 |
result => 1, |
2576 |
}, |
2577 |
{ |
2578 |
entity => {f => q{baz< bar}}, |
2579 |
t => q{'foo&f;bar'}, |
2580 |
method => 'parse_attribute_value_specification', |
2581 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2582 |
ExpandedURI q<use-reference> => 1}, |
2583 |
result => '0:3:WFC_NO_LESS_THAN_IN_ATTR_VAL', |
2584 |
}, |
2585 |
{ |
2586 |
entity => {f => q{baz &g;bar}, g => {replace => q{fff}, external => 1}}, |
2587 |
t => q{"foo&f;bar"}, |
2588 |
method => 'parse_attribute_value_specification', |
2589 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2590 |
ExpandedURI q<use-reference> => 1}, |
2591 |
result => '0:5:WFC_NO_EXTERNAL_ENTITY_REFERENCES', |
2592 |
}, |
2593 |
{ |
2594 |
entity => {f => q{baz &g;bar}, g => {unparsed => 1, external => 1}}, |
2595 |
t => q{"foo&f;bar"}, |
2596 |
method => 'parse_attribute_value_specification', |
2597 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2598 |
ExpandedURI q<use-reference> => 1}, |
2599 |
result => '0:5:WFC_NO_EXTERNAL_ENTITY_REFERENCES', |
2600 |
}, |
2601 |
{ |
2602 |
entity => {f => q{baz &f;bar}}, |
2603 |
t => q{"foo&f;bar"}, |
2604 |
method => 'parse_attribute_value_specification', |
2605 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2606 |
ExpandedURI q<use-reference> => 1}, |
2607 |
result => '0:5:WFC_NO_RECURSION', |
2608 |
}, |
2609 |
{ |
2610 |
entity => {f => q{baz &g;bar}, g => q{foo &f;bar}}, |
2611 |
t => q{"foo&f;bar"}, |
2612 |
method => 'parse_attribute_value_specification', |
2613 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2614 |
ExpandedURI q<use-reference> => 1}, |
2615 |
result => '0:5:WFC_NO_RECURSION', |
2616 |
}, |
2617 |
{ |
2618 |
entity => {f => {replace => q{baz bar}, externally => 1}}, |
2619 |
t => q{"foo&f;bar"}, |
2620 |
method => 'parse_attribute_value_specification', |
2621 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2622 |
ExpandedURI q<use-reference> => 1, |
2623 |
ExpandedURI q<test:standalone> => 1}, |
2624 |
result => '0:5:WFC_ENTITY_DECLARED__INTERNAL', |
2625 |
}, |
2626 |
{ |
2627 |
entity => {f => {replace => q{baz bar}, externally => 1}}, |
2628 |
t => q{"foo&f;bar"}, |
2629 |
method => 'parse_attribute_value_specification', |
2630 |
option => {ExpandedURI q<allow-general-entity-reference> => 1, |
2631 |
ExpandedURI q<use-reference> => 1, |
2632 |
ExpandedURI q<test:standalone> => 0}, |
2633 |
result => 1, |
2634 |
}, |
2635 |
|
2636 |
{ |
2637 |
t => q{<?xml version="1.0"?> <doc/>}, |
2638 |
method => 'parse_document_entity', |
2639 |
result => 1, |
2640 |
}, |
2641 |
{ |
2642 |
t => q{<?xml version="1.1"?> <doc/>}, |
2643 |
method => 'parse_document_entity', |
2644 |
result => 1, |
2645 |
}, |
2646 |
{ |
2647 |
t => qq{<?xml version="1.1"?> \x85 <doc/>}, |
2648 |
method => 'parse_document_entity', |
2649 |
result => 1, |
2650 |
}, |
2651 |
{ |
2652 |
t => qq{<?xml version="1.0"?> \x85 <doc/>}, |
2653 |
method => 'parse_document_entity', |
2654 |
result => q<0:22:SYNTAX_CDATA_OUTSIDE_DOCUMENT_ELEMENT>, |
2655 |
}, |
2656 |
{ |
2657 |
t => qq{<?xml version="1.1"?> \x{2028} <doc/>}, |
2658 |
method => 'parse_document_entity', |
2659 |
result => 1, |
2660 |
}, |
2661 |
{ |
2662 |
t => qq{<?xml version="1.0"?> \x{2028} <doc/>}, |
2663 |
method => 'parse_document_entity', |
2664 |
result => q<0:22:SYNTAX_CDATA_OUTSIDE_DOCUMENT_ELEMENT>, |
2665 |
}, |
2666 |
{ |
2667 |
t => qq{<?xml version="1.0" \x85 ?> <doc/>}, |
2668 |
method => 'parse_document_entity', |
2669 |
result => q<0:0:FATAL_NEW_NL_IN_XML_DECLARATION>, |
2670 |
}, |
2671 |
|
2672 |
{ |
2673 |
t => qq{<?xml version="1.1"?>\x00 <doc/>}, |
2674 |
method => 'parse_document_entity', |
2675 |
result => q<0:21:SYNTAX_NOT_IN_CHAR>, |
2676 |
}, |
2677 |
{ |
2678 |
t => qq{<?xml version="1.1"?>\x01 <doc/>}, |
2679 |
method => 'parse_document_entity', |
2680 |
result => q<0:21:SYNTAX_RESTRICTED_CHAR>, |
2681 |
}, |
2682 |
{ |
2683 |
t => qq{<?xml version="1.1"?>\x81 <doc/>}, |
2684 |
method => 'parse_document_entity', |
2685 |
result => q<0:21:SYNTAX_RESTRICTED_CHAR>, |
2686 |
}, |
2687 |
{ |
2688 |
t => qq{<?xml version="1.0"?>\x01 <doc/>}, |
2689 |
method => 'parse_document_entity', |
2690 |
result => q<0:21:SYNTAX_NOT_IN_CHAR>, |
2691 |
}, |
2692 |
|
2693 |
{ |
2694 |
t => qq{<e a="�"/>}, |
2695 |
method => 'parse_element', |
2696 |
result => q<0:6:WFC_LEGAL_CHARACTER>, |
2697 |
}, |
2698 |
{ |
2699 |
t => qq{<e a="�"/>}, |
2700 |
method => 'parse_element', |
2701 |
result => q<0:6:WFC_LEGAL_CHARACTER>, |
2702 |
}, |
2703 |
{ |
2704 |
t => qq{<e>a="�"</e>}, |
2705 |
method => 'parse_element', |
2706 |
result => q<0:6:WFC_LEGAL_CHARACTER>, |
2707 |
}, |
2708 |
{ |
2709 |
t => qq{<e>a="�"</e>}, |
2710 |
method => 'parse_element', |
2711 |
result => q<0:6:WFC_LEGAL_CHARACTER>, |
2712 |
}, |
2713 |
{ |
2714 |
t => qq{<!ENTITY e "�">}, |
2715 |
method => 'parse_entity_declaration', |
2716 |
result => q<0:12:WFC_LEGAL_CHARACTER>, |
2717 |
}, |
2718 |
{ |
2719 |
t => qq{<!ENTITY e "�">}, |
2720 |
method => 'parse_entity_declaration', |
2721 |
result => q<0:12:WFC_LEGAL_CHARACTER>, |
2722 |
}, |
2723 |
|
2724 |
{ |
2725 |
entity => {f => {replace => q<bar>}}, |
2726 |
t => qq{<!ENTITY e "%f;">}, |
2727 |
method => 'parse_entity_declaration', |
2728 |
result => 1, |
2729 |
}, |
2730 |
{ |
2731 |
entity => {f => {replace => q<%bar;>}, bar => {replace => q<bar>}}, |
2732 |
t => qq{<!ENTITY e "%f;">}, |
2733 |
method => 'parse_entity_declaration', |
2734 |
result => 1, |
2735 |
}, |
2736 |
{ |
2737 |
entity => {f => {replace => q<%bar;>}, bar => [undef]}, |
2738 |
t => qq{<!ENTITY e "%f;">}, |
2739 |
method => 'parse_entity_declaration', |
2740 |
result => 1, |
2741 |
}, |
2742 |
{ |
2743 |
entity => {f => {replace => q<%bar;>}, bar => [undef]}, |
2744 |
t => qq{<!ENTITY e "%f;">}, |
2745 |
method => 'parse_entity_declaration', |
2746 |
option => {ExpandedURI q<test:standalone> => 1}, |
2747 |
result => 1, |
2748 |
}, |
2749 |
{ |
2750 |
entity => {f => {replace => q<%bar;>}, bar => {replace => q<>, |
2751 |
externally => 1}}, |
2752 |
t => qq{<!ENTITY e "%f;">}, |
2753 |
method => 'parse_entity_declaration', |
2754 |
option => {ExpandedURI q<test:standalone> => 1}, |
2755 |
result => 1, |
2756 |
}, |
2757 |
{ |
2758 |
entity => {f => {replace => q<%f;>}}, |
2759 |
t => qq{<!ENTITY e "%f;">}, |
2760 |
method => 'parse_entity_declaration', |
2761 |
option => {ExpandedURI q<test:standalone> => 1}, |
2762 |
result => 1, |
2763 |
}, |
2764 |
{ |
2765 |
entity => {f => {replace => q<%g;>}, g => {replace => q<%f;>}}, |
2766 |
t => qq{<!ENTITY e "%f;">}, |
2767 |
method => 'parse_entity_declaration', |
2768 |
option => {ExpandedURI q<test:standalone> => 1}, |
2769 |
result => 1, |
2770 |
}, |
2771 |
{ |
2772 |
entity => {f => {replace => q<g;>, unparsed => 1}}, |
2773 |
t => qq{<!ENTITY e "%f;">}, |
2774 |
method => 'parse_entity_declaration', |
2775 |
option => {ExpandedURI q<test:standalone> => 1}, |
2776 |
result => '0:13:WFC_PARSED_ENTITY', |
2777 |
}, |
2778 |
|
2779 |
{ |
2780 |
entity => {g => {replace => q<<!-- comment -->>}}, |
2781 |
t => qq{<!ENTITY e "f"> %g;}, |
2782 |
method => 'parse_doctype_subset', |
2783 |
result => 1, |
2784 |
}, |
2785 |
{ |
2786 |
entity => {g => {replace => q<<!-- comment -->>, unparsed => 1}}, |
2787 |
t => qq{<!ENTITY e "f"> %g;}, |
2788 |
method => 'parse_doctype_subset', |
2789 |
result => '0:17:WFC_PARSED_ENTITY', |
2790 |
}, |
2791 |
{ |
2792 |
entity => {g => {replace => q<<!-- comment --> %g;>}}, |
2793 |
t => qq{<!ENTITY e "f"> %g;}, |
2794 |
method => 'parse_doctype_subset', |
2795 |
result => '0:18:WFC_NO_RECURSION', |
2796 |
}, |
2797 |
{ |
2798 |
entity => {g => {replace => q<<!-- comment --> %h;>}, h => q<<!-- --> %g;>}, |
2799 |
t => qq{<!ENTITY e "f"> %g;}, |
2800 |
method => 'parse_doctype_subset', |
2801 |
result => '0:10:WFC_NO_RECURSION', |
2802 |
}, |
2803 |
{ |
2804 |
entity => {g => {replace => q<<!-- comment -->>, externally => 1}}, |
2805 |
t => qq{<!ENTITY e "f"> %g;}, |
2806 |
method => 'parse_doctype_subset', |
2807 |
result => 1, |
2808 |
}, |
2809 |
{ |
2810 |
entity => {g => {replace => q<<!-- comment -->>, externally => 1}}, |
2811 |
t => qq{<!ENTITY e "f"> %g;}, |
2812 |
method => 'parse_doctype_subset', |
2813 |
option => {ExpandedURI q<test:standalone> => 1}, |
2814 |
result => '0:17:WFC_ENTITY_DECLARED__INTERNAL', |
2815 |
}, |
2816 |
|
2817 |
{ |
2818 |
entity => {g => {replace => q<"!-- comment --">}}, |
2819 |
t => qq{<!ENTITY e %g;>}, |
2820 |
method => 'parse_doctype_subset', |
2821 |
result => 1, |
2822 |
}, |
2823 |
{ |
2824 |
entity => {g => {replace => q<"!-- comment --">, unparsed => 1}}, |
2825 |
t => qq{<!ENTITY e %g;>}, |
2826 |
method => 'parse_doctype_subset', |
2827 |
result => '0:12:WFC_PARSED_ENTITY', |
2828 |
}, |
2829 |
{ |
2830 |
entity => {g => {replace => q<%g;>}}, |
2831 |
t => qq{<!ENTITY e %g;>}, |
2832 |
method => 'parse_doctype_subset', |
2833 |
result => '0:1:WFC_NO_RECURSION', |
2834 |
}, |
2835 |
{ |
2836 |
entity => {g => {replace => q<%h;>}, h => q<%g;>}, |
2837 |
t => qq{<!ENTITY e %g;>}, |
2838 |
method => 'parse_doctype_subset', |
2839 |
result => '0:1:WFC_NO_RECURSION', |
2840 |
}, |
2841 |
{ |
2842 |
entity => {g => {replace => q<%h;>}, h => q<"%g;">}, |
2843 |
t => qq{<!ENTITY e %g;>}, |
2844 |
method => 'parse_doctype_subset', |
2845 |
result => '0:2:WFC_NO_RECURSION', |
2846 |
}, |
2847 |
{ |
2848 |
entity => {g => {replace => q<"!-- comment --">, externally => 1}}, |
2849 |
t => qq{<!ENTITY e %g;>}, |
2850 |
method => 'parse_doctype_subset', |
2851 |
result => 1, |
2852 |
}, |
2853 |
{ |
2854 |
entity => {g => {replace => q<"!-- comment --">, externally => 1}}, |
2855 |
t => qq{<!ENTITY e %g;>}, |
2856 |
method => 'parse_doctype_subset', |
2857 |
option => {ExpandedURI q<test:standalone> => 1, |
2858 |
ExpandedURI q<allow-param-entref> => 1}, |
2859 |
result => '0:12:WFC_ENTITY_DECLARED__INTERNAL', |
2860 |
}, |
2861 |
{ |
2862 |
entity => {g => {replace => q<%g>}}, |
2863 |
t => qq{<!ENTITY e %g;>}, |
2864 |
method => 'parse_doctype_subset', |
2865 |
result => '0:1:WFC_NO_RECURSION', |
2866 |
}, |
2867 |
{ |
2868 |
entity => {g => {replace => q<%h>}, h => {replace => q<>, unparsed => 1}}, |
2869 |
t => qq{<!ENTITY e %g;>}, |
2870 |
method => 'parse_doctype_subset', |
2871 |
result => '0:2:SYNTAX_REFC_REQUIRED', |
2872 |
}, |
2873 |
|
2874 |
{ |
2875 |
entity => {g => {replace => q<>}}, |
2876 |
t => qq{<!ENTITY e %g; "text">}, |
2877 |
method => 'parse_doctype_subset', |
2878 |
result => 1, |
2879 |
}, |
2880 |
{ |
2881 |
entity => {g => {replace => q<%h;>}, h => {replace => q<>}}, |
2882 |
t => qq{<!ENTITY e %g; "text">}, |
2883 |
method => 'parse_doctype_subset', |
2884 |
result => 1, |
2885 |
}, |
2886 |
{ |
2887 |
entity => {g => {replace => q<>}}, |
2888 |
t => qq{%g; <!ENTITY e "text">}, |
2889 |
method => 'parse_doctype_subset', |
2890 |
result => 1, |
2891 |
}, |
2892 |
{ |
2893 |
entity => {g => {replace => q<%h;>}, h => {replace => q<>}}, |
2894 |
t => qq{%g; <!ENTITY e "text">}, |
2895 |
method => 'parse_doctype_subset', |
2896 |
result => 1, |
2897 |
}, |
2898 |
|
2899 |
{ |
2900 |
t => qq{<ee>aa</ee>}, |
2901 |
method => 'parse_element', |
2902 |
result => 1, |
2903 |
}, |
2904 |
{ |
2905 |
t => qq{<ee\x{4E00}>U+4E00</ee\x{4E00}>}, |
2906 |
method => 'parse_element', |
2907 |
result => 1, |
2908 |
}, |
2909 |
{ |
2910 |
t => qq{<ee\x{4DFF}>U+4DFF</ee\x{4DFF}>}, |
2911 |
method => 'parse_element', |
2912 |
result => '0:3:SYNTAX_STAGC_OR_NESTC_REQUIRED', |
2913 |
}, |
2914 |
{ |
2915 |
t => qq{<?xml version="1.1"?> |
2916 |
<ee\x{4DFF}>U+4DFF</ee\x{4DFF}>}, |
2917 |
method => 'parse_document_entity', |
2918 |
result => 1, |
2919 |
}, |
2920 |
{ |
2921 |
t => qq{<?xml version="1.0"?> |
2922 |
<ee>AA\x{4DFF}</ee>}, |
2923 |
method => 'parse_document_entity', |
2924 |
result => 1, |
2925 |
}, |
2926 |
{ |
2927 |
t => qq{<?xml version="1.1"?> |
2928 |
<ee>AA\x{4DFF}</ee>}, |
2929 |
method => 'parse_document_entity', |
2930 |
result => 1, |
2931 |
}, |
2932 |
{ |
2933 |
t => qq{<?xml version="1.0"?> |
2934 |
<ee \x{4DFF}="a">AA</ee>}, |
2935 |
method => 'parse_document_entity', |
2936 |
result => '1:14:SYNTAX_STAGC_OR_NESTC_REQUIRED', |
2937 |
}, |
2938 |
{ |
2939 |
t => qq{<?xml version="1.1"?> |
2940 |
<ee \x{4DFF}="a">AA</ee>}, |
2941 |
method => 'parse_document_entity', |
2942 |
result => 1, |
2943 |
}, |
2944 |
{ |
2945 |
t => qq{<?xml version="1.0"?> |
2946 |
<ee a\x{4DFF}="a">AA</ee>}, |
2947 |
method => 'parse_document_entity', |
2948 |
result => '1:15:SYNTAX_VI_REQUIRED', |
2949 |
}, |
2950 |
{ |
2951 |
t => qq{<?xml version="1.1"?> |
2952 |
<ee a\x{4DFF}="a">AA</ee>}, |
2953 |
method => 'parse_document_entity', |
2954 |
result => 1, |
2955 |
}, |
2956 |
{ |
2957 |
t => qq{<?xml version="1.0"?> |
2958 |
<ee \x{4DFF}a="a">AA</ee>}, |
2959 |
method => 'parse_document_entity', |
2960 |
result => '1:14:SYNTAX_STAGC_OR_NESTC_REQUIRED', |
2961 |
}, |
2962 |
{ |
2963 |
t => qq{<?xml version="1.1"?> |
2964 |
<ee \x{4DFF}a="a">AA</ee>}, |
2965 |
method => 'parse_document_entity', |
2966 |
result => 1, |
2967 |
}, |
2968 |
{ |
2969 |
t => qq{<?xml version="1.0"?> |
2970 |
<!DOCTYPE \x{4DFF}a [ |
2971 |
<!ELEMENT \x{4DFF}a EMPTY> |
2972 |
]> |
2973 |
<\x{4DFF}a/>}, |
2974 |
method => 'parse_document_entity', |
2975 |
result => '1:20:SYNTAX_DOCTYPE_NAME_REQUIRED', |
2976 |
}, |
2977 |
{ |
2978 |
t => qq{<?xml version="1.1"?> |
2979 |
<!DOCTYPE \x{4DFF}a [ |
2980 |
<!ELEMENT \x{4DFF}a EMPTY> |
2981 |
]> |
2982 |
<\x{4DFF}a/>}, |
2983 |
method => 'parse_document_entity', |
2984 |
result => 1, |
2985 |
}, |
2986 |
{ |
2987 |
t => qq{<?xml version="1.0"?> |
2988 |
<!DOCTYPE \x{4EFF}a [ |
2989 |
<!ELEMENT \x{4EFF}a (\x{4DFF}a)> |
2990 |
]> |
2991 |
<\x{4EFF}a/>}, |
2992 |
method => 'parse_document_entity', |
2993 |
result => '2:26:SYNTAX_MODEL_GROUP_ITEM_REQUIRED', |
2994 |
}, |
2995 |
|
2996 |
{ |
2997 |
t => qq{<?xml version="1.0" encoding="utf-8"?> |
2998 |
<!DOCTYPE \x{4EFF}a [ |
2999 |
<!ELEMENT \x{4EFF}a (\x{4DFF}a)> |
3000 |
]> |
3001 |
<\x{4EFF}a/>}, |
3002 |
method => 'parse_external_parsed_entity', |
3003 |
result => 1, |
3004 |
}, |
3005 |
{ |
3006 |
t => qq{<?xml version="1.1" encoding="utf-8"?> |
3007 |
<!DOCTYPE \x{4EFF}a [ |
3008 |
<!ELEMENT \x{4EFF}a (\x{4DFF}a)> |
3009 |
]><!-- |
3010 |
<\x{4EFF}a/>}, |
3011 |
method => 'parse_external_parsed_entity', |
3012 |
result => 1, |
3013 |
}, |
3014 |
{ |
3015 |
t => qq{<?xml version="1.1"?> |
3016 |
<!DOCTYPE \x{4EFF}a [ |
3017 |
<!ELEMENT \x{4EFF}a (\x{4DFF}a)> |
3018 |
]><!-- |
3019 |
<\x{4EFF}a/>}, |
3020 |
method => 'parse_external_parsed_entity', |
3021 |
result => '0:19:SYNTAX_XML_ENCODING_REQUIRED', |
3022 |
}, |
3023 |
|
3024 |
{ |
3025 |
t => q{<e a="b" a="c"/>}, |
3026 |
method => 'parse_element', |
3027 |
result => '0:9:WFC_UNIQUE_ATT_SPEC', |
3028 |
}, |
3029 |
{ |
3030 |
t => q{<e ba="b" ba="c"/>}, |
3031 |
method => 'parse_element', |
3032 |
result => '0:10:WFC_UNIQUE_ATT_SPEC', |
3033 |
}, |
3034 |
|
3035 |
{ |
3036 |
t => q{<e>aa]]>bb</e>}, |
3037 |
method => 'parse_element', |
3038 |
result => '0:7:SYNTAX_MSE', |
3039 |
}, |
3040 |
); |
3041 |
|
3042 |
plan tests => scalar @a; |
3043 |
|
3044 |
my $first_error; |
3045 |
my $first_error_detail; |
3046 |
my $parser = new test_parser; |
3047 |
$parser->{error}->{option}->{report} = sub { |
3048 |
my $err = shift; |
3049 |
$err->{-object}->set_position ($err->{source}, diff => $err->{position_diff}); |
3050 |
unless ($first_error) { |
3051 |
$first_error = join ':', $err->{-object}->get_position ($err->{source}), |
3052 |
$err->{-type}; |
3053 |
$first_error_detail = $err->stringify; |
3054 |
} |
3055 |
}; |
3056 |
for (@a) { |
3057 |
$first_error = ''; |
3058 |
$first_error_detail = ''; |
3059 |
my $method = $_->{method}; |
3060 |
pos ($_->{t}) = 0; |
3061 |
$parser->reset; |
3062 |
$parser->{ExpandedURI q<test:entity>} = $_->{entity} || {}; |
3063 |
$_->{option} ||= { |
3064 |
ExpandedURI q<allow-declaration>=>{qw/DOCTYPE 1 ENTITY 1 ELEMENT 1 NOTATION 1 ATTLIST 1 comment 1 section 1/}, |
3065 |
ExpandedURI q<allow-param-entref> => 1, |
3066 |
ExpandedURI q<use-reference> => 1, |
3067 |
}; |
3068 |
$parser->{ExpandedURI q<is-standalone>} |
3069 |
= $_->{option}->{ExpandedURI q<test:standalone>}; |
3070 |
$parser->$method (\$_->{t}, {}, %{$_->{option}}); |
3071 |
ok $first_error || 1, $_->{result}, $first_error_detail; |
3072 |
} |
3073 |
|
3074 |
package test_parser; |
3075 |
BEGIN { |
3076 |
push our @ISA, 'Message::Markup::XML::Parser::Base'; |
3077 |
use Message::Util::QName::General [qw/ExpandedURI/], $main::NS; |
3078 |
} |
3079 |
|
3080 |
sub general_entity_reference_in_attribute_value_literal_start ($$$$%) { |
3081 |
my ($self, $src, $p, $pp, %opt) = @_; |
3082 |
return if $pp->{ExpandedURI q<entity-opened>}; |
3083 |
for my $reptxt ($self->{ExpandedURI q<test:entity>} |
3084 |
->{${$pp->{ExpandedURI q<entity-name>}}}) { |
3085 |
if (ref $reptxt eq 'HASH') { |
3086 |
pos $reptxt->{replace} = 0 if defined $reptxt->{replace}; |
3087 |
push @{$opt{ExpandedURI q<source>}}, \($reptxt->{replace}); |
3088 |
$self->{error}->set_flag |
3089 |
(\($reptxt->{replace}), |
3090 |
ExpandedURI q<is-external-entity> => $reptxt->{external}); |
3091 |
$self->{error}->set_flag |
3092 |
(\($reptxt->{replace}), |
3093 |
ExpandedURI q<is-unparsed-entity> => $reptxt->{unparsed}); |
3094 |
$self->{error}->set_flag |
3095 |
(\($reptxt->{replace}), |
3096 |
ExpandedURI q<is-declared-externally> => $reptxt->{externally}); |
3097 |
} elsif (ref $reptxt) { |
3098 |
next; |
3099 |
} elsif (not defined $reptxt) { |
3100 |
warn "Entity ${$pp->{ExpandedURI q<entity-name>}} not defined"; |
3101 |
} else { |
3102 |
pos $reptxt = 0; |
3103 |
push @{$opt{ExpandedURI q<source>}}, \$reptxt; |
3104 |
} |
3105 |
} |
3106 |
} |
3107 |
BEGIN { |
3108 |
*general_entity_reference_in_content_start |
3109 |
= \&general_entity_reference_in_attribute_value_literal_start; |
3110 |
*parameter_entity_reference_in_rpdata_start |
3111 |
= \&general_entity_reference_in_attribute_value_literal_start; |
3112 |
*parameter_entity_reference_in_subset_start |
3113 |
= \&general_entity_reference_in_attribute_value_literal_start; |
3114 |
*parameter_entity_reference_in_parameter_start |
3115 |
= \&general_entity_reference_in_attribute_value_literal_start; |
3116 |
} |