/[suikacvs]/messaging/manakai/lib/Message/DOM/XMLParser.dis
Suika

Contents of /messaging/manakai/lib/Message/DOM/XMLParser.dis

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.23 - (show annotations) (download)
Mon Feb 13 17:03:22 2006 UTC (20 years, 6 months ago) by wakaba
Branch: MAIN
Changes since 1.22: +423 -9 lines
++ manakai/lib/Message/DOM/ChangeLog	13 Feb 2006 17:03:12 -0000
2006-02-14  Wakaba  <wakaba@suika.fam.cx>

	* XMLParser.dis: The |xp:wf-parsed-entity| and the |xp:wf-no-recursion|
	WFC errors are implemented.  Reports a |xp:wf-syntax-error|
	if a parameter entity declaration contains |NDATA| keyword.
	(setEmptyEntityState): Set |name| attribute.

	* Tree.dis (createEntityReference): Don't enter into inifinite
	loop even if entity replacement tree contains recursive
	reference directly or indirectly.

1 Module:
2 @QName: MDOM|XMLParser
3 @Namespace:
4 http://suika.fam.cx/~wakaba/archive/2004/dom/xml-parser#
5
6 @FullName:
7 @@lang:en
8 @@@: XML Parser
9
10 @DISCore:author: DISCore|Wakaba
11 @License: license|Perl+MPL
12 @Date:
13 $Date: 2006/02/13 10:42:15 $
14
15 @DefaultFor: ManakaiDOM|ManakaiDOMLatest
16
17 @Require:
18 @@Module:
19 @@@QName: MDOM|DOMLS
20 @@@WithFor: ManakaiDOM|ManakaiDOMLatest
21 @@Module:
22 @@@QName: MDOM|XDoctype
23 @@@WithFor: ManakaiDOM|ManakaiDOMLatest
24
25 Namespace:
26 @c:
27 http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#
28 @cfg:
29 http://suika.fam.cx/www/2006/dom-config/
30 @d:
31 http://suika.fam.cx/~wakaba/archive/2004/dom/xdt#
32 @dis:
33 http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis--
34 @dtest:
35 http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/DIS#Test/
36 @dx:
37 http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#
38 @ecore:
39 http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/Core/
40 @f:
41 http://suika.fam.cx/~wakaba/archive/2004/dom/feature#
42 @fe:
43 http://suika.fam.cx/www/2006/feature/
44 @gls:
45 http://suika.fam.cx/~wakaba/archive/2004/dom/gls#
46 @idl:
47 http://suika.fam.cx/~wakaba/archive/2004/dis/IDL#
48 @infoset:
49 http://www.w3.org/2001/04/infoset#
50 @lang:
51 http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#
52 @license:
53 http://suika.fam.cx/~wakaba/archive/2004/8/18/license#
54 @LSEV:
55 http://www.w3.org/2002/DOMLS
56 @ManakaiDOM:
57 http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#
58 @ManakaiDOMLS:
59 http://suika.fam.cx/~wakaba/archive/2004/mdom-ls#
60 @MDOM:
61 http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.
62 @MDOMX:
63 http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#
64 @mn:
65 http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/ManakaiNode#
66 @rdf:
67 http://www.w3.org/1999/02/22-rdf-syntax-ns#
68 @rdfs:
69 http://www.w3.org/2000/01/rdf-schema#
70 @t:
71 http://suika.fam.cx/~wakaba/archive/2004/dom/tree#
72 @test:
73 http://suika.fam.cx/~wakaba/archive/2004/dis/Test#
74 @x:
75 http://suika.fam.cx/~wakaba/archive/2004/dom/xml#
76 @xml:
77 http://www.w3.org/XML/1998/namespace
78 @xml-dtd:
79 http://www.w3.org/TR/REC-xml
80 @xmlns:
81 http://www.w3.org/2000/xmlns/
82 @xp:
83 http://suika.fam.cx/~wakaba/archive/2004/dom/xml-parser#
84
85 ## -- Features
86
87 ElementTypeBinding:
88 @Name: FeatureDef
89 @ElementType:
90 dis:ResourceDef
91 @ShadowContent:
92 @@rdf:type: f|Feature
93 @@For: =ManakaiDOM|all
94
95 ElementTypeBinding:
96 @Name: FeatureVerDef
97 @ElementType:
98 dis:ResourceDef
99 @ShadowContent:
100 @@rdf:type: f|Feature
101
102 ElementTypeBinding:
103 @Name: featureQName
104 @ElementType:
105 f:name
106 @ShadowContent:
107 @@ContentType: DISCore|QName
108
109 ResourceDef:
110 @QName: DOMString
111 @AliasFor: DOMMain|DOMString
112 @For: ManakaiDOM|DOM
113
114 ResourceDef:
115 @QName: Node
116 @AliasFor: t|Node
117 @For: ManakaiDOM|DOM
118
119 ResourceDef:
120 @QName: Element
121 @AliasFor: t|Element
122 @For: ManakaiDOM|DOM
123
124 ResourceDef:
125 @QName: Document
126 @AliasFor: t|Document
127 @For: ManakaiDOM|DOM
128
129 ResourceDef:
130 @QName: DocumentXDoctype
131 @AliasFor: d|DocumentXDoctype
132 @For: ManakaiDOM|DOM
133
134 ResourceDef:
135 @QName: DTDef
136 @AliasFor: d|DocumentTypeDefinition
137 @For: ManakaiDOM|DOM
138
139 ResourceDef:
140 @QName: ETDef
141 @AliasFor: d|ElementTypeDefinition
142 @For: ManakaiDOM|DOM
143
144 ResourceDef:
145 @QName: ATDef
146 @AliasFor: d|AttributeDefinition
147 @For: ManakaiDOM|DOM
148
149 ElementTypeBinding:
150 @Name: ClsDef
151 @ElementType:
152 dis:ResourceDef
153 @ShadowContent:
154 @@rdf:type:
155 @@@@: dis|MultipleResource
156 @@@ForCheck: !ManakaiDOM|ForIF !ManakaiDOM|ForClass
157 @@resourceFor:
158 @@@@: ManakaiDOM|ForClass
159 @@@ForCheck: ManakaiDOM|ManakaiDOM !=ManakaiDOM|ManakaiDOM
160 @@For: ManakaiDOM|DOM3
161 @@For: =ManakaiDOM|ManakaiDOM
162
163 @@rdf:type:
164 @@@@: DISLang|Class
165 @@@ForCheck: ManakaiDOM|ForClass
166
167 ElementTypeBinding:
168 @Name: ClsQName
169 @ElementType:
170 dis:QName
171 @ShadowContent:
172 @@ForCheck: ManakaiDOM|ForClass
173
174 ElementTypeBinding:
175 @Name: ClsISA
176 @ElementType:
177 dis:ISA
178 @ShadowContent:
179 @@ForCheck: ManakaiDOM|ForClass
180
181 ElementTypeBinding:
182 @Name: nullCase
183 @ElementType:
184 dis:ResourceDef
185 @ShadowContent:
186 @@rdf:type: ManakaiDOM|InCase
187 @@Value:
188 @@@is-null:1
189
190 ResourceDef:
191 @QName: LSParser
192 @AliasFor: DOMLS|LSParser
193 @For: ManakaiDOM|DOM3
194
195 ClsDef:
196 @ClsQName: ManakaiXMLParser
197
198 @Implement: DOMLS|LSParser
199
200 @f:implements:
201 @@@: DOMLS|LSFeature30
202 @@For: ManakaiDOM|DOM3
203
204 @DISLang:role: gls|ParserRole
205
206 @enDesc:
207 Note that the <Class::ManakaiXMLParser> reports any XML errors
208 (syntax errors and / or well-formedness constraint errors)
209 via the <IF::DOMCore:error-handler> registered to
210 the <A::DOMLS:LSParser.domConfig> object. Each error has
211 its <A::DOMCore:DOMError.severity>, either <C::DOMCore:SEVERITY_ERROR>
212 or <C::DOMCore:SEVERITY_FATAL_ERROR>. However, their semantics
213 are slight different from the ones of <QUOTE::error> and
214 <QUOTE::fatal error> in XML; in this implemenetation,
215 <C::DOMCore:SEVERITY_ERROR> implies that the parsing process
216 can effectively be continued to detect more errors while
217 <C::DOMCore:SEVERITY_FATAL_ERROR> implies that the error
218 is serious so that the result document tree and any errors
219 might be far from the ones obtained when the error would not
220 be found.
221
222 @Attr:
223 @@Name: domConfig
224 @@enDesc:
225 The configuration of the parser.
226
227 @@Get:
228 @@@Type: DOMCore|DOMConfiguration
229 @@@enDesc: The DOM configuration object.
230 @@@PerlDef:
231 __CODE{DOMCore|getConfigObject::
232 $target => $self,
233 $targetHash => $self,
234 $targetType => {<IFName::LSParser>},
235 $result => $r,
236 }__;
237
238 @Method:
239 @@ManakaiDOM:isForInternal:1
240 @@ForCheck: ManakaiDOM|ForClass
241 @@Operator: DISPerl|NewMethod
242 @@enDesc:
243 Creates a new instance of the object.
244 @@Param:
245 @@@Name: impl
246 @@@Type: gls|GLSImplementation
247 @@@enDesc:
248 The implementation from which the parser is created.
249 @@Param:
250 @@@Name: features
251 @@@Type: DOMString
252 @@@dis:actualType: f|FeaturesString
253 @@@enDesc:
254 The set of features requested for the parser.
255 @@Return:
256 @@@Type: DOMMain|DOMObject
257 @@@dis:actualType: LSParser
258 @@@enDesc:
259 The newly created parser.
260 @@@PerlDef:
261 $r = bless {
262 <H::DOMCore:implementation> => $impl,
263 }, $self;
264
265 @Method:
266 @@Name: parseString
267 @@enImplNote:
268 Non-standard - to be removed
269
270 @@Param:
271 @@@Name: sourceText
272 @@@Type: DOMString
273 @@Return:
274 @@@Type: Document
275 @@@PerlDef:
276
277 $self->{char} = [];
278 $self->{token} = [];
279 $self->{entity} = [{
280 reptxt => \$sourceText,
281 line => 1,
282 column => 1,
283 pos => 0,
284 }];
285 $self->{location} = $self->{entity}->[-1];
286 $self->{entity_char} = [];
287 $self->{entity_token} = [];
288 $self->{xml_version} = '1.0';
289 $self->{standalone} = false;
290 $self->{has_xref} = false;
291 $self->{general_entity} = {
292 lt => {is_predefined => true},
293 gt => {is_predefined => true},
294 amp => {is_predefined => true},
295 quot => {is_predefined => true},
296 apos => {is_predefined => true},
297 };
298 $self->{param_entity} = {};
299 $self->{attr} = {};
300 # $self->{attr}->{$element_type_name}->{$attr_name} = $attr_def
301
302 ## Well-formedness constraint Entity Declared takes effect?
303
304 __DEEP{
305 $r = $self->{<H::c|implementation>}-><M::DOMImpl.createDocument>;
306 $self->{doc} = $r;
307 $self->{doc_cfg} = $r-><AG::Document.domConfig>;
308 CORE::delete $self->{docx};
309 CORE::delete $self->{dtdef};
310 CORE::delete $self->{dtdecl};
311
312 $r-><AS::Document.strictErrorChecking> (false);
313 ## NOTE: Any checks such as |Name| validity done by
314 ## methods on DOM nodes are disabled. It might result
315 ## in creating an ill-formed DOM tree when parser
316 ## errors are traped by |error-handler|.
317 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
318 (<Q::cfg|entity-reference-read-only> => false);
319 ## NOTE: Turn this configuration parameter off is required
320 ## because entity reference subtree is created by
321 ## the parser rather than |createEntityReference|'s
322 ## cloning. Parser's |cfg:entity-reference-read-only|
323 ## configuration parameter controls whether generated
324 ## subtree is then marked as read-only or not.
325 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
326 (<Q::cfg|clone-entity-reference-subtree> => true);
327 ## NOTE: Turn this configuration parameter on makes
328 ## entity reference subtrees in attribute default values
329 ## cloned as is into default attribute node subtrees.
330
331 ## Document entity -> |Document| node
332 $self->_parse_DocumentEntity;
333
334 ## Replacement tree for general |Entity| nodes
335 my @ent = values %{$self->{general_entity}};
336 for my $ent (@ent) {
337 if (exists $ent->{has_replacement_text}) {
338 my $ent_name = $ent->{name};
339 $self->{entity} = [<Code::getCopyOfEntityState::
340 $entity_type = 'general_entity',
341 $entity_name = $ent_name>];
342 $self->{location} = $self->{entity}->[-1];
343 $self->{token} = [];
344 $self->{char} = [];
345 local $ent->{is_opened} = true;
346 ## TODO: External entity support
347 $self->_parse_InternalGeneralParsedEntity ($ent->{node});
348 $ent->{node}-><AS::x|Entity.hasReplacementTree> (true);
349 ## ISSUE: Should errors detected by this phase result
350 ## in |DOMLS:PARSE_ERR| exception thrown?
351 }
352 ## TODO: Read-only if configuration (for all entities)
353 }
354
355 ## Turns flags to their default value
356 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
357 (<Q::cfg|entity-reference-read-only> => null);
358 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
359 (<Q::cfg|clone-entity-reference-subtree> => null);
360 $r-><AS::Document.strictErrorChecking> (true);
361 }__;
362
363 @Method:
364 @@Name: shiftChar
365 @@ManakaiDOM:isForInternal:1
366 @@ForCheck: ManakaiDOM|ForClass
367 @@enDesc:
368 Returns the next character.
369 @@Return:
370 @@@Type: idl|long||ManakaiDOM|all
371 @@@enDesc:
372 The code position number of the next character, if any,
373 or <CODE::-1>.
374 @@@PerlDef:
375 if (@{$self->{char}}) {
376 $r = shift @{$self->{char}};
377 } else {
378 no warnings 'substr';
379 ## substr outside length warnings at the end of the string
380 GETCHAR: {
381 my $char = substr (${$self->{entity}->[-1]->{reptxt}},
382 $self->{entity}->[-1]->{pos}, 1);
383
384 if (defined $char and length $char) {
385 $self->{entity}->[-1]->{pos}++;
386 $r = ord $char;
387 if ($r == 0x000A) {
388 $self->{entity}->[-1]->{line}++;
389 $self->{entity}->[-1]->{column} = 1;
390 } elsif ($r == 0x000D) {
391 my $next_char = substr (${$self->{entity}->[-1]->{reptxt}},
392 $self->{entity}->[-1]->{pos}, 1);
393 if ($next_char eq "\x0A") {
394 $self->{entity}->[-1]->{pos}++;
395 $self->{entity}->[-1]->{line}++;
396 $self->{entity}->[-1]->{column} = 1;
397 } elsif ($next_char eq "\x85") {
398 if ($self->{xml_version} eq '1.1') {
399 if ($self->{entity}->[-1]->{no_xml11_eol}) {
400 my $location = {
401 utf32_offset => $self->{entity}->[-1]->{pos} - 1,
402 line_number => $self->{entity}->[-1]->{line},
403 column_number => $self->{entity}->[-1]->{column},
404 };
405 my $continue = __DOMCore:ERROR{
406 xp|fatal-xml11-end-of-line-in-xml-declaration::
407 DOMCore|location => {$location},
408 xp|character-number => {$r},
409 }__;
410 unless ($continue) {
411 __EXCEPTION{DOMLS|PARSE_ERR}__;
412 }
413 } # no_xml11_eol
414 $self->{entity}->[-1]->{pos}++;
415 $self->{entity}->[-1]->{line}++;
416 $self->{entity}->[-1]->{column} = 1;
417 } else {
418 ## |no_xml11_eol| will be tested later.
419 $self->{entity}->[-1]->{column}++;
420 ## Line number will be increased by next |shiftChar| call.
421 }
422 } else {
423 $self->{entity}->[-1]->{line}++;
424 $self->{entity}->[-1]->{column} = 1;
425 }
426 $r = 0x000A;
427 } elsif (
428 not ((0x0020 <= $r and $r <= 0x007E) or
429 (0x00A0 <= $r and $r <= 0xD7FF) or
430 (0xE000 <= $r and $r <= 0xFFFD) or
431 (0x10000 <= $r and $r <= 0x10FFFF)) and
432 $r != 0x0009 and $r != 0x0085 and
433 not ($self->{xml_version} eq '1.0' and
434 (0x007F <= $r and $r <= 0x009F))
435 ) {
436 my $location = {
437 utf32_offset => $self->{entity}->[-1]->{pos} - 1,
438 line_number => $self->{entity}->[-1]->{line},
439 column_number => $self->{entity}->[-1]->{column},
440 };
441 my $continue = __DOMCore:ERROR{xp|wf-legal-literal-character::
442 DOMCore|location => {$location},
443 xp|character-number => {$r},
444 }__;
445 unless ($continue) {
446 __EXCEPTION{DOMLS|PARSE_ERR}__;
447 }
448 $self->{entity}->[-1]->{column}++;
449 } elsif ($r == 0x0085 or $r == 0x2028) {
450 if ($self->{entity}->[-1]->{no_xml11_eol}) {
451 my $location = {
452 utf32_offset => $self->{entity}->[-1]->{pos} - 1,
453 line_number => $self->{entity}->[-1]->{line},
454 column_number => $self->{entity}->[-1]->{column},
455 };
456 my $continue = __DOMCore:ERROR{
457 xp|fatal-xml11-end-of-line-in-xml-declaration::
458 DOMCore|location => {$location},
459 xp|character-number => {$r},
460 }__;
461 unless ($continue) {
462 __EXCEPTION{DOMLS|PARSE_ERR}__;
463 }
464 } # no_xml11_eol
465 $r = 0x000A if $self->{xml_version} eq '1.1';
466 ## Even in XML 1.0 it increases the line number.
467 $self->{entity}->[-1]->{line}++;
468 $self->{entity}->[-1]->{column} = 1;
469 } else {
470 $self->{entity}->[-1]->{column}++;
471 }
472 } else {
473 $r = -1;
474 }
475 } # GETCHAR
476 }
477
478 @Method:
479 @@ManakaiDOM:isForInternal: 1
480 @@Operator: ManakaiDOM|MUErrorHandler
481 @@enDesc:
482 When a <IF::ecore|ErrorInterface||ManakaiDOM|Perl> is <Perl::report>ed,
483 then this method is invoked.
484
485 The method calls the <cfg::DOMCore|error-handler> if the error is of
486 <IF::DOMCore|DOMError>. Otherwise, the error is re-thrown so that
487 corresponding <Perl::catch> clause, if any, can catch the error.
488 @@Param:
489 @@@Name: err
490 @@@Type: ecore|ErrorInterface||ManakaiDOM|Perl
491 @@@enDesc:
492 The reported error object.
493 @@Return:
494 @@@Type: DISPerl|Any
495 @@@enDesc:
496 If the <P::err> is a <IF::DOMCore|DOMError>, then the return value
497 of the error handler.
498
499 {NOTE:: If the error is thrown, the method never returns.
500 }
501 @@@nullCase:
502 @@@@enDesc:
503 No error handler.
504 @@@PerlDef:
505 if ($err->isa (<IFName::DOMCore|DOMError||ManakaiDOM|ManakaiDOM>)) {
506 __DEEP{
507 A: {
508 my $cfg = $self-><AG::LSParser.domConfig>;
509 my $h = $cfg-><M::DOMCore|DOMConfiguration.getParameter>
510 ('error-handler');
511 $r = $h-><M::DOMCore|DOMErrorHandler.handleError> ($err);
512 } # A
513 }__;
514 } else {
515 $err-><M::ecore|ErrorInterface||ManakaiDOM|Perl.throw>;
516 }
517
518 @DISPerl:dpgDef:
519
520 /*
521 XML Document Entity
522
523 document := prolog element *Misc
524 - *Char RestrictedChar *Char ;; [1]
525 */
526 rule DocumentEntity : standalone {
527 /*
528 prolog := XMLDecl? *Misc [doctypedecl *Misc] ;; [22]
529 */
530 ?lexmode DocumentStart;
531
532 my $doc;
533 lang:Perl {
534 $doc = $self->{doc};
535 }
536
537 ~? (XDO) {
538 ?lexmode XMLDeclarationOrPI;
539 lang:Perl {
540 $self->{entity}->[-1]->{no_xml11_eol} = true;
541 }
542 ~ (S) { // XML declaration
543 &_XMLDeclaration_ ($doc => $doc);
544 ~ (PIC2) {
545 ?lexmode DocumentProlog;
546 } else {
547 ?lexmode DocumentProlog;
548 }
549 } (NameChar) { // Processing instruction whose target begins with |xml|
550 my $target_token;
551 lang:Perl ($v => $token.value) {
552 $target_token = $token;
553 $target_token->{value} = 'xml'.$target_token->{value};
554 $self->{entity}->[-1]->{no_xml11_eol} = false;
555 }
556 ?lexmode PINmtoken;
557 ~? (Nmtoken) {
558 lang:Perl ($v => $token.value) {
559 $target_token->{value} .= $v;
560 }
561 ?lexmode PIName;
562 }
563 lang:Perl {
564 $target_token->{type} = 'Name';
565 $target_token->{location_d} += 3; # 'xml'
566 unshift @{$self->{token}}, $token;
567 $token = $target_token;
568 }
569 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
570 ~ (PIC) {
571 ?lexmode DocumentProlog;
572 } else {
573 ?lexmode DocumentProlog;
574 }
575 } else {
576 lang:Perl {
577 $self->{entity}->[-1]->{no_xml11_eol} = false;
578 }
579 }
580 } else {
581 ?lexmode 'DocumentProlog';
582 }
583
584 // *Misc
585 ~* (CDO) {
586 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
587
588 ~ (MDC) {
589 ?lexmode DocumentProlog;
590 } else {
591 ?lexmode DocumentProlog;
592 }
593 } (PIO) {
594 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
595
596 ~ (PIC) {
597 ?lexmode 'DocumentProlog';
598 } else {
599 ?lexmode DocumentProlog;
600 }
601 } (S) {
602 //
603 }
604
605 // doctypedecl
606 ~? (MDO) {
607 &_DocumentTypeDeclaration_ ($doc => $doc);
608
609 ~ (MDC) {
610 ?lexmode DocumentMisc;
611 } else {
612 ?lexmode DocumentMisc;
613 }
614 } else {
615 ?lexmode DocumentMisc;
616 }
617
618 // *Misc
619 ~* (CDO) {
620 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
621
622 ~ (MDC) {
623 ?lexmode DocumentMisc;
624 } else {
625 ?lexmode DocumentMisc;
626 }
627 } (PIO) {
628 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
629
630 ~ (PIC) {
631 ?lexmode 'DocumentMisc';
632 } else {
633 ?lexmode DocumentMisc;
634 }
635 } (S) {
636 //
637 }
638
639 // Document element
640 ~ (STAGO) {
641 &Element_ ($doc => $doc, $parent => $doc)
642 : unshift-current-token;
643 ~ (TAGC) {
644 ?lexmode DocumentEnd;
645 } else {
646 ?lexmode DocumentEnd;
647 }
648 } else {
649 ?lexmode 'DocumentEnd';
650 }
651
652 // *Misc
653 ~* (CDO) {
654 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
655
656 ~ (MDC) {
657 ?lexmode DocumentEnd;
658 } else {
659 ?lexmode DocumentEnd;
660 }
661 } (PIO) {
662 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
663 ~ (PIC) {
664 ?lexmode 'DocumentEnd';
665 } else {
666 ?lexmode DocumentEnd;
667 }
668 } (S) {
669 //
670 }
671
672 ~ (#EOF) { }
673 } // DocumentEntity
674
675 /*
676 Internal General Parsed Entity
677
678 An internal general parsed entity is well-formed if its
679 replacement text matches the production labeled |content|.
680 */
681 rule InternalGeneralParsedEntity ($ent) : standalone {
682 ?lexmode ElementContent;
683
684 my $ns;
685 lang:Perl {
686 $ns = {
687 xml => <Q::xml:>,
688 xmlns => <Q::xmlns:>,
689 };
690 }
691
692 &content ($parent => $ent, $ns => $ns);
693
694 ~ (#EOF) { }
695 } // InternalGeneralParsedEntity
696
697 /*
698 XML Declaration
699
700 XMLDecl := '<?xml' VersionInfo
701 [EncodingDecl]
702 [SDDecl]
703 [S] '?>' ;; [23]
704
705 NOTE: XML declaration is optional in XML 1.0
706 while it is required in XML 1.1.
707 */
708 rule _XMLDeclaration_ {
709 // ~ (XDO) { }
710 ?lexmode XMLDeclaration;
711 //lang:Perl {
712 // $self->{entity}->[-1]->{no_xml11_eol} = true;
713 //}
714 //~ (S) { }
715
716 ~ (Name == 'version') {
717 ~? (S) { }
718 ~ (VI) { }
719 ~? (S) { }
720
721 my $ver;
722 my $bad_token;
723
724 ~ (LIT) {
725 ?lexmode AttributeValueLiteral;
726
727 ~ (STRING) {
728 lang:Perl ($version => $token.value) {
729 $ver = $version;
730 $bad_token = $token;
731 }
732 }
733
734 ~ (LIT) {
735 ?lexmode XMLDeclaration;
736 }
737 } (LITA) {
738 ?lexmode AttributeValueLiteralA;
739
740 ~ (STRING) {
741 lang:Perl ($version => $token.value) {
742 $ver = $version;
743 $bad_token = $token;
744 }
745 }
746
747 ~ (LITA) {
748 ?lexmode XMLDeclaration;
749 }
750 }
751
752 lang:Perl : has-error {
753 unless ($ver eq '1.0' or $ver eq '1.1') {
754 my $location;
755 __CODE{xp|get-location-from-token::
756 $token => {$bad_token},
757 $result => {$location},
758 }__;
759 my $continue = __DOMCore:ERROR{xp|wf-unsupported-xml-version::
760 DOMCore|location => {$location},
761 xp|parent => {$self->{doc}},
762 infoset|version => {$ver},
763 xp|error-token => {$bad_token},
764 }__;
765 unless ($continue) {
766 __EXCEPTION{DOMLS|PARSE_ERR}__;
767 }
768 }
769 $self->{doc}-><AS::Document.xmlVersion> ($ver);
770 $self->{xml_version} = $ver;
771 }
772
773 ~? (S) { }
774 }
775
776 ~? (Name == 'encoding') {
777 ~? (S) { }
778 ~ (VI) { }
779 ~? (S) { }
780
781 my $ver;
782 my $bad_token;
783
784 ~ (LIT) {
785 ?lexmode AttributeValueLiteral;
786
787 ~ (STRING) {
788 lang:Perl ($version => $token.value) {
789 $ver = $version;
790 $bad_token = $token;
791 }
792 }
793
794 ~ (LIT) {
795 ?lexmode XMLDeclaration;
796 }
797 } (LITA) {
798 ?lexmode AttributeValueLiteralA;
799
800 ~ (STRING) {
801 lang:Perl ($version => $token.value) {
802 $ver = $version;
803 $bad_token = $token;
804 }
805 }
806
807 ~ (LITA) {
808 ?lexmode XMLDeclaration;
809 }
810 }
811
812 lang:Perl : has-error {
813 unless ($ver =~ /\A[A-Za-z][A-Za-z0-9._-]*\z/) {
814 my $location;
815 __CODE{xp|get-location-from-token::
816 $token => {$bad_token},
817 $result => {$location},
818 }__;
819 my $continue = __DOMCore:ERROR{xp|wf-malformed-enc-name::
820 DOMCore|location => {$location},
821 xp|parent => {$self->{doc}},
822 xp|name => {$ver},
823 xp|error-token => {$bad_token},
824 }__;
825 unless ($continue) {
826 __EXCEPTION{DOMLS|PARSE_ERR}__;
827 }
828 }
829 $self->{doc}-><AS::Document.xmlEncoding> ($ver);
830 }
831
832 ~? (S) { }
833 }
834
835 ~? (Name == 'standalone') {
836 ~? (S) { }
837 ~ (VI) { }
838 ~? (S) { }
839
840 my $ver;
841 my $bad_token;
842
843 ~ (LIT) {
844 ?lexmode AttributeValueLiteral;
845
846 ~ (STRING) {
847 lang:Perl ($version => $token.value) {
848 $ver = $version;
849 $bad_token = $token;
850 }
851 }
852
853 ~ (LIT) {
854 ?lexmode XMLDeclaration;
855 }
856 } (LITA) {
857 ?lexmode AttributeValueLiteralA;
858
859 ~ (STRING) {
860 lang:Perl ($version => $token.value) {
861 $ver = $version;
862 $bad_token = $token;
863 }
864 }
865
866 ~ (LITA) {
867 ?lexmode XMLDeclaration;
868 }
869 }
870
871 lang:Perl : has-error {
872 unless ($ver eq 'yes' or $ver eq 'no') {
873 my $location;
874 __CODE{xp|get-location-from-token::
875 $token => {$bad_token},
876 $result => {$location},
877 }__;
878 my $continue = __DOMCore:ERROR{xp|wf-malformed-xml-standalone::
879 DOMCore|location => {$location},
880 xp|parent => {$self->{doc}},
881 xp|name => {$ver},
882 xp|error-token => {$bad_token},
883 }__;
884 unless ($continue) {
885 __EXCEPTION{DOMLS|PARSE_ERR}__;
886 }
887 }
888 if ($ver eq 'yes') {
889 $self->{doc}-><AS::Document.xmlStandalone> (true);
890 $self->{standalone} = true;
891 }
892 }
893
894 ~? (S) { }
895 }
896
897 ~ (PIC1) {
898 lang:Perl {
899 $self->{entity}->[-1]->{no_xml11_eol} = false;
900 }
901 } else {
902 lang:Perl {
903 $self->{entity}->[-1]->{no_xml11_eol} = false;
904 }
905 }
906
907 // ~ (PIC2) { }
908 } // _XMLDeclaration_
909
910 /*
911 Comment Declaration
912
913 Comment := '<!--' *(Char - '-' / '-' (Char - '-'))
914 '-->' ;; [15]
915 */
916 rule _CommentDeclaration_ ($doc, $parent) {
917 ?lexmode 'CommentDeclaration';
918
919 ~? (STRING) {
920 lang:Perl ($data => $token.value) {
921 my $com = $doc-><M::Document.createComment> ($data);
922 $parent-><M::Node.appendChild> ($com);
923 }
924 } else {
925 lang:Perl {
926 my $com = $doc-><M::Document.createComment> ('');
927 $parent-><M::Node.appendChild> ($com);
928 }
929 }
930
931 ~ (COM) {
932 ?lexmode MarkupDeclaration;
933 } else {
934 ?lexmode MarkupDeclaration;
935 }
936
937 // ~ (MDC) { }
938 } // _CommentDeclaration
939
940 rule _CommentDeclarationDTD {
941 ?lexmode CommentDeclaration;
942
943 ~? (STRING) {
944 //
945 }
946
947 ~ (COM) {
948 ?lexmode MarkupDeclaration;
949 } else {
950 ?lexmode MarkupDeclaration;
951 }
952
953 ~ (MDC) {
954 ?lexmode DTD;
955 } else {
956 ?lexmode DTD;
957 }
958 } // _CommentDeclarationDTD
959
960 /*
961 Processing Instruction
962
963 PI := '<?' PITarget [S *Char - *Char '?>' *Char]
964 '?>' ;; [16]
965 */
966 rule _ProcessingInstruction_ ($doc, $parent) {
967 ?lexmode 'PIName';
968
969 my $pi;
970
971 ~ (Name) {
972 lang:Perl ($name => $token.value) : has-error {
973 if (lc $name eq 'xml') {
974 my $location;
975 __CODE{xp|get-location-from-token::
976 $token => {$token},
977 $result => {$location},
978 }__;
979 my $continue = __DOMCore:ERROR{xp|wf-pi-target-is-xml::
980 xp|name => {$name},
981 DOMCore|location => {$location},
982 xp|parent => {$parent},
983 }__;
984 unless ($continue) {
985 __EXCEPTION{DOMLS|PARSE_ERR::
986 }__;
987 }
988 }
989 ## TODO: Namespace well-formedness
990 $pi = $doc-><M::Document.createProcessingInstruction>
991 ($name);
992 }
993 } else {
994 lang:Perl {
995 $pi = $doc-><M::Document.createProcessingInstruction> ('#INVALID');
996 }
997 }
998
999 ~? (S) {
1000 ?lexmode 'PIData';
1001
1002 my $tdata;
1003
1004 ~? (DATA) {
1005 lang:Perl ($data => $token.value) {
1006 $tdata = $data;
1007 }
1008 } else {
1009 lang:Perl {
1010 $tdata = '';
1011 }
1012 }
1013
1014 lang:Perl {
1015 $pi-><AS::Node.nodeValue> ($tdata);
1016 }
1017 }
1018
1019 lang:Perl {
1020 $parent-><M::Node.appendChild> ($pi);
1021 }
1022
1023 // ~ (PIC) { }
1024 } // _ProcessingInstruction_
1025
1026 /*
1027 Processing instruction in DTD
1028 */
1029 rule _ProcessingInstructionDTD ($doc, $doctype) {
1030 ?lexmode 'PIName';
1031
1032 my $pi;
1033
1034 ~ (Name) {
1035 lang:Perl ($name => $token.value) : has-error {
1036 if (lc $name eq 'xml') {
1037 my $location;
1038 __CODE{xp|get-location-from-token::
1039 $token => {$token},
1040 $result => {$location},
1041 }__;
1042 my $continue = __DOMCore:ERROR{xp|wf-pi-target-is-xml::
1043 xp|name => {$name},
1044 DOMCore|location => {$location},
1045 xp|parent => {$doctype},
1046 }__;
1047 unless ($continue) {
1048 __EXCEPTION{DOMLS|PARSE_ERR::
1049 }__;
1050 }
1051 }
1052 ## TODO: Namespace well-formedness
1053 $pi = $doc-><M::Document.createProcessingInstruction>
1054 ($name);
1055 }
1056 } else {
1057 lang:Perl {
1058 $pi = $doc-><M::Document.createProcessingInstruction> ('#INVALID');
1059 }
1060 }
1061
1062 ~? (S) {
1063 ?lexmode 'PIData';
1064
1065 my $tdata;
1066
1067 ~? (DATA) {
1068 lang:Perl ($data => $token.value) {
1069 $tdata = $data;
1070 }
1071 } else {
1072 lang:Perl {
1073 $tdata = '';
1074 }
1075 }
1076
1077 lang:Perl {
1078 $pi-><AS::Node.nodeValue> ($tdata);
1079 }
1080 }
1081
1082 lang:Perl {
1083 $doctype-><M::Node.appendChild> ($pi);
1084 }
1085
1086 ~ (PIC) {
1087 ?lexmode DTD;
1088 } else {
1089 ?lexmode DTD;
1090 }
1091 } // _ProcessingInstructionDTD
1092
1093 /*
1094 Element content parsing mode
1095
1096 element := EmptyElemTag /
1097 STag content ETag ;; [39]
1098 content := (CharData / element / Reference / CDSect /
1099 PI / Comment) ;; [43]
1100 */
1101 rule Element_ ($doc, $parent, $ns) : standalone {
1102 ?lexmode 'ElementContent';
1103
1104 my $node; // Current "parent" node
1105 my $nodes; // Node stack (w/o $current_node)
1106 my $type; // Current "parent" element type QName
1107 my $types; // Element type stack (w/o $current_type)
1108 //my $ns; // Current in-scope namespace bindings
1109 my $nses; // Namespace binding stack (w/o $current_ns)
1110
1111 lang:Perl {
1112 $node = $parent;
1113 $nodes = [];
1114 $type = '';
1115 $types = [];
1116 $ns ||= {
1117 xml => <Q::xml:>,
1118 xmlns => <Q::xmlns:>,
1119 };
1120 $nses = [];
1121 }
1122
1123 ~* : name => CONTENT
1124 (CharData) {
1125 // Character data
1126 lang:Perl ($data => $token.value) {
1127 $node-><M::Node.appendChild>
1128 ($doc-><M::Document.createTextNode> ($data));
1129 }
1130 } (STAGO) {
1131 // Start tag or empty element tag
1132
1133 ?lexmode 'StartTag';
1134
1135 ~ (Name) {
1136 my $attrs;
1137 lang:Perl ($name => $token.value) {
1138 push @{$types}, $type;
1139 $type = $name;
1140 $attrs = {};
1141 }
1142
1143 ~? (S) {
1144 &AttributeSpecificationList
1145 ($doc => $doc, $attrs => $attrs);
1146 }
1147
1148 my $el;
1149
1150 /*
1151 Note that this implementation does not perform
1152 attribute value tokenization (but does white space
1153 normalization common to attribute types) and
1154 construct the tree as is. DOM Level 3 Core spec
1155 is unclear on this point. With tokenization,
1156 entity references cannot be preserved.
1157
1158 The manakai Node.nodeValue and Attr.value attributes
1159 do tokenization according to attribute types.
1160 */
1161
1162 /*
1163 ISSUE: Should |xml:id| attribute be typed?
1164 */
1165
1166 lang:Perl {
1167 push @{$nses}, $ns;
1168 $ns = {%$ns};
1169
1170 my %gattr;
1171 my %lattr;
1172 for my $atqname (keys %$attrs) {
1173 my ($pfx, $lname) = split /:/, $atqname;
1174 $attrs->{$atqname}->{def} = $self->{attr}->{$type}->{$atqname};
1175 if (defined $lname) { ## Global attribute
1176 ## TODO: Namespace well-formedness (lname is NCName)
1177 if ($pfx eq 'xmlns') {
1178 my $nsuri = $attrs->{$atqname}->{value};
1179 if ($lname eq 'xml' and
1180 $nsuri ne <Q::xml:>) {
1181 ## TODO: error
1182 } elsif ($lname eq 'xmlns') {
1183 ## TODO: error
1184 }
1185 if ($nsuri eq '') {
1186 ## TODO: error in XML 1.0
1187 } elsif ($nsuri eq <Q::xml:> and
1188 $lname ne 'xml') {
1189 ## TODO: error
1190 } elsif ($nsuri eq <Q::xmlns:>) {
1191 ## TODO: error
1192 }
1193 $ns->{$lname} = $attrs->{$atqname}->{value};
1194 if ($attrs->{$atqname}->{def}) {
1195 my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;
1196 if ({
1197 <C::ATDef.ID_ATTR> => true,
1198 <C::ATDef.IDREF_ATTR> => true,
1199 <C::ATDef.IDREFS_ATTR> => true,
1200 <C::ATDef.ENTITY_ATTR> => true,
1201 <C::ATDef.ENTITIES_ATTR> => true,
1202 <C::ATDef.NMTOKEN_ATTR> => true,
1203 <C::ATDef.NMTOKENS_ATTR> => true,
1204 <C::ATDef.NOTATION_ATTR> => true,
1205 <C::ATDef.ENUMERATION_ATTR> => true,
1206 }->{$dt}) {
1207 ## Tokenization (XML 1 3.3.3)
1208 for ($ns->{$lname}) {
1209 s/^\x20+//;
1210 s/\x20+\z//;
1211 s/\x20+/ /g;
1212 }
1213 }
1214 }
1215 delete $ns->{$lname} unless length $ns->{$lname};
1216 } elsif ($pfx eq '') {
1217 ## TODO: pfx is not NCName error
1218 } else {
1219 if ($gattr{$pfx}->{$lname}) {
1220 ## TODO: Namespace well-formedness error
1221 }
1222 }
1223 $gattr{$pfx}->{$lname} = $attrs->{$atqname};
1224 } else { ## Local attribute
1225 if ($pfx eq 'xmlns') {
1226 $ns->{''} = $attrs->{xmlns}->{value};
1227 if ($attrs->{$atqname}->{def}) {
1228 my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;
1229 if ({
1230 <C::ATDef.ID_ATTR> => true,
1231 <C::ATDef.IDREF_ATTR> => true,
1232 <C::ATDef.IDREFS_ATTR> => true,
1233 <C::ATDef.ENTITY_ATTR> => true,
1234 <C::ATDef.ENTITIES_ATTR> => true,
1235 <C::ATDef.NMTOKEN_ATTR> => true,
1236 <C::ATDef.NMTOKENS_ATTR> => true,
1237 <C::ATDef.NOTATION_ATTR> => true,
1238 <C::ATDef.ENUMERATION_ATTR> => true,
1239 }->{$dt}) {
1240 ## Tokenization (XML 1 3.3.3)
1241 for ($ns->{''}) {
1242 s/^\x20+//;
1243 s/\x20+\z//;
1244 s/\x20+/ /g;
1245 }
1246 }
1247 }
1248 delete $ns->{''} unless length $ns->{''};
1249 } else {
1250 $lattr{$pfx} = $attrs->{$atqname};
1251 }
1252 }
1253 }
1254
1255 my ($pfx, $lname) = split /:/, $type;
1256 my $nsuri;
1257 ## TODO: lname is NCName?
1258 if (defined $lname) { ## Prefixed namespace
1259 if ($pfx eq '') {
1260 ## TODO: pfx is not NCName error
1261 }
1262 if (defined $ns->{$pfx}) {
1263 $nsuri = $ns->{$pfx};
1264 } else {
1265 ## TODO: namespace ill-formed
1266 }
1267 } else { ## Default namespace
1268 $nsuri = $ns->{''};
1269 }
1270
1271 $el = $doc-><M::Document.createElementNS>
1272 ($nsuri, $type);
1273
1274 if ($attrs->{xmlns}) {
1275 my $attr = $doc-><M::Document.createAttributeNS>
1276 (<Q::xmlns:>, 'xmlns');
1277 for (@{$attrs->{xmlns}->{nodes}}) {
1278 $attr-><M::Node.appendChild> ($_);
1279 }
1280 if ($attrs->{xmlns}->{def}) {
1281 __CODE{t|setAttrType::
1282 $attr => $attr,
1283 $type => {$attrs->{xmlns}->{def}-><AG::ATDef.declaredType>},
1284 }__;
1285 }
1286 $el-><M::Element.setAttributeNodeNS> ($attr);
1287 }
1288
1289 for my $lname (keys %lattr) {
1290 my $attr = $doc-><M::Document.createAttributeNS>
1291 (null, $lname);
1292 for (@{$lattr{$lname}->{nodes}}) {
1293 $attr-><M::Node.appendChild> ($_);
1294 }
1295 if ($attrs->{$lname}->{def}) {
1296 __CODE{t|setAttrType::
1297 $attr => $attr,
1298 $type => {$attrs->{$lname}->{def}-><AG::ATDef.declaredType>},
1299 }__;
1300 }
1301 $el-><M::Element.setAttributeNodeNS> ($attr);
1302 }
1303
1304 for my $pfx (keys %gattr) {
1305 for my $lname (keys %{$gattr{$pfx}}) {
1306 my $attr = $doc-><M::Document.createAttributeNS>
1307 ($ns->{$pfx}, $pfx.':'.$lname);
1308 for (@{$gattr{$pfx}->{$lname}->{nodes}}) {
1309 $attr-><M::Node.appendChild> ($_);
1310 }
1311 if ($attrs->{$pfx}->{$lname}->{def}) {
1312 __CODE{t|setAttrType::
1313 $attr => $attr,
1314 $type => {$attrs->{$pfx}->{$lname}
1315 ->{def}-><AG::ATDef.declaredType>},
1316 }__;
1317 }
1318 $el-><M::Element.setAttributeNodeNS> ($attr);
1319 }
1320 }
1321
1322 $node-><M::Node.appendChild> ($el);
1323 }
1324
1325 ~ (TAGC) {
1326 lang:Perl {
1327 push @{$nodes}, $node;
1328 $node = $el;
1329 }
1330 ?lexmode ElementContent;
1331 } (NESTC) {
1332 my $is_docel;
1333 lang:Perl {
1334 $ns = pop @{$nses};
1335 $type = pop @{$types};
1336 $is_docel = (@{$types} == 0);
1337 }
1338
1339 if-true ($is_docel) {
1340 return;
1341 }
1342
1343 ~ (TAGC) {
1344 ?lexmode ElementContent;
1345 } else {
1346 ?lexmode ElementContent;
1347 }
1348 } else {
1349 ?lexmode ElementContent;
1350 }
1351 } else {
1352 ?lexmode ElementContent;
1353 }
1354
1355 } (ETAGO) {
1356 // End tag
1357
1358 ?lexmode 'EndTag';
1359
1360 my $is_docel;
1361
1362 ~ (Name) {
1363 lang:Perl ($name => $token.value) : has-error {
1364 if ($name eq $type) {
1365 $type = pop @{$types};
1366 if ($type eq '') {
1367 $is_docel = true;
1368 }
1369 $node = pop @{$nodes};
1370 $ns = pop @{$nses};
1371 } else {
1372 my $location;
1373 __CODE{xp|get-location-from-token::
1374 $token => $token,
1375 $result => $location,
1376 }__;
1377 my $continue = __DOMCore:ERROR{xp|wf-element-type-match::
1378 DOMCore:location => {$location},
1379 xp|token => {$token},
1380 xp|expected-element-type => {$type},
1381 xp|actual-element-type => {$name},
1382 xp|node => {$node},
1383 }__;
1384 unless ($continue) {
1385 __EXCEPTION{DOMLS|PARSE_ERR}__;
1386 }
1387 }
1388 }
1389 }
1390
1391 ~? (S) { }
1392
1393 if-true ($is_docel) {
1394 lang:Perl : has-error {
1395 if (@{$types}) {
1396 my $location;
1397 __CODE{xp|get-location-from-token::
1398 $token => $token,
1399 $result => $location,
1400 }__;
1401 for my $type (reverse @{$types}) {
1402 my $continue = __DOMCore:ERROR{xp|wf-no-end-tag::
1403 DOMCore:location => {$location},
1404 xp|token => {$token},
1405 xp|expected-element-type => {$type},
1406 xp|node => {$node},
1407 }__;
1408 unless ($continue) {
1409 __EXCEPTION{DOMLS|PARSE_ERR}__;
1410 }
1411 $node = shift @{$nodes};
1412 }
1413 }
1414 }
1415 return;
1416 }
1417
1418 ~ (TAGC) {
1419 ?lexmode ElementContent;
1420 } else {
1421 ?lexmode 'ElementContent';
1422 }
1423
1424 } (HCRO) {
1425 &_HexadecimalCharacterReference_
1426 ($doc => $doc, $parent => $node);
1427
1428 ~ (REFC) {
1429 ?lexmode 'ElementContent';
1430 } else {
1431 ?lexmode ElementContent;
1432 }
1433 } (CRO) {
1434 &_NumericCharacterReference_
1435 ($doc => $doc, $parent => $node);
1436
1437 ~ (REFC) {
1438 ?lexmode 'ElementContent';
1439 } else {
1440 ?lexmode ElementContent;
1441 }
1442 } (ERO) {
1443 &_GeneralEntityReferenceEC
1444 ($doc => $doc, $parent => $node, $ns => $ns);
1445 } (CDO) {
1446 &_CommentDeclaration_ ($doc => $doc, $parent => $node);
1447
1448 ~ (MDC) {
1449 ?lexmode ElementContent;
1450 } else {
1451 ?lexmode ElementContent;
1452 }
1453 } (CDSO) {
1454 &_CDATASection_ ($doc => $doc, $parent => $node);
1455
1456 ~ (MSE) {
1457 ?lexmode 'ElementContent';
1458 } else {
1459 ?lexmode ElementContent;
1460 }
1461 } (PIO) {
1462 &_ProcessingInstruction_ ($doc => $doc, $parent => $node);
1463
1464 ~ (PIC) {
1465 ?lexmode 'ElementContent';
1466 } else {
1467 ?lexmode ElementContent;
1468 }
1469 }
1470
1471 ~ (#NONE) { }
1472 } // Element_
1473
1474 /*
1475 content := [CharData]
1476 *((element / Reference / CDSect / PI / Comment) [CharData])
1477 */
1478 rule content ($parent, $ns) {
1479 // ?lexmode ElementContent;
1480
1481 my $doc;
1482 lang:Perl {
1483 $doc = $self->{doc};
1484 }
1485
1486 ~* (CharData) {
1487 lang:Perl ($data => $token.value) {
1488 $parent-><M::Node.appendChild>
1489 ($self->{doc}-><M::Document.createTextNode> ($data));
1490 }
1491 } (STAGO) {
1492 &Element_ ($doc => $doc, $parent => $parent, $ns => $ns)
1493 : unshift-current-token;
1494 ~ (TAGC) {
1495 ?lexmode ElementContent;
1496 } else {
1497 ?lexmode ElementContent;
1498 }
1499 } (HCRO) {
1500 &_HexadecimalCharacterReference_
1501 ($doc => $doc, $parent => $parent);
1502
1503 ~ (REFC) {
1504 ?lexmode 'ElementContent';
1505 } else {
1506 ?lexmode ElementContent;
1507 }
1508 } (CRO) {
1509 &_NumericCharacterReference_
1510 ($doc => $doc, $parent => $parent);
1511
1512 ~ (REFC) {
1513 ?lexmode 'ElementContent';
1514 } else {
1515 ?lexmode ElementContent;
1516 }
1517 } (ERO) {
1518 &_GeneralEntityReferenceEC
1519 ($doc => $doc, $parent => $parent, $ns => $ns);
1520 } (CDO) {
1521 &_CommentDeclaration_ ($doc => $doc, $parent => $parent);
1522
1523 ~ (MDC) {
1524 ?lexmode ElementContent;
1525 } else {
1526 ?lexmode ElementContent;
1527 }
1528 } (CDSO) {
1529 &_CDATASection_ ($doc => $doc, $parent => $parent);
1530
1531 ~ (MSE) {
1532 ?lexmode 'ElementContent';
1533 } else {
1534 ?lexmode ElementContent;
1535 }
1536 } (PIO) {
1537 &_ProcessingInstruction_ ($doc => $doc, $parent => $parent);
1538
1539 ~ (PIC) {
1540 ?lexmode 'ElementContent';
1541 } else {
1542 ?lexmode ElementContent;
1543 }
1544 }
1545 } // content
1546
1547 rule AttributeSpecificationList ($doc, $attrs)
1548 : standalone
1549 {
1550 ?lexmode 'StartTag';
1551
1552 my $i;
1553 lang:Perl {
1554 $i = 0;
1555 }
1556
1557 ~* (Name) {
1558 my $atqname;
1559 lang:Perl ($name => $token.value) {
1560 $atqname = $name;
1561 }
1562
1563 my $vals;
1564 lang:Perl : has-error {
1565 if ($attrs->{$atqname}) {
1566 my $location;
1567 __CODE{xp|get-location-from-token::
1568 $token => $token,
1569 $result => $location,
1570 }__;
1571 my $continue = __DOMCore:ERROR{xp|wf-unique-att-spec::
1572 DOMCore:location => {$location},
1573 xp|token => {$token},
1574 xp|name => {$atqname},
1575 }__;
1576 unless ($continue) {
1577 __EXCEPTION{DOMLS|PARSE_ERR}__;
1578 }
1579 }
1580
1581 $vals = $attrs->{$atqname} = {
1582 nodes => [],
1583 value => '',
1584 index => $i++,
1585 };
1586 }
1587
1588 ~? (S) { }
1589 ~ (VI) { }
1590 ~? (S) { }
1591
1592 ~ (LIT) {
1593 &_AttributeValueSpecification_
1594 ($doc => $doc, $vals => $vals);
1595
1596 ~ (LIT) {
1597 ?lexmode StartTag;
1598 } else {
1599 ?lexmode StartTag;
1600 }
1601 } (LITA) {
1602 &_AttributeValueSpecificationA_
1603 ($doc => $doc, $vals => $vals);
1604
1605 ~ (LITA) {
1606 ?lexmode StartTag;
1607 } else {
1608 ?lexmode StartTag;
1609 }
1610 }
1611 } (S) : separator : terminator? { }
1612 } // AttributeSpecificationList
1613
1614 rule _AttributeValueSpecification_ ($doc, $vals) {
1615 // ~ (LIT) { }
1616 ?lexmode 'AttributeValueLiteral';
1617
1618 ~* (STRING) {
1619 lang:Perl ($value => $token.value) {
1620 $value =~ s/[\x09\x0A\x0D]/ /g;
1621 my $text = $doc-><M::Document.createTextNode> ($value);
1622 push @{$vals->{nodes}}, $text;
1623 $vals->{value} .= $value;
1624 }
1625 } (HCRO) {
1626 &_HexadecimalCharacterReferenceV_
1627 ($doc => $doc, $vals => $vals);
1628
1629 ~ (REFC) {
1630 ?lexmode AttributeValueLiteral;
1631 } else {
1632 ?lexmode AttributeValueLiteral;
1633 }
1634 } (CRO) {
1635 &_NumericCharacterReferenceV_
1636 ($doc => $doc, $vals => $vals);
1637
1638 ~ (REFC) {
1639 ?lexmode AttributeValueLiteral;
1640 } else {
1641 ?lexmode AttributeValueLiteral;
1642 }
1643 } (ERO) {
1644 // TODO: Attribute value normalization
1645 &_GeneralEntityReferenceV_
1646 ($doc => $doc, $vals => $vals);
1647
1648 ~ (REFC) {
1649 ?lexmode AttributeValueLiteral;
1650 } else {
1651 ?lexmode AttributeValueLiteral;
1652 }
1653 }
1654
1655 // ~ (LIT) { } (LITA) { }
1656 } // _AttributeValueSpecification_
1657
1658 rule _AttributeValueSpecificationA_ ($doc, $vals) {
1659 // ~ (LITA) { }
1660 ?lexmode 'AttributeValueLiteralA';
1661
1662 ~* (STRING) {
1663 lang:Perl ($value => $token.value) {
1664 $value =~ s/[\x09\x0A\x0D]/ /g;
1665 my $text = $doc-><M::Document.createTextNode> ($value);
1666 push @{$vals->{nodes}}, $text;
1667 $vals->{value} .= $value;
1668 }
1669 } (HCRO) {
1670 &_HexadecimalCharacterReferenceV_
1671 ($doc => $doc, $vals => $vals);
1672
1673 ~ (REFC) {
1674 ?lexmode AttributeValueLiteralA;
1675 } else {
1676 ?lexmode AttributeValueLiteralA;
1677 }
1678 } (CRO) {
1679 &_NumericCharacterReferenceV_
1680 ($doc => $doc, $vals => $vals);
1681
1682 ~ (REFC) {
1683 ?lexmode AttributeValueLiteralA;
1684 } else {
1685 ?lexmode AttributeValueLiteralA;
1686 }
1687 } (ERO) {
1688 // TODO: Attribute value normalization
1689 &_GeneralEntityReferenceV_
1690 ($doc => $doc, $vals => $vals);
1691
1692 ~ (REFC) {
1693 ?lexmode AttributeValueLiteralA;
1694 } else {
1695 ?lexmode AttributeValueLiteralA;
1696 }
1697 }
1698
1699 // ~ (LITA) { }
1700 } // _AttributeValueSpecificationA_
1701
1702 /*
1703 Parsing replacement text of an entity referenced in
1704 an attribute value specification.
1705 */
1706 rule AttributeValueLiteralE_ ($parent, $vals)
1707 : recursive
1708 {
1709 // ?lexmode AttributeValueLiteralE;
1710
1711 ~* (STRING) {
1712 lang:Perl ($value => $token.value) {
1713 $value =~ s/[\x09\x0A\x0D]/ /g;
1714 my $text = $self->{doc}-><M::Document.createTextNode> ($value);
1715 $parent-><M::Node.appendChild> ($text);
1716 $vals->{value} .= $value;
1717 }
1718 } (HCRO) {
1719 &_HexadecimalCharacterReferenceAE_
1720 ($parent => $parent, $vals => $vals);
1721
1722 ~ (REFC) {
1723 ?lexmode AttributeValueLiteralE;
1724 } else {
1725 ?lexmode AttributeValueLiteralE;
1726 }
1727 } (CRO) {
1728 &_NumericCharacterReferenceAE_
1729 ($parent => $parent, $vals => $vals);
1730
1731 ~ (REFC) {
1732 ?lexmode AttributeValueLiteralE;
1733 } else {
1734 ?lexmode AttributeValueLiteralE;
1735 }
1736 } (ERO) {
1737 &_GeneralEntityReferenceAE_ ($parent => $parent, $vals => $vals);
1738
1739 ~ (REFC) {
1740 ?lexmode AttributeValueLiteralE;
1741 } else {
1742 ?lexmode AttributeValueLiteralE;
1743 }
1744 } (#INVALID == '<') {
1745 lang:Perl : has-error {
1746 my $location;
1747 __CODE{xp|get-location-from-token::
1748 $token => $token,
1749 $result => $location,
1750 }__;
1751 my $continue = __DOMCore:ERROR{xp|wf-no-lt-in-attribute-values::
1752 c|location => {$location},
1753 xp|token => {$token},
1754 }__;
1755 unless ($continue) {
1756 __EXCEPTION{DOMLS|PARSE_ERR}__;
1757 }
1758
1759 my $text = $self->{doc}-><M::Document.createTextNode> ('<');
1760 $parent-><M::Node.appendChild> ($text);
1761 $vals->{value} .= '<';
1762 }
1763 }
1764
1765 // ~ (#EOF) { }
1766 } // AttributeValueLiteralE_
1767
1768 /*
1769 CDATA Section Content Parsing Mode
1770 */
1771 rule _CDATASection_ ($doc, $parent) {
1772 ?lexmode 'CDATASectionContent';
1773
1774 my $cdata;
1775
1776 ~? (CData) {
1777 lang:Perl ($data => $token.value) {
1778 $cdata = $data;
1779 }
1780 } else {
1781 lang:Perl {
1782 $cdata = '';
1783 }
1784 }
1785
1786 lang:Perl {
1787 my $cdsect = $doc-><M::Document.createCDATASection>
1788 ($cdata);
1789 $parent-><M::Node.appendChild> ($cdsect);
1790 }
1791
1792 // ~ (MSE) { }
1793 } // _CDATASection_
1794
1795 rule _NumericCharacterReference_ ($doc, $parent) {
1796 ?lexmode 'NumericCharacterReference';
1797
1798 ~ (NUMBER) {
1799 lang:Perl ($num => $token.value) : has-error {
1800 $num += 0;
1801 unless (
1802 ($self->{xml_version} eq '1.0' and
1803 ((0x0020 <= $num and $num <= 0xD7FF) or
1804 (0xE000 <= $num and $num <= 0xFFFD) or
1805 (0x10000 <= $num and $num <= 0x10FFFF) or
1806 $num == 0x9 or $num == 0xA or $num == 0xD)) or
1807 ($self->{xml_version} eq '1.1' and
1808 ((0x0001 <= $num and $num <= 0xD7FF) or
1809 (0xE000 <= $num and $num <= 0xFFFD) or
1810 (0x10000 <= $num and $num <= 0x10FFFF)))
1811 ) {
1812 my $location;
1813 __CODE{xp|get-location-from-token::
1814 $token => $token,
1815 $result => $location,
1816 }__;
1817 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
1818 DOMCore:location => {$location},
1819 xp|token => {$token},
1820 xp|character-number => {$num},
1821 xp|parent => {$parent},
1822 }__;
1823 unless ($continue) {
1824 __EXCEPTION{DOMLS|PARSE_ERR}__;
1825 }
1826 }
1827 my $ncr = $doc-><M::Document.createTextNode> (chr $num);
1828 $parent-><M::Node.appendChild> ($ncr);
1829 }
1830 }
1831
1832 // ~ (REFC) { }
1833 } // _NumericCharacterReference_
1834
1835 rule _NumericCharacterReferenceV_ ($doc, $vals) {
1836 ?lexmode 'NumericCharacterReference';
1837
1838 ~ (NUMBER) {
1839 lang:Perl ($num => $token.value) : has-error {
1840 $num += 0;
1841 unless (
1842 ($self->{xml_version} eq '1.0' and
1843 ((0x0020 <= $num and $num <= 0xD7FF) or
1844 (0xE000 <= $num and $num <= 0xFFFD) or
1845 (0x10000 <= $num and $num <= 0x10FFFF) or
1846 $num == 0x9 or $num == 0xA or $num == 0xD)) or
1847 ($self->{xml_version} eq '1.1' and
1848 ((0x0001 <= $num and $num <= 0xD7FF) or
1849 (0xE000 <= $num and $num <= 0xFFFD) or
1850 (0x10000 <= $num and $num <= 0x10FFFF)))
1851 ) {
1852 my $location;
1853 __CODE{xp|get-location-from-token::
1854 $token => $token,
1855 $result => $location,
1856 }__;
1857 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
1858 DOMCore:location => {$location},
1859 xp|token => {$token},
1860 xp|character-number => {$num},
1861 }__;
1862 unless ($continue) {
1863 __EXCEPTION{DOMLS|PARSE_ERR}__;
1864 }
1865 }
1866 my $ncr = $doc-><M::Document.createTextNode>
1867 (my $char = chr $num);
1868 push @{$vals->{nodes}}, $ncr;
1869 $vals->{value} .= $char;
1870 }
1871 }
1872
1873 // ~ (REFC) { }
1874 } // _NumericCharacterReferenceV_
1875
1876 /*
1877 Numeric character reference in the replacement text
1878 of the entity referenced in an attribute value specification
1879 */
1880 rule _NumericCharacterReferenceAE_ ($parent, $vals)
1881 {
1882 ?lexmode NumericCharacterReference;
1883
1884 ~ (NUMBER) {
1885 lang:Perl ($num => $token.value) : has-error {
1886 $num += 0;
1887 unless (
1888 ($self->{xml_version} eq '1.0' and
1889 ((0x0020 <= $num and $num <= 0xD7FF) or
1890 (0xE000 <= $num and $num <= 0xFFFD) or
1891 (0x10000 <= $num and $num <= 0x10FFFF) or
1892 $num == 0x9 or $num == 0xA or $num == 0xD)) or
1893 ($self->{xml_version} eq '1.1' and
1894 ((0x0001 <= $num and $num <= 0xD7FF) or
1895 (0xE000 <= $num and $num <= 0xFFFD) or
1896 (0x10000 <= $num and $num <= 0x10FFFF)))
1897 ) {
1898 my $location;
1899 __CODE{xp|get-location-from-token::
1900 $token => $token,
1901 $result => $location,
1902 }__;
1903 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
1904 DOMCore:location => {$location},
1905 xp|token => {$token},
1906 xp|character-number => {$num},
1907 }__;
1908 unless ($continue) {
1909 __EXCEPTION{DOMLS|PARSE_ERR}__;
1910 }
1911 }
1912 my $ncr = $self->{doc}-><M::Document.createTextNode>
1913 (my $char = chr $num);
1914 $parent-><M::Node.appendChild> ($ncr);
1915 $vals->{value} .= $char;
1916 }
1917 }
1918
1919 // ~ (REFC) { }
1920 } // _NumericCharacterReferenceAE_
1921
1922 rule _NumericCharacterReferenceEV_ ($vals)
1923 {
1924 ?lexmode 'NumericCharacterReference';
1925
1926 ~ (NUMBER) {
1927 lang:Perl ($num => $token.value) : has-error {
1928 $num += 0;
1929 unless (
1930 ($self->{xml_version} eq '1.0' and
1931 ((0x0020 <= $num and $num <= 0xD7FF) or
1932 (0xE000 <= $num and $num <= 0xFFFD) or
1933 (0x10000 <= $num and $num <= 0x10FFFF) or
1934 $num == 0x9 or $num == 0xA or $num == 0xD)) or
1935 ($self->{xml_version} eq '1.1' and
1936 ((0x0001 <= $num and $num <= 0xD7FF) or
1937 (0xE000 <= $num and $num <= 0xFFFD) or
1938 (0x10000 <= $num and $num <= 0x10FFFF)))
1939 ) {
1940 my $location;
1941 __CODE{xp|get-location-from-token::
1942 $token => $token,
1943 $result => $location,
1944 }__;
1945 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
1946 DOMCore:location => {$location},
1947 xp|token => {$token},
1948 xp|character-number => {$num},
1949 }__;
1950 unless ($continue) {
1951 __EXCEPTION{DOMLS|PARSE_ERR}__;
1952 }
1953 }
1954 push @{$vals}, chr $num;
1955 }
1956 }
1957
1958 // ~ (REFC) { }
1959 } // _NumericCharacterReferenceEV_
1960
1961 rule _HexadecimalCharacterReference_ ($doc, $parent) {
1962 ?lexmode 'HexadecimalCharacterReference';
1963
1964 ~ (Hex) {
1965 lang:Perl ($v => $token.value) : has-error {
1966 my $num = hex $v;
1967 unless (
1968 ($self->{xml_version} eq '1.0' and
1969 ((0x0020 <= $num and $num <= 0xD7FF) or
1970 (0xE000 <= $num and $num <= 0xFFFD) or
1971 (0x10000 <= $num and $num <= 0x10FFFF) or
1972 $num == 0x9 or $num == 0xA or $num == 0xD)) or
1973 ($self->{xml_version} eq '1.1' and
1974 ((0x0001 <= $num and $num <= 0xD7FF) or
1975 (0xE000 <= $num and $num <= 0xFFFD) or
1976 (0x10000 <= $num and $num <= 0x10FFFF)))
1977 ) {
1978 my $location;
1979 __CODE{xp|get-location-from-token::
1980 $token => $token,
1981 $result => $location,
1982 }__;
1983 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
1984 DOMCore:location => {$location},
1985 xp|token => {$token},
1986 xp|character-number => {$num},
1987 xp|parent => {$parent},
1988 }__;
1989 unless ($continue) {
1990 __EXCEPTION{DOMLS|PARSE_ERR}__;
1991 }
1992 }
1993 my $ncr = $doc-><M::Document.createTextNode>
1994 (chr $num);
1995 $parent-><M::Node.appendChild> ($ncr);
1996 }
1997 }
1998
1999 // ~ (REFC) { }
2000 } // _HexadecimalCharacterReference_
2001
2002 rule _HexadecimalCharacterReferenceV_ ($doc, $vals) {
2003 ?lexmode 'HexadecimalCharacterReference';
2004
2005 ~ (Hex) {
2006 lang:Perl ($v => $token.value) : has-error {
2007 my $num = hex $v;
2008 unless (
2009 ($self->{xml_version} eq '1.0' and
2010 ((0x0020 <= $num and $num <= 0xD7FF) or
2011 (0xE000 <= $num and $num <= 0xFFFD) or
2012 (0x10000 <= $num and $num <= 0x10FFFF) or
2013 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2014 ($self->{xml_version} eq '1.1' and
2015 ((0x0001 <= $num and $num <= 0xD7FF) or
2016 (0xE000 <= $num and $num <= 0xFFFD) or
2017 (0x10000 <= $num and $num <= 0x10FFFF)))
2018 ) {
2019 my $location;
2020 __CODE{xp|get-location-from-token::
2021 $token => $token,
2022 $result => $location,
2023 }__;
2024 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2025 DOMCore:location => {$location},
2026 xp|token => {$token},
2027 xp|character-number => {$num},
2028 }__;
2029 unless ($continue) {
2030 __EXCEPTION{DOMLS|PARSE_ERR}__;
2031 }
2032 }
2033 my $ncr = $doc-><M::Document.createTextNode>
2034 (my $char = chr $num);
2035 push @{$vals->{nodes}}, $ncr;
2036 $vals->{value} .= $char;
2037 }
2038 }
2039
2040 // ~ (REFC) { }
2041 } // _HexadecimalCharacterReferenceV_
2042
2043 /*
2044 Hexadecimal character reference in the replacement text
2045 of the entity referenced in an attribute value literal
2046 */
2047 rule _HexadecimalCharacterReferenceAE_ ($parent, $vals)
2048 {
2049 ?lexmode HexadecimalCharacterReference;
2050
2051 ~ (Hex) {
2052 lang:Perl ($v => $token.value) : has-error {
2053 my $num = hex $v;
2054 unless (
2055 ($self->{xml_version} eq '1.0' and
2056 ((0x0020 <= $num and $num <= 0xD7FF) or
2057 (0xE000 <= $num and $num <= 0xFFFD) or
2058 (0x10000 <= $num and $num <= 0x10FFFF) or
2059 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2060 ($self->{xml_version} eq '1.1' and
2061 ((0x0001 <= $num and $num <= 0xD7FF) or
2062 (0xE000 <= $num and $num <= 0xFFFD) or
2063 (0x10000 <= $num and $num <= 0x10FFFF)))
2064 ) {
2065 my $location;
2066 __CODE{xp|get-location-from-token::
2067 $token => $token,
2068 $result => $location,
2069 }__;
2070 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2071 DOMCore:location => {$location},
2072 xp|token => {$token},
2073 xp|character-number => {$num},
2074 }__;
2075 unless ($continue) {
2076 __EXCEPTION{DOMLS|PARSE_ERR}__;
2077 }
2078 }
2079 my $ncr = $self->{doc}-><M::Document.createTextNode>
2080 (my $char = chr $num);
2081 $parent-><M::Node.appendChild> ($ncr);
2082 $vals->{value} .= $char;
2083 }
2084 }
2085
2086 // ~ (REFC) { }
2087 } // _HexadecimalCharacterReferenceAE_
2088
2089 rule _HexadecimalCharacterReferenceEV_ ($vals) {
2090 ?lexmode HexadecimalCharacterReference;
2091
2092 ~ (Hex) {
2093 lang:Perl ($v => $token.value) : has-error {
2094 my $num = hex $v;
2095 unless (
2096 ($self->{xml_version} eq '1.0' and
2097 ((0x0020 <= $num and $num <= 0xD7FF) or
2098 (0xE000 <= $num and $num <= 0xFFFD) or
2099 (0x10000 <= $num and $num <= 0x10FFFF) or
2100 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2101 ($self->{xml_version} eq '1.1' and
2102 ((0x0001 <= $num and $num <= 0xD7FF) or
2103 (0xE000 <= $num and $num <= 0xFFFD) or
2104 (0x10000 <= $num and $num <= 0x10FFFF)))
2105 ) {
2106 my $location;
2107 __CODE{xp|get-location-from-token::
2108 $token => $token,
2109 $result => $location,
2110 }__;
2111 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2112 DOMCore:location => {$location},
2113 xp|token => {$token},
2114 xp|character-number => {$num},
2115 }__;
2116 unless ($continue) {
2117 __EXCEPTION{DOMLS|PARSE_ERR}__;
2118 }
2119 }
2120 push @{$vals}, chr $num;
2121 }
2122 }
2123
2124 // ~ (REFC) { }
2125 } // _HexadecimalCharacterReferenceEV_
2126
2127 /*
2128 General entity reference in element's content
2129 */
2130 rule _GeneralEntityReferenceEC ($doc, $parent, $ns)
2131 : recursive
2132 {
2133 ?lexmode 'EntityReference';
2134
2135 ~ (Name == 'lt') {
2136 lang:Perl {
2137 $parent-><M::Node.appendChild>
2138 ($self->{doc}-><M::Document.createTextNode> ('<'));
2139 }
2140 } (Name == 'gt') {
2141 lang:Perl {
2142 $parent-><M::Node.appendChild>
2143 ($self->{doc}-><M::Document.createTextNode> ('>'));
2144 }
2145 } (Name == 'amp') {
2146 lang:Perl {
2147 $parent-><M::Node.appendChild>
2148 ($self->{doc}-><M::Document.createTextNode> ('&'));
2149 }
2150 } (Name == 'quot') {
2151 lang:Perl {
2152 $parent-><M::Node.appendChild>
2153 ($self->{doc}-><M::Document.createTextNode> ('"'));
2154 }
2155 } (Name == 'apos') {
2156 lang:Perl {
2157 $parent-><M::Node.appendChild>
2158 ($self->{doc}-><M::Document.createTextNode> ("'"));
2159 }
2160 } (Name) {
2161 my $er;
2162 lang:Perl ($name => $token.value) : has-error {
2163 ## TODO: Namespace well-formedness
2164 $er = $doc-><M::Document.createEntityReference>
2165 ($name);
2166 $er-><AS::Node.textContent> ('');
2167 ## NOTE: When document entity (and entities referenced directly
2168 ## or indirectly from it) is parsed, no general entity
2169 ## node have its replacement tree. During general
2170 ## entity node collection construction, however,
2171 ## some entity node has replacement tree.
2172 $parent-><M::Node.appendChild> ($er);
2173
2174 my $ent = $self->{general_entity}->{$name};
2175 if (not $ent) { # no entity declaration
2176 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2177 my $location;
2178 __CODE{xp|get-location-from-token::
2179 $token => {$token},
2180 $result => {$location},
2181 }__;
2182 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2183 xp|error-token => {$token},
2184 c|location => {$location},
2185 xp|name => {$name},
2186 }__;
2187 unless ($continue) {
2188 __EXCEPTION{DOMLS|PARSE_ERR}__;
2189 }
2190 } # Otherwise VC error
2191 push @{$self->{entity}}, <Code::getEmptyEntityState::
2192 $name = $name>;
2193 $er-><AS::x|EntityReference.isExpanded> (false);
2194
2195 } else { # there IS entity declaration
2196 if (($self->{standalone} or not $self->{has_xref}) and
2197 $ent->{is_externally_declared} and
2198 not $self->{entity}->[-1]->{is_externally_declared}) {
2199 my $location;
2200 __CODE{xp|get-location-from-token::
2201 $token => {$token},
2202 $result => {$location},
2203 }__;
2204 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2205 xp|error-token => {$token},
2206 c|location => {$location},
2207 xp|name => {$name},
2208 }__;
2209 unless ($continue) {
2210 __EXCEPTION{DOMLS|PARSE_ERR}__;
2211 }
2212 }
2213 $er-><AS::x|EntityReference.isExpanded>
2214 ($ent->{has_replacement_text});
2215 push @{$self->{entity}}, <Code::getCopyOfEntityState::
2216 $entity_type = 'general_entity',
2217 $entity_name = $name>;
2218
2219 if (defined $ent->{notation}) {
2220 my $location;
2221 __CODE{xp|get-location-from-token::
2222 $token => {$token},
2223 $result => {$location},
2224 }__;
2225 my $continue = __c|ERROR{xp|wf-parsed-entity::
2226 xp|error-token => {$token},
2227 c|location => {$location},
2228 xp|name => {$name},
2229 }__;
2230 unless ($continue) {
2231 __EXCEPTION{DOMLS|PARSE_ERR::
2232 }__;
2233 }
2234 } # if unparsed entity
2235
2236 if ($ent->{is_opened}) {
2237 my $location;
2238 __CODE{xp|get-location-from-token::
2239 $token => {$token},
2240 $result => {$location},
2241 }__;
2242 my $continue = __c|ERROR{xp|wf-no-recursion::
2243 xp|error-token => {$token},
2244 c|location => {$location},
2245 xp|name => {$name},
2246 }__;
2247 unless ($continue) {
2248 __EXCEPTION{DOMLS|PARSE_ERR::
2249 }__;
2250 }
2251 $self->{entity}->[-1]->{reptxt} = \'';
2252 $er-><AS::x|EntityReference.isExpanded> (false);
2253 } # recursive
2254 $ent->{is_opened} = true;
2255 } # entity declared
2256 $self->{location} = $self->{entity}->[-1];
2257 push @{$self->{entity_token}}, $self->{token};
2258 $self->{token} = [];
2259 push @{$self->{entity_char}}, $self->{char};
2260 $self->{char} = [];
2261 }
2262
2263 ?lexmode ElementContent;
2264 &content ($doc => $doc, $parent => $er, $ns => $ns);
2265 ~ (#EOF) { }
2266 lang:Perl {
2267 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2268 ->{is_opened} = false
2269 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2270 $self->{token} = pop @{$self->{entity_token}};
2271 $self->{char} = pop @{$self->{entity_char}};
2272 pop @{$self->{entity}};
2273 $self->{location} = $self->{entity}->[-1];
2274 }
2275
2276 // TODO: Set read-only flag
2277
2278 ?lexmode EntityReference;
2279 ?requires-next-token;
2280 }
2281
2282 ~ (REFC) {
2283 ?lexmode ElementContent;
2284 } else {
2285 ?lexmode ElementContent;
2286 }
2287 } // _GeneralEntityReferenceEC
2288
2289 /*
2290 General entity reference in an attribute value literal
2291 */
2292 rule _GeneralEntityReferenceV_ ($vals) {
2293 ?lexmode EntityReference;
2294
2295 ~ (Name == 'lt') {
2296 lang:Perl {
2297 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2298 ('<');
2299 $vals->{value} .= '<';
2300 }
2301 } (Name == 'gt') {
2302 lang:Perl {
2303 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2304 ('>');
2305 $vals->{value} .= '>';
2306 }
2307 } (Name == 'amp') {
2308 lang:Perl {
2309 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2310 ('&');
2311 $vals->{value} .= '&';
2312 }
2313 } (Name == 'quot') {
2314 lang:Perl {
2315 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2316 ('"');
2317 $vals->{value} .= '"';
2318 }
2319 } (Name == 'apos') {
2320 lang:Perl {
2321 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2322 ("'");
2323 $vals->{value} .= "'";
2324 }
2325 } (Name) {
2326 my $er;
2327 lang:Perl ($name => $token.value) : has-error {
2328 ## TODO: Namespace well-formedness
2329
2330 $er = $self->{doc}-><M::Document.createEntityReference> ($name);
2331 $er-><AS::Node.textContent> ('');
2332 ## NOTE: When document entity (and entities referenced directly
2333 ## or indirectly from it) is parsed, no general entity
2334 ## node have its replacement tree. During general
2335 ## entity node collection construction, however,
2336 ## some entity node has replacement tree.
2337 my $ent = $self->{general_entity}->{$name};
2338 if (not $ent) { # no entity declaration
2339 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2340 my $location;
2341 __CODE{xp|get-location-from-token::
2342 $token => {$token},
2343 $result => {$location},
2344 }__;
2345 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2346 xp|error-token => {$token},
2347 c|location => {$location},
2348 xp|name => {$name},
2349 }__;
2350 unless ($continue) {
2351 __EXCEPTION{DOMLS|PARSE_ERR}__;
2352 }
2353 } # Otherwise VC error
2354 push @{$self->{entity}}, <Code::getEmptyEntityState::
2355 $name = $name>;
2356 $er-><AS::x|EntityReference.isExpanded> (false);
2357
2358 } else { # there IS entity declaration
2359 if (($self->{standalone} or not $self->{has_xref}) and
2360 $ent->{is_externally_declared} and
2361 not $self->{entity}->[-1]->{is_externally_declared}) {
2362 my $location;
2363 __CODE{xp|get-location-from-token::
2364 $token => {$token},
2365 $result => {$location},
2366 }__;
2367 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2368 xp|error-token => {$token},
2369 c|location => {$location},
2370 xp|name => {$name},
2371 }__;
2372 unless ($continue) {
2373 __EXCEPTION{DOMLS|PARSE_ERR}__;
2374 }
2375 }
2376
2377 if ($ent->{is_external_entity}) {
2378 my $location;
2379 __CODE{xp|get-location-from-token::
2380 $token => {$token},
2381 $result => {$location},
2382 }__;
2383 my $continue = __c|ERROR{xp|wf-no-external-entity-references::
2384 xp|error-token => {$token},
2385 c|location => {$location},
2386 xp|name => {$name},
2387 }__;
2388 unless ($continue) {
2389 __EXCEPTION{DOMLS|PARSE_ERR::
2390 }__;
2391 }
2392 ## NOTE: |xp:wf-parsed-entity| is not checked
2393 } # if external entity
2394
2395 $er-><AS::x|EntityReference.isExpanded>
2396 ($ent->{has_replacement_text});
2397 push @{$self->{entity}}, <Code::getCopyOfEntityState::
2398 $entity_type = 'general_entity',
2399 $entity_name = $name>;
2400
2401 if ($ent->{is_opened}) {
2402 my $location;
2403 __CODE{xp|get-location-from-token::
2404 $token => {$token},
2405 $result => {$location},
2406 }__;
2407 my $continue = __c|ERROR{xp|wf-no-recursion::
2408 xp|error-token => {$token},
2409 c|location => {$location},
2410 xp|name => {$name},
2411 }__;
2412 unless ($continue) {
2413 __EXCEPTION{DOMLS|PARSE_ERR::
2414 }__;
2415 }
2416 $self->{entity}->[-1]->{reptxt} = \'';
2417 $er-><AS::x|EntityReference.isExpanded> (false);
2418 } # recursive
2419 $ent->{is_opened} = true;
2420 }
2421 push @{$vals->{nodes}}, $er;
2422 $self->{location} = $self->{entity}->[-1];
2423 push @{$self->{entity_token}}, $self->{token};
2424 $self->{token} = [];
2425 push @{$self->{entity_char}}, $self->{char};
2426 $self->{char} = [];
2427 }
2428
2429 ?lexmode AttributeValueLiteralE;
2430 &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);
2431 ~ (#EOF) { }
2432 lang:Perl {
2433 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2434 ->{is_opened} = false
2435 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2436 $self->{token} = pop @{$self->{entity_token}};
2437 $self->{char} = pop @{$self->{entity_char}};
2438 pop @{$self->{entity}};
2439 $self->{location} = $self->{entity}->[-1];
2440 }
2441
2442 // TODO: Set read-only flag
2443
2444 ?lexmode EntityReference;
2445 ?requires-next-token;
2446 }
2447
2448 // ~ (REFC) { }
2449 } // _GeneralEntityReferenceV_
2450
2451 /*
2452 General entity reference in the replacement text
2453 of the entity referenced in an attribute value literal
2454 */
2455 rule _GeneralEntityReferenceAE_ ($parent, $vals)
2456 {
2457 ?lexmode EntityReference;
2458
2459 ~ (Name == 'lt') {
2460 lang:Perl {
2461 $parent-><M::Node.appendChild>
2462 ($self->{doc}-><M::Document.createTextNode> ('<'));
2463 $vals->{value} .= '<';
2464 }
2465 } (Name == 'gt') {
2466 lang:Perl {
2467 $parent-><M::Node.appendChild>
2468 ($self->{doc}-><M::Document.createTextNode> ('>'));
2469 $vals->{value} .= '>';
2470 }
2471 } (Name == 'amp') {
2472 lang:Perl {
2473 $parent-><M::Node.appendChild>
2474 ($self->{doc}-><M::Document.createTextNode> ('&'));
2475 $vals->{value} .= '&';
2476 }
2477 } (Name == 'quot') {
2478 lang:Perl {
2479 $parent-><M::Node.appendChild>
2480 ($self->{doc}-><M::Document.createTextNode> ('"'));
2481 $vals->{value} .= '"';
2482 }
2483 } (Name == 'apos') {
2484 lang:Perl {
2485 $parent-><M::Node.appendChild>
2486 ($self->{doc}-><M::Document.createTextNode> ("'"));
2487 $vals->{value} .= "'";
2488 }
2489 } (Name) {
2490 my $er;
2491 lang:Perl ($name => $token.value) {
2492 ## TODO: Namespace well-formedness
2493
2494 $er = $self->{doc}-><M::Document.createEntityReference> ($name);
2495 $er-><AS::Node.textContent> ('');
2496 ## NOTE: When document entity (and entities referenced directly
2497 ## or indirectly from it) is parsed, no general entity
2498 ## node have its replacement tree. During general
2499 ## entity node collection construction, however,
2500 ## some entity node has replacement tree.
2501 my $ent = $self->{general_entity}->{$name};
2502 if (not $ent) { # no entity declaration
2503 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2504 my $location;
2505 __CODE{xp|get-location-from-token::
2506 $token => {$token},
2507 $result => {$location},
2508 }__;
2509 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2510 xp|error-token => {$token},
2511 c|location => {$location},
2512 xp|name => {$name},
2513 }__;
2514 unless ($continue) {
2515 __EXCEPTION{DOMLS|PARSE_ERR}__;
2516 }
2517 } # Otherwise VC error
2518 push @{$self->{entity}}, <Code::getEmptyEntityState::
2519 $name = $name>;
2520 $er-><AS::x|EntityReference.isExpanded> (false);
2521
2522 } else { # there IS entity declaration
2523 if (($self->{standalone} or not $self->{has_xref}) and
2524 $ent->{is_externally_declared} and
2525 not $self->{entity}->[-1]->{is_externally_declared}) {
2526 my $location;
2527 __CODE{xp|get-location-from-token::
2528 $token => {$token},
2529 $result => {$location},
2530 }__;
2531 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2532 xp|error-token => {$token},
2533 c|location => {$location},
2534 xp|name => {$name},
2535 }__;
2536 unless ($continue) {
2537 __EXCEPTION{DOMLS|PARSE_ERR}__;
2538 }
2539 }
2540
2541 if ($ent->{is_external_entity}) {
2542 my $location;
2543 __CODE{xp|get-location-from-token::
2544 $token => {$token},
2545 $result => {$location},
2546 }__;
2547 my $continue = __c|ERROR{xp|wf-no-external-entity-references::
2548 xp|error-token => {$token},
2549 c|location => {$location},
2550 xp|name => {$name},
2551 }__;
2552 unless ($continue) {
2553 __EXCEPTION{DOMLS|PARSE_ERR::
2554 }__;
2555 }
2556 ## NOTE: |xp:wf-parsed-entity| is not checked
2557 } # if external entity
2558
2559 $er-><AS::x|EntityReference.isExpanded>
2560 ($ent->{has_replacement_text});
2561 push @{$self->{entity}}, <Code::getCopyOfEntityState::
2562 $entity_type = 'general_entity',
2563 $entity_name = $name>;
2564
2565 if ($ent->{is_opened}) {
2566 my $location;
2567 __CODE{xp|get-location-from-token::
2568 $token => {$token},
2569 $result => {$location},
2570 }__;
2571 my $continue = __c|ERROR{xp|wf-no-recursion::
2572 xp|error-token => {$token},
2573 c|location => {$location},
2574 xp|name => {$name},
2575 }__;
2576 unless ($continue) {
2577 __EXCEPTION{DOMLS|PARSE_ERR::
2578 }__;
2579 }
2580 $self->{entity}->[-1]->{reptxt} = \'';
2581 $er-><AS::x|EntityReference.isExpanded> (false);
2582 } # recursive
2583 $ent->{is_opened} = true;
2584 }
2585 $parent-><M::Node.appendChild> ($er);
2586 $self->{location} = $self->{entity}->[-1];
2587 push @{$self->{entity_token}}, $self->{token};
2588 $self->{token} = [];
2589 push @{$self->{entity_char}}, $self->{char};
2590 $self->{char} = [];
2591 }
2592
2593 ?lexmode AttributeValueLiteralE;
2594 &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);
2595 ~ (#EOF) { }
2596 lang:Perl {
2597 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2598 ->{is_opened} = false
2599 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2600 $self->{token} = pop @{$self->{entity_token}};
2601 $self->{char} = pop @{$self->{entity_char}};
2602 pop @{$self->{entity}};
2603 $self->{location} = $self->{entity}->[-1];
2604 }
2605
2606 // TODO: Set read-only flag
2607
2608 ?lexmode EntityReference;
2609 ?requires-next-token;
2610 }
2611
2612 // ~ (REFC) { }
2613 } // _GeneralEntityReferenceAE_
2614
2615 /*
2616 General entity reference in literal entity value
2617 */
2618 rule _GeneralEntityReferenceEV_ ($vals) {
2619 ?lexmode 'EntityReference';
2620
2621 ~ (Name) {
2622 lang:Perl ($name => $token.value) {
2623 ## TODO: Namespace well-formedness
2624 ## TODO: Entity declared constraints
2625 push @$vals, $name;
2626 }
2627 }
2628
2629 // No expansion
2630
2631 // ~ (REFC) { }
2632 } // _GeneralEntityReferenceEV_
2633
2634 /*
2635 Document Type Declaration
2636 */
2637 rule _DocumentTypeDeclaration_ ($doc) {
2638 ?lexmode MarkupDeclaration;
2639
2640 ~ (Name == 'DOCTYPE') { }
2641
2642 ~ (S) { }
2643
2644 // Document type name
2645 my $name;
2646 ~ (Name) {
2647 lang:Perl ($v => $token.value) {
2648 $name = $v;
2649 }
2650 }
2651
2652 my $node;
2653 my $decl;
2654 lang:Perl {
2655 $self->{docx} = $self->{doc}
2656 -><M::Node.getFeature> (<Q::fe:XDoctype>, '3.0');
2657 $node = $self->{docx}-><M::DocumentXDoctype.createDocumentTypeDefinition>
2658 ($name);
2659 $decl = $self->{dtdecl} = $node-><M::Node.getFeature>
2660 (<Q::fe:XDoctypeDeclaration>, '3.0');
2661 }
2662
2663 ~? (S) {
2664 ~? (Name == 'PUBLIC') {
2665 ~ (S) { }
2666
2667 &PubidLiteral ($decl => $decl);
2668
2669 ~ (S) { }
2670
2671 &SystemLiteral ($decl => $decl);
2672
2673 ~? (S) { }
2674
2675 lang:Perl {
2676 $self->{has_xref} = true;
2677 }
2678 } (Name == 'SYSTEM') {
2679 ~ (S) { }
2680
2681 &SystemLiteral ($decl => $decl);
2682
2683 ~? (S) { }
2684
2685 lang:Perl {
2686 $self->{has_xref} = true;
2687 }
2688 }
2689 }
2690
2691 lang:Perl {
2692 $self->{dtdef} = $node;
2693 $self->{doc}-><M::Node.appendChild> ($node);
2694 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
2695 ('schema-type' => <Q::xml-dtd:>);
2696 ## ISSUE: Should default schema language information be
2697 ## preserved by some other flag?
2698 }
2699
2700 ~? (DSO) {
2701 &InternalSubset ($doc => $doc, $doctype => $node);
2702
2703 ~ (DSC) {
2704 ?lexmode MarkupDeclaration;
2705 } else {
2706 ?lexmode MarkupDeclaration;
2707 }
2708
2709 ~? (S) { }
2710 }
2711
2712 // ~ (MDC) { }
2713 } // _DocumentTypeDeclaration_
2714
2715 /*
2716 Public Identifier Literal
2717 */
2718 rule PubidLiteral ($decl) {
2719 my $pubid;
2720 my $pubid_token;
2721 ~ (LIT) {
2722 ?lexmode SystemLiteral;
2723
2724 ~? (STRING) {
2725 lang:Perl ($v => $token.value) {
2726 $pubid = $v;
2727 $pubid_token = $token;
2728 }
2729 }
2730
2731 ~ (LIT) {
2732 ?lexmode MarkupDeclaration;
2733 } else {
2734 ?lexmode MarkupDeclaration;
2735 }
2736 } (LITA) {
2737 ?lexmode SystemLiteralA;
2738
2739 ~? (STRING) {
2740 lang:Perl ($v => $token.value) {
2741 $pubid = $v;
2742 $pubid_token = $token;
2743 }
2744 }
2745
2746 ~ (LITA) {
2747 ?lexmode MarkupDeclaration;
2748 } else {
2749 ?lexmode MarkupDeclaration;
2750 }
2751 }
2752
2753 if-true ($pubid_token) {
2754 lang:Perl : has-error {
2755 if ($pubid =~ m{[^\x20\x0D\x0Aa-zA-Z0-9'()+,./:=?;!*#\@\$_%-]}s) {
2756 my $location;
2757 __CODE{xp|get-location-from-token::
2758 $token => {$pubid_token},
2759 $result => {$location},
2760 }__;
2761 ## Should this be other (new) error type?
2762 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
2763 xp|error-token => {$token},
2764 c|location => {$location},
2765 }__;
2766 unless ($continue) {
2767 __EXCEPTION{DOMLS|PARSE_ERR::
2768 }__;
2769 }
2770 }
2771
2772 ## NOTE: U+0009 is syntactically illegal.
2773 $pubid =~ s/[\x09\x0A\x0D\x20]+/\x20/gs;
2774 $pubid =~ s/\A\x20//s;
2775 $pubid =~ s/\x20\z//s;
2776 ## NOTE: Bare attribute name is written.
2777 $decl->public_id ($pubid);
2778 }
2779 }
2780 } // PubidLiteral
2781
2782 /*
2783 System Identifier Literal
2784 */
2785 rule SystemLiteral ($decl) {
2786 ~ (LIT) {
2787 ?lexmode SystemLiteral;
2788 &_SystemLiteral ($decl => $decl);
2789 } (LITA) {
2790 ?lexmode SystemLiteralA;
2791 &_SystemLiteral ($decl => $decl);
2792 }
2793 } // SystemLiteral
2794
2795 /*
2796 System Identifier Literal Content
2797 */
2798 rule _SystemLiteral ($decl) {
2799 // LIT or LITA
2800
2801 ~? (STRING) {
2802 lang:Perl ($v => $token.value) {
2803 ## NOTE: Bare attribute name is written.
2804 $decl->system_id ($v);
2805 }
2806 }
2807
2808 ~ (LIT) {
2809 ?lexmode MarkupDeclaration;
2810 } (LITA) {
2811 ?lexmode MarkupDeclaration;
2812 } else {
2813 ?lexmode MarkupDeclaration;
2814 }
2815 } // _SystemLiteral
2816
2817 /*
2818 DTD Internal Subset
2819
2820 intSubset := *(markupdecl / DeclSep) ;; [28b]
2821 */
2822 rule InternalSubset ($doc, $doctype) {
2823 ?lexmode DTD;
2824
2825 ~* (MDO) {
2826 ?lexmode MarkupDeclaration;
2827
2828 ~ (Name == 'ELEMENT') {
2829 &_ElementDeclaration ($doc => $doc);
2830 } (Name == 'ATTLIST') {
2831 &_AttlistDeclaration ($doc => $doc, $doctype => $doctype);
2832 } (Name == 'ENTITY') {
2833 &_EntityDeclaration ($doc => $doc);
2834 } (Name == 'NOTATION') {
2835 &_NotationDeclaration ($doc => $doc);
2836 }
2837 } (S) {
2838 //
2839 } (CDO) {
2840 &_CommentDeclarationDTD ($doc => $doc);
2841 } (PIO) {
2842 &_ProcessingInstructionDTD ($doc => $doc, $doctype => $doctype);
2843 } (PERO) {
2844 ?lexmode EntityReference;
2845
2846 lang:Perl {
2847 $self->{has_xref} = true;
2848 }
2849
2850 ~ (Name) {
2851
2852 }
2853
2854 ~ (REFC) {
2855 ?lexmode DTD;
2856 } else {
2857 ?lexmode DTD;
2858 }
2859 }
2860 } // InternalSubset
2861
2862 rule _ElementDeclaration ($doc) {
2863 // ~ (MDO) { }
2864 // ?lexmode MarkupDeclaration
2865 // ~ (Name == 'Element') { }
2866
2867 ~ (S) { }
2868
2869 ~ (Name) {
2870
2871 }
2872
2873 ?lexmode ElementDeclaration;
2874
2875 ~ (S) { }
2876
2877 // contentspec
2878 ~ (MGO) {
2879 &_ContentModel ($doc => $doc);
2880 } (Name == 'EMPTY') {
2881
2882 } (Name == 'ANY') {
2883
2884 }
2885
2886 ~? (S) { }
2887
2888 ~ (MDC) {
2889 ?lexmode DTD;
2890 } else {
2891 ?lexmode DTD;
2892 }
2893 } // _ElementDeclaration
2894
2895 rule _ContentModel ($doc) {
2896 // ~ (MGO) { }
2897
2898 ~? (S) { }
2899
2900 ~ (Name) {
2901 // Element content model
2902 &_ModelGroup ($doc => $doc)
2903 : unshift-current-token;
2904
2905 ~? (OPT) {
2906
2907 } (REP) {
2908
2909 } (PLUS) {
2910
2911 }
2912
2913 } (MDO) {
2914 &_ModelGroup ($doc => $doc)
2915 : unshift-current-token;
2916
2917 ~? (OPT) {
2918
2919 } (REP) {
2920
2921 } (PLUS) {
2922
2923 }
2924
2925 } (PCDATA) {
2926 // Mixed content declaration
2927 ~? (S) { }
2928
2929 ~* (OR) {
2930 ~? (S) { }
2931
2932 ~ (Name) {
2933
2934 }
2935
2936 ~? (S) { }
2937 }
2938
2939 ~ (MGC) { }
2940
2941 ~? (REP) {
2942
2943 } else {
2944 // TODO: error if |Name|
2945 }
2946
2947
2948 }
2949 } // _ContentModel
2950
2951 rule _ModelGroup ($doc)
2952 : standalone
2953 : recursive
2954 {
2955 // ~ (MGO) { }
2956 // ~? (S) { }
2957
2958 &ContentParticle ($doc => $doc);
2959
2960 ~? (S) { }
2961
2962 ~? (OR) {
2963 ~? (S) { }
2964
2965 &ContentParticle ($doc => $doc);
2966
2967 ~? (S) { }
2968
2969 ~* (OR) {
2970 ~? (S) { }
2971
2972 &ContentParticle ($doc => $doc);
2973
2974 ~? (S) { }
2975 }
2976
2977 } (SEQ) {
2978 ~? (S) { }
2979
2980 &ContentParticle ($doc => $doc);
2981
2982 ~? (S) { }
2983
2984 ~* (SEQ) {
2985 ~? (S) { }
2986
2987 &ContentParticle ($doc => $doc);
2988
2989 ~? (S) { }
2990 }
2991
2992 }
2993
2994 ~ (MGC) { }
2995 } // _ModelGroup
2996
2997 rule ContentParticle ($doc) {
2998 ~ (Name) {
2999
3000 } (MGO) {
3001 ~? (S) { }
3002
3003 &_ModelGroup ($doc => $doc);
3004 }
3005
3006 ~? (OPT) {
3007
3008 } (REP) {
3009
3010 } (PLUS) {
3011
3012 }
3013 } // ContentParticle
3014
3015 /*
3016 Attribute list declaration
3017 */
3018 rule _AttlistDeclaration ($doc, $doctype) {
3019 // ~ (MDO) { }
3020 // ~ (Name == 'ATTLIST') { }
3021
3022 ?lexmode AttlistDeclaration;
3023
3024 ~ (S) { }
3025
3026 my $name;
3027 ~ (Name) {
3028 lang:Perl ($v => $token.value) {
3029 $name = $v;
3030 }
3031 } else {
3032 lang:Perl { $name = '#ILLEGAL' }
3033 }
3034
3035 my $docxd;
3036 my $et;
3037 lang:Perl {
3038 $et = $doctype-><M::DTDef.getElementTypeDefinitionNode> ($name);
3039 unless ($et) {
3040 $docxd = $doc-><M::Node.getFeature> (<Q::fe:XDoctype>, '3.0');
3041 $et = $docxd-><M::DocumentXDoctype.createElementTypeDefinition>
3042 ($name);
3043 $doctype-><M::DTDef.setElementTypeDefinitionNode> ($et)
3044 unless $name eq '#ILLEGAL';
3045 }
3046 }
3047
3048 ~? (S) { }
3049
3050 ~* (Name) {
3051 my $at;
3052 lang:Perl ($v => $token.value) {
3053 $docxd ||= $doc-><M::Node.getFeature>
3054 (<Q::fe:XDoctype>, '3.0');
3055 $at = $docxd-><M::DocumentXDoctype.createAttributeDefinition> ($v);
3056 unless (exists $et-><AG::ETDef.attributeDefinitions>->{$v}) {
3057 $et-><M::ETDef.setAttributeDefinitionNode> ($at);
3058 $self->{attr}->{$name}->{$v} = $at;
3059 }
3060 }
3061
3062 ~ (S) { }
3063
3064 // AttType
3065 ~ (Name == 'NOTATION') {
3066 ~ (S) { }
3067
3068 my $kwd;
3069 lang:Perl {
3070 $at-><AS::ATDef.declaredType> (<C::ATDef.NOTATION_ATTR>);
3071 $kwd = $at-><AG::ATDef.allowedTokens>;
3072 }
3073
3074 ~ (EGO) {
3075 ~? (S) { }
3076
3077 ~+ (Name) {
3078 lang:Perl ($v => $token.value) {
3079 push @$kwd, $v;
3080 }
3081
3082 ~? (S) { }
3083 } (OR) : separator {
3084 ~? (S) { }
3085 }
3086
3087 ~ (EGC) { }
3088 }
3089
3090 } (Name) {
3091 my $type;
3092 lang:Perl ($v => $token.value) : has-error {
3093 my $map = {
3094 CDATA => <C::ATDef.CDATA_ATTR>,
3095 ID => <C::ATDef.ID_ATTR>,
3096 IDREF => <C::ATDef.IDREF_ATTR>,
3097 IDREFS => <C::ATDef.IDREFS_ATTR>,
3098 ENTITY => <C::ATDef.ENTITY_ATTR>,
3099 ENTITIES => <C::ATDef.ENTITIES_ATTR>,
3100 NMTOKEN => <C::ATDef.NMTOKEN_ATTR>,
3101 NMTOKENS => <C::ATDef.NMTOKENS_ATTR>,
3102 };
3103 if ($map->{$v}) {
3104 $at-><AS::ATDef.declaredType> ($map->{$v});
3105 } else {
3106 ## TODO: Exception
3107 }
3108 }
3109
3110 } (EGO) {
3111 ?lexmode Enumeration;
3112
3113 ~? (S) { }
3114
3115 my $kwd;
3116 lang:Perl {
3117 $at-><AS::ATDef.declaredType> (<C::ATDef.ENUMERATION_ATTR>);
3118 $kwd = $at-><AG::ATDef.allowedTokens>;
3119 }
3120
3121 ~+ (Nmtoken) {
3122 lang:Perl ($v => $token.value) {
3123 push @$kwd, $v;
3124 }
3125
3126 ~? (S) { }
3127 } (OR) : separator {
3128 ~? (S) { }
3129 }
3130
3131 ~ (EGC) {
3132 ?lexmode AttlistDeclaration;
3133 } else {
3134 ?lexmode AttlistDeclaration;
3135 }
3136
3137 }
3138
3139 ~ (S) { }
3140
3141 // DefaultDecl
3142 ~ (RNI) {
3143 ~ (Name == 'REQUIRED') {
3144 lang:Perl {
3145 $at-><AS::ATDef.defaultType> (<C::ATDef.REQUIRED_DEFAULT>);
3146 }
3147 } (Name == 'IMPLIED') {
3148 lang:Perl {
3149 $at-><AS::ATDef.defaultType> (<C::ATDef.IMPLIED_DEFAULT>);
3150 }
3151 } (Name == 'FIXED') {
3152 ~ (S) { }
3153
3154 lang:Perl {
3155 $at-><AS::ATDef.defaultType> (<C::ATDef.FIXED_DEFAULT>);
3156 }
3157
3158 ~ (LIT) {
3159 my $vals;
3160 lang:Perl {
3161 $vals = {nodes => [], value => ''};
3162 }
3163
3164 &_AttributeValueSpecification_ ($doc => $doc, $vals => $vals);
3165
3166 lang:Perl {
3167 for (@{$vals->{nodes}}) {
3168 $at-><M::Node.appendChild> ($_);
3169 }
3170 }
3171
3172 ~ (LIT) {
3173 ?lexmode AttlistDeclaration;
3174 } else {
3175 ?lexmode AttlistDeclaration;
3176 }
3177 } (LITA) {
3178 my $vals;
3179 lang:Perl {
3180 $vals = {nodes => [], value => ''};
3181 }
3182
3183 &_AttributeValueSpecificationA_ ($doc => $doc, $vals => $vals);
3184
3185 lang:Perl {
3186 for (@{$vals->{nodes}}) {
3187 $at-><M::Node.appendChild> ($_);
3188 }
3189 }
3190
3191 ~ (LITA) {
3192 ?lexmode AttlistDeclaration;
3193 } else {
3194 ?lexmode AttlistDeclaration;
3195 }
3196 }
3197 }
3198
3199 } (LIT) {
3200 my $vals;
3201 lang:Perl {
3202 $at-><AS::ATDef.defaultType> (<C::ATDef.EXPLICIT_DEFAULT>);
3203 $vals = {nodes => [], value => ''};
3204 }
3205
3206 &_AttributeValueSpecification_ ($doc => $doc, $vals => $vals);
3207
3208 lang:Perl {
3209 for (@{$vals->{nodes}}) {
3210 $at-><M::Node.appendChild> ($_);
3211 }
3212 }
3213
3214 ~ (LIT) {
3215 ?lexmode AttlistDeclaration;
3216 } else {
3217 ?lexmode AttlistDeclaration;
3218 }
3219 } (LITA) {
3220 my $vals;
3221 lang:Perl {
3222 $at-><AS::ATDef.defaultType> (<C::ATDef.EXPLICIT_DEFAULT>);
3223 $vals = {nodes => [], value => ''};
3224 }
3225
3226 &_AttributeValueSpecificationA_ ($doc => $doc, $vals => $vals);
3227
3228 lang:Perl {
3229 for (@{$vals->{nodes}}) {
3230 $at-><M::Node.appendChild> ($_);
3231 }
3232 }
3233
3234 ~ (LITA) {
3235 ?lexmode AttlistDeclaration;
3236 } else {
3237 ?lexmode AttlistDeclaration;
3238 }
3239 }
3240
3241 } (S) : separator : terminator? {
3242 //
3243 }
3244
3245 ~ (MDC) {
3246 ?lexmode DTD;
3247 } else {
3248 ?lexmode DTD;
3249 }
3250 } // _AttlistDeclaration
3251
3252 /*
3253 Entity declaration
3254 */
3255 rule _EntityDeclaration ($doc) {
3256 // ~ (MDO) { }
3257 // ~ (Name == ENTITY) { }
3258
3259 ~ (S) { }
3260
3261 my $is_param_entity;
3262 my $decl;
3263 lang:Perl { $decl = { name => '#ILLEGAL', reptxt => \'' }; }
3264
3265 ~? (PERO) {
3266 ~ (S) { }
3267 lang:Perl {
3268 $is_param_entity = $decl->{is_param_entity} = true;
3269 }
3270 }
3271
3272 /*
3273 TODO: Set |$decl->{is_externally_declared}| flag
3274 and |Entity.isExternallyDeclared| attribute
3275 for entity declarations in external subset or
3276 in parameter entity.
3277 */
3278
3279 ~ (Name) {
3280 lang:Perl ($v => $token.value) {
3281 $decl->{name} = $v;
3282 }
3283 }
3284
3285 my $node;
3286 lang:Perl {
3287 $node =
3288 $decl->{node} = $self->{docx}-><M::DocumentXDoctype.createGeneralEntity>
3289 ($decl->{name});
3290 ## TODO: Parameter entity...
3291 }
3292
3293 ~ (S) { }
3294
3295 ~ (LIT) {
3296 &_EntityValue ($doc => $doc, $decl => $decl);
3297 } (LITA) {
3298 &_EntityValueA ($doc => $doc, $decl => $decl);
3299 } (Name == 'PUBLIC') {
3300 ~ (S) { }
3301
3302 &PubidLiteral ($decl => $node);
3303
3304 ~ (S) { }
3305
3306 &SystemLiteral ($decl => $node);
3307
3308 lang:Perl {
3309 $decl->{is_external_entity} = true;
3310 }
3311 } (Name == 'SYSTEM') {
3312 ~ (S) { }
3313
3314 &SystemLiteral ($decl => $node);
3315
3316 lang:Perl {
3317 $decl->{is_external_entity} = true;
3318 }
3319 }
3320
3321 ~? (S) {
3322 ~? (Name == 'NDATA') {
3323 if-true ($is_param_entity) {
3324 lang:Perl : has-error {
3325 my $location;
3326 __CODE{xp|get-location-from-token::
3327 $token => {$token},
3328 $result => {$location},
3329 }__;
3330 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
3331 xp|error-token => {$token},
3332 c|location => {$location},
3333 }__;
3334 unless ($continue) {
3335 __EXCEPTION{DOMLS|PARSE_ERR::
3336 }__;
3337 }
3338 }
3339 }
3340
3341 ~ (S) { }
3342
3343 ~ (Name) {
3344 lang:Perl ($v => $token.value) {
3345 $decl->{notation} = $v;
3346 $decl->{node}-><AG::x|Entity.notationName> ($v);
3347 }
3348 }
3349
3350 ~? (S) { }
3351 }
3352 }
3353
3354 lang:Perl {
3355 if ($self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}
3356 ->{$decl->{name}}) {
3357 ## TODO: warning
3358 ## TODO: predefined entity error check
3359 } else {
3360 $self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}
3361 ->{$decl->{name}} = $decl;
3362 $self->{dtdef}-><M::DTDef.setGeneralEntityNode> ($decl->{node})
3363 unless $decl->{is_param_entity};
3364 }
3365 }
3366
3367 ~ (MDC) {
3368 ?lexmode DTD;
3369 } else {
3370 ?lexmode DTD;
3371 }
3372 } // _EntityDeclaration
3373
3374 rule _NotationDeclaration ($doc) {
3375 // ~ (MDO) { }
3376 // ~ (Name == NOTATION) { }
3377
3378 ~ (S) { }
3379
3380 ~ (Name) {
3381
3382 }
3383
3384 ~ (S) { }
3385
3386 my $decl;
3387 lang:Perl {
3388 $decl = $self->{docx}-><M::DocumentXDoctype.createGeneralEntity>
3389 ($decl->{name});
3390 ## Temporary: to avoid error.
3391 }
3392
3393 ~ (Name == 'PUBLIC') {
3394 ~ (S) { }
3395
3396 &PubidLiteral ($decl => $decl);
3397
3398 ~? (S) {
3399 ~? (LIT) {
3400 ?lexmode SystemLiteral;
3401 &_SystemLiteral ($decl => $decl);
3402
3403 ~? (S) { }
3404 } (LITA) {
3405 ?lexmode SystemLiteralA;
3406 &_SystemLiteral ($decl => $decl);
3407
3408 ~? (S) { }
3409 }
3410 }
3411 } (Name == 'SYSTEM') {
3412 ~ (S) { }
3413
3414 &SystemLiteral ($decl => $decl);
3415
3416 ~? (S) { }
3417 }
3418
3419 ~ (MDC) {
3420 ?lexmode DTD;
3421 } else {
3422 ?lexmode DTD;
3423 }
3424 } // _NotationDeclaration
3425
3426 rule _EntityValue ($decl) {
3427 ?lexmode EntityValue;
3428
3429 my $vals;
3430 my $reptxt;
3431 lang:Perl {
3432 $vals = [];
3433 $reptxt = '';
3434 }
3435
3436 ~* (STRING) {
3437 lang:Perl ($v => $token.value) {
3438 $reptxt .= $v;
3439 }
3440 } (PERO) {
3441 ?lexmode EntityDeclaration;
3442
3443 lang:Perl {
3444 $self->{has_xref} = true;
3445 }
3446
3447 // TODO: Expand or wferror if internal subset
3448
3449 ~ (Name) {
3450
3451 }
3452
3453 ~ (REFC) {
3454 ?lexmode EntityValue;
3455 } else {
3456 ?lexmode EntityValue;
3457 }
3458 } (HCRO) {
3459 &_HexadecimalCharacterReferenceEV_ ($vals => $vals);
3460
3461 lang:Perl {
3462 $reptxt .= $vals->[-1];
3463 }
3464
3465 ~ (REFC) {
3466 ?lexmode EntityValue;
3467 } else {
3468 ?lexmode EntityValue;
3469 }
3470 } (CRO) {
3471 &_NumericCharacterReferenceEV_ ($vals => $vals);
3472
3473 lang:Perl {
3474 $reptxt .= $vals->[-1];
3475 }
3476
3477 ~ (REFC) {
3478 ?lexmode EntityValue;
3479 } else {
3480 ?lexmode EntityValue;
3481 }
3482 } (ERO) {
3483 &_GeneralEntityReferenceEV_ ($vals => $vals);
3484
3485 lang:Perl {
3486 $reptxt .= '&' . $vals->[-1] . ';';
3487 }
3488
3489 ~ (REFC) {
3490 ?lexmode EntityValue;
3491 } else {
3492 ?lexmode EntityValue;
3493 }
3494 }
3495
3496 ~ (LIT) {
3497 ?lexmode MarkupDeclaration;
3498 } (LITA) {
3499 ?lexmode MarkupDeclaration;
3500 } else {
3501 ?lexmode MarkupDeclaration;
3502 }
3503
3504 lang:Perl {
3505 $decl->{reptxt} = \$reptxt;
3506 $decl->{has_replacement_text} = true;
3507 }
3508 } // _EntityValue
3509
3510 rule _EntityValueA ($decl) {
3511 ?lexmode EntityValueA;
3512
3513 my $vals;
3514 my $reptxt;
3515 lang:Perl {
3516 $vals = [];
3517 $reptxt = '';
3518 }
3519
3520 ~* (STRING) {
3521 lang:Perl ($v => $token.value) {
3522 $reptxt .= $v;
3523 }
3524 } (PERO) {
3525 ?lexmode EntityDeclaration;
3526
3527 lang:Perl {
3528 $self->{has_xref} = true;
3529 }
3530
3531 // TODO: implement this
3532 ~ (Name) {
3533
3534 }
3535
3536 ~ (REFC) {
3537 ?lexmode EntityValueA;
3538 } else {
3539 ?lexmode EntityValueA;
3540 }
3541 } (HCRO) {
3542 &_HexadecimalCharacterReferenceEV_ ($vals => $vals);
3543
3544 lang:Perl {
3545 $reptxt .= $vals->[-1];
3546 }
3547
3548
3549 ~ (REFC) {
3550 ?lexmode EntityValueA;
3551 } else {
3552 ?lexmode EntityValueA;
3553 }
3554 } (CRO) {
3555 &_NumericCharacterReferenceEV_ ($vals => $vals);
3556
3557 lang:Perl {
3558 $reptxt .= $vals->[-1];
3559 }
3560
3561 ~ (REFC) {
3562 ?lexmode EntityValueA;
3563 } else {
3564 ?lexmode EntityValueA;
3565 }
3566 } (ERO) {
3567 &_GeneralEntityReferenceEV_ ($vals => $vals);
3568
3569 lang:Perl {
3570 $reptxt .= '&' . $vals->[-1] . ';';
3571 }
3572
3573 ~ (REFC) {
3574 ?lexmode EntityValueA;
3575 } else {
3576 ?lexmode EntityValueA;
3577 }
3578 }
3579
3580 ~ (LITA) {
3581 ?lexmode MarkupDeclaration;
3582 } else {
3583 ?lexmode MarkupDeclaration;
3584 }
3585
3586 lang:Perl {
3587 $decl->{reptxt} = \$reptxt;
3588 $decl->{has_replacement_text} = true;
3589 }
3590 } // _EntityValueA
3591
3592
3593 /*
3594 XML Name
3595 */
3596 lexmode NameChar {
3597 $NameStartChar10 := [
3598 '_' ':'
3599 // Letter
3600 // BaseChar
3601 U+0041..U+005A U+0061..U+007A U+00C0..U+00D6
3602 U+00D8..U+00F6 U+00F8..U+00FF U+0100..U+0131
3603 U+0134..U+013E U+0141..U+0148 U+014A..U+017E
3604 U+0180..U+01C3 U+01CD..U+01F0 U+01F4..U+01F5
3605 U+01FA..U+0217 U+0250..U+02A8 U+02BB..U+02C1
3606 U+0386 U+0388..U+038A U+038C U+038E..U+03A1
3607 U+03A3..U+03CE U+03D0..U+03D6 U+03DA U+03DC
3608 U+03DE U+03E0 U+03E2..U+03F3 U+0401..U+040C
3609 U+040E..U+044F U+0451..U+045C U+045E..U+0481
3610 U+0490..U+04C4 U+04C7..U+04C8 U+04CB..U+04CC
3611 U+04D0..U+04EB U+04EE..U+04F5 U+04F8..U+04F9
3612 U+0531..U+0556 U+0559 U+0561..U+0586
3613 U+05D0..U+05EA U+05F0..U+05F2 U+0621..U+063A
3614 U+0641..U+064A U+0671..U+06B7 U+06BA..U+06BE
3615 U+06C0..U+06CE U+06D0..U+06D3 U+06D5
3616 U+06E5..U+06E6 U+0905..U+0939 U+093D
3617 U+0958..U+0961 U+0985..U+098C U+098F..U+0990
3618 U+0993..U+09A8 U+09AA..U+09B0 U+09B2
3619 U+09B6..U+09B9 U+09DC..U+09DD U+09DF..U+09E1
3620 U+09F0..U+09F1 U+0A05..U+0A0A U+0A0F..U+0A10
3621 U+0A13..U+0A28 U+0A2A..U+0A30 U+0A32..U+0A33
3622 U+0A35..U+0A36 U+0A38..U+0A39 U+0A59..U+0A5C
3623 U+0A5E U+0A72..U+0A74 U+0A85..U+0A8B U+0A8D
3624 U+0A8F..U+0A91 U+0A93..U+0AA8 U+0AAA..U+0AB0
3625 U+0AB2..U+0AB3 U+0AB5..U+0AB9 U+0ABD U+0AE0
3626 U+0B05..U+0B0C U+0B0F..U+0B10 U+0B13..U+0B28
3627 U+0B2A..U+0B30 U+0B32..U+0B33 U+0B36..U+0B39
3628 U+0B3D U+0B5C..U+0B5D U+0B5F..U+0B61
3629 U+0B85..U+0B8A U+0B8E..U+0B90 U+0B92..U+0B95
3630 U+0B99..U+0B9A U+0B9C U+0B9E..U+0B9F
3631 U+0BA3..U+0BA4 U+0BA8..U+0BAA U+0BAE..U+0BB5
3632 U+0BB7..U+0BB9 U+0C05..U+0C0C U+0C0E..U+0C10
3633 U+0C12..U+0C28 U+0C2A..U+0C33 U+0C35..U+0C39
3634 U+0C60..U+0C61 U+0C85..U+0C8C U+0C8E..U+0C90
3635 U+0C92..U+0CA8 U+0CAA..U+0CB3 U+0CB5..U+0CB9
3636 U+0CDE U+0CE0..U+0CE1 U+0D05..U+0D0C
3637 U+0D0E..U+0D10 U+0D12..U+0D28 U+0D2A..U+0D39
3638 U+0D60..U+0D61 U+0E01..U+0E2E U+0E30
3639 U+0E32..U+0E33 U+0E40..U+0E45 U+0E81..U+0E82
3640 U+0E84 U+0E87..U+0E88 U+0E8A U+0E8D
3641 U+0E94..U+0E97 U+0E99..U+0E9F U+0EA1..U+0EA3
3642 U+0EA5 U+0EA7 U+0EAA..U+0EAB U+0EAD..U+0EAE
3643 U+0EB0 U+0EB2..U+0EB3 U+0EBD U+0EC0..U+0EC4
3644 U+0F40..U+0F47 U+0F49..U+0F69 U+10A0..U+10C5
3645 U+10D0..U+10F6 U+1100 U+1102..U+1103
3646 U+1105..U+1107 U+1109 U+110B..U+110C
3647 U+110E..U+1112 U+113C U+113E U+1140 U+114C
3648 U+114E U+1150 U+1154..U+1155 U+1159
3649 U+115F..U+1161 U+1163 U+1165 U+1167 U+1169
3650 U+116D..U+116E U+1172..U+1173 U+1175 U+119E
3651 U+11A8 U+11AB U+11AE..U+11AF U+11B7..U+11B8
3652 U+11BA U+11BC..U+11C2 U+11EB U+11F0 U+11F9
3653 U+1E00..U+1E9B U+1EA0..U+1EF9 U+1F00..U+1F15
3654 U+1F18..U+1F1D U+1F20..U+1F45 U+1F48..U+1F4D
3655 U+1F50..U+1F57 U+1F59 U+1F5B U+1F5D
3656 U+1F5F..U+1F7D U+1F80..U+1FB4 U+1FB6..U+1FBC
3657 U+1FBE U+1FC2..U+1FC4 U+1FC6..U+1FCC
3658 U+1FD0..U+1FD3 U+1FD6..U+1FDB U+1FE0..U+1FEC
3659 U+1FF2..U+1FF4 U+1FF6..U+1FFC U+2126
3660 U+212A..U+212B U+212E U+2180..U+2182
3661 U+3041..U+3094 U+30A1..U+30FA U+3105..U+312C
3662 U+AC00..U+D7A3
3663 // Ideographic
3664 U+4E00..U+9FA5 U+3007 U+3021..U+3029
3665 ];
3666 $NameChar10 := [
3667 '.' '-' '_' ':'
3668 // Letter
3669 // BaseChar
3670 U+0041..U+005A U+0061..U+007A U+00C0..U+00D6
3671 U+00D8..U+00F6 U+00F8..U+00FF U+0100..U+0131
3672 U+0134..U+013E U+0141..U+0148 U+014A..U+017E
3673 U+0180..U+01C3 U+01CD..U+01F0 U+01F4..U+01F5
3674 U+01FA..U+0217 U+0250..U+02A8 U+02BB..U+02C1
3675 U+0386 U+0388..U+038A U+038C U+038E..U+03A1
3676 U+03A3..U+03CE U+03D0..U+03D6 U+03DA U+03DC
3677 U+03DE U+03E0 U+03E2..U+03F3 U+0401..U+040C
3678 U+040E..U+044F U+0451..U+045C U+045E..U+0481
3679 U+0490..U+04C4 U+04C7..U+04C8 U+04CB..U+04CC
3680 U+04D0..U+04EB U+04EE..U+04F5 U+04F8..U+04F9
3681 U+0531..U+0556 U+0559 U+0561..U+0586
3682 U+05D0..U+05EA U+05F0..U+05F2 U+0621..U+063A
3683 U+0641..U+064A U+0671..U+06B7 U+06BA..U+06BE
3684 U+06C0..U+06CE U+06D0..U+06D3 U+06D5
3685 U+06E5..U+06E6 U+0905..U+0939 U+093D
3686 U+0958..U+0961 U+0985..U+098C U+098F..U+0990
3687 U+0993..U+09A8 U+09AA..U+09B0 U+09B2
3688 U+09B6..U+09B9 U+09DC..U+09DD U+09DF..U+09E1
3689 U+09F0..U+09F1 U+0A05..U+0A0A U+0A0F..U+0A10
3690 U+0A13..U+0A28 U+0A2A..U+0A30 U+0A32..U+0A33
3691 U+0A35..U+0A36 U+0A38..U+0A39 U+0A59..U+0A5C
3692 U+0A5E U+0A72..U+0A74 U+0A85..U+0A8B U+0A8D
3693 U+0A8F..U+0A91 U+0A93..U+0AA8 U+0AAA..U+0AB0
3694 U+0AB2..U+0AB3 U+0AB5..U+0AB9 U+0ABD U+0AE0
3695 U+0B05..U+0B0C U+0B0F..U+0B10 U+0B13..U+0B28
3696 U+0B2A..U+0B30 U+0B32..U+0B33 U+0B36..U+0B39
3697 U+0B3D U+0B5C..U+0B5D U+0B5F..U+0B61
3698 U+0B85..U+0B8A U+0B8E..U+0B90 U+0B92..U+0B95
3699 U+0B99..U+0B9A U+0B9C U+0B9E..U+0B9F
3700 U+0BA3..U+0BA4 U+0BA8..U+0BAA U+0BAE..U+0BB5
3701 U+0BB7..U+0BB9 U+0C05..U+0C0C U+0C0E..U+0C10
3702 U+0C12..U+0C28 U+0C2A..U+0C33 U+0C35..U+0C39
3703 U+0C60..U+0C61 U+0C85..U+0C8C U+0C8E..U+0C90
3704 U+0C92..U+0CA8 U+0CAA..U+0CB3 U+0CB5..U+0CB9
3705 U+0CDE U+0CE0..U+0CE1 U+0D05..U+0D0C
3706 U+0D0E..U+0D10 U+0D12..U+0D28 U+0D2A..U+0D39
3707 U+0D60..U+0D61 U+0E01..U+0E2E U+0E30
3708 U+0E32..U+0E33 U+0E40..U+0E45 U+0E81..U+0E82
3709 U+0E84 U+0E87..U+0E88 U+0E8A U+0E8D
3710 U+0E94..U+0E97 U+0E99..U+0E9F U+0EA1..U+0EA3
3711 U+0EA5 U+0EA7 U+0EAA..U+0EAB U+0EAD..U+0EAE
3712 U+0EB0 U+0EB2..U+0EB3 U+0EBD U+0EC0..U+0EC4
3713 U+0F40..U+0F47 U+0F49..U+0F69 U+10A0..U+10C5
3714 U+10D0..U+10F6 U+1100 U+1102..U+1103
3715 U+1105..U+1107 U+1109 U+110B..U+110C
3716 U+110E..U+1112 U+113C U+113E U+1140 U+114C
3717 U+114E U+1150 U+1154..U+1155 U+1159
3718 U+115F..U+1161 U+1163 U+1165 U+1167 U+1169
3719 U+116D..U+116E U+1172..U+1173 U+1175 U+119E
3720 U+11A8 U+11AB U+11AE..U+11AF U+11B7..U+11B8
3721 U+11BA U+11BC..U+11C2 U+11EB U+11F0 U+11F9
3722 U+1E00..U+1E9B U+1EA0..U+1EF9 U+1F00..U+1F15
3723 U+1F18..U+1F1D U+1F20..U+1F45 U+1F48..U+1F4D
3724 U+1F50..U+1F57 U+1F59 U+1F5B U+1F5D
3725 U+1F5F..U+1F7D U+1F80..U+1FB4 U+1FB6..U+1FBC
3726 U+1FBE U+1FC2..U+1FC4 U+1FC6..U+1FCC
3727 U+1FD0..U+1FD3 U+1FD6..U+1FDB U+1FE0..U+1FEC
3728 U+1FF2..U+1FF4 U+1FF6..U+1FFC U+2126
3729 U+212A..U+212B U+212E U+2180..U+2182
3730 U+3041..U+3094 U+30A1..U+30FA U+3105..U+312C
3731 U+AC00..U+D7A3
3732 // Ideographic
3733 U+4E00..U+9FA5 U+3007 U+3021..U+3029
3734 // Digit
3735 U+0030..U+0039 U+0660..U+0669 U+06F0..U+06F9
3736 U+0966..U+096F U+09E6..U+09EF U+0A66..U+0A6F
3737 U+0AE6..U+0AEF U+0B66..U+0B6F U+0BE7..U+0BEF
3738 U+0C66..U+0C6F U+0CE6..U+0CEF U+0D66..U+0D6F
3739 U+0E50..U+0E59 U+0ED0..U+0ED9 U+0F20..U+0F29
3740 // CombiningChar
3741 U+0300..U+0345 U+0360..U+0361 U+0483..U+0486
3742 U+0591..U+05A1 U+05A3..U+05B9 U+05BB..U+05BD
3743 U+05BF U+05C1..U+05C2 U+05C4 U+064B..U+0652
3744 U+0670 U+06D6..U+06DC U+06DD..U+06DF
3745 U+06E0..U+06E4 U+06E7..U+06E8 U+06EA..U+06ED
3746 U+0901..U+0903 U+093C U+093E..U+094C U+094D
3747 U+0951..U+0954 U+0962..U+0963 U+0981..U+0983
3748 U+09BC U+09BE U+09BF U+09C0..U+09C4
3749 U+09C7..U+09C8 U+09CB..U+09CD U+09D7
3750 U+09E2..U+09E3 U+0A02 U+0A3C U+0A3E U+0A3F
3751 U+0A40..U+0A42 U+0A47..U+0A48 U+0A4B..U+0A4D
3752 U+0A70..U+0A71 U+0A81..U+0A83 U+0ABC
3753 U+0ABE..U+0AC5 U+0AC7..U+0AC9 U+0ACB..U+0ACD
3754 U+0B01..U+0B03 U+0B3C U+0B3E..U+0B43
3755 U+0B47..U+0B48 U+0B4B..U+0B4D U+0B56..U+0B57
3756 U+0B82..U+0B83 U+0BBE..U+0BC2 U+0BC6..U+0BC8
3757 U+0BCA..U+0BCD U+0BD7 U+0C01..U+0C03
3758 U+0C3E..U+0C44 U+0C46..U+0C48 U+0C4A..U+0C4D
3759 U+0C55..U+0C56 U+0C82..U+0C83 U+0CBE..U+0CC4
3760 U+0CC6..U+0CC8 U+0CCA..U+0CCD U+0CD5..U+0CD6
3761 U+0D02..U+0D03 U+0D3E..U+0D43 U+0D46..U+0D48
3762 U+0D4A..U+0D4D U+0D57 U+0E31 U+0E34..U+0E3A
3763 U+0E47..U+0E4E U+0EB1 U+0EB4..U+0EB9
3764 U+0EBB..U+0EBC U+0EC8..U+0ECD U+0F18..U+0F19
3765 U+0F35 U+0F37 U+0F39 U+0F3E U+0F3F
3766 U+0F71..U+0F84 U+0F86..U+0F8B U+0F90..U+0F95
3767 U+0F97 U+0F99..U+0FAD U+0FB1..U+0FB7 U+0FB9
3768 U+20D0..U+20DC U+20E1 U+302A..U+302F U+3099
3769 U+309A
3770 // Extender
3771 U+00B7 U+02D0 U+02D1 U+0387 U+0640 U+0E46
3772 U+0EC6 U+3005 U+3031..U+3035 U+309D..U+309E
3773 U+30FC..U+30FE
3774 ];
3775
3776 $NameStartChar11 := [
3777 ':' '_'
3778 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M'
3779 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'
3780 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm'
3781 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z'
3782 U+00C0..U+00D6 U+00D8..U+00F6 U+00F8..U+02FF
3783 U+0370..U+037D U+037F..U+1FFF U+200C..U+200D
3784 U+2070..U+218F U+2C00..U+2FEF U+3001..U+D7FF
3785 U+F900..U+FDCF U+FDF0..U+FFFD U+10000..U+EFFFF
3786 ];
3787 $NameChar11 := [
3788 '-' '.' '0' '1' '2' '3' '4' '5' '6' '7' '8' '9'
3789 U+00B7 U+0300..U+036F U+203F..U+2040
3790 // NameStartChar
3791 ':' '_'
3792 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M'
3793 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'
3794 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm'
3795 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z'
3796 U+00C0..U+00D6 U+00D8..U+00F6 U+00F8..U+02FF
3797 U+0370..U+037D U+037F..U+1FFF U+200C..U+200D
3798 U+2070..U+218F U+2C00..U+2FEF U+3001..U+D7FF
3799 U+F900..U+FDCF U+FDF0..U+FFFD U+10000..U+EFFFF
3800 ];
3801 } // NameChar
3802
3803 lexmode Name
3804 : extends => 'NameChar'
3805 {
3806 Name : value := $NameStartChar11 $NameChar11*;
3807 } // Name
3808
3809 lexmode Nmtoken
3810 : extends => 'NameChar'
3811 {
3812 Nmtoken : value := $NameChar11*;
3813 } // Nmtoken
3814
3815 /*
3816 S
3817 */
3818 lexmode S {
3819 $s := [U+0009 U+000A U+000D U+0020];
3820 S := $s+;
3821 } // S
3822
3823 /*
3824 Document end scanning mode
3825 */
3826 lexmode DocumentEnd
3827 : standalone
3828 : extends => 'S'
3829 {
3830 /*
3831 Processing instruction
3832 */
3833 PIO := ['<'] ['?'];
3834
3835 /*
3836 Comment declaration
3837 */
3838 CDO := ['<'] ['!'] ['-'] ['-'];
3839 } // DocumentEnd
3840
3841 /*
3842 Document misc scanning mode
3843
3844 This mode scans |Misc| constructions as well
3845 as document element's start tag.
3846 */
3847 lexmode DocumentMisc
3848 : standalone
3849 : extends => 'DocumentEnd'
3850 {
3851 /*
3852 Document element start tag
3853 */
3854 STAGO := ['<'];
3855 } // DocumentMisc
3856
3857 /*
3858 Document prolog scanning mode
3859 */
3860 lexmode DocumentProlog
3861 : standalone
3862 : extends => 'DocumentMisc'
3863 {
3864 /*
3865 |DOCTYPE| declaration
3866 */
3867 MDO := ['<'] ['!'];
3868 } // DocumentProlog
3869
3870 /*
3871 Document Start Scanning Mode
3872 */
3873 lexmode DocumentStart
3874 : standalone
3875 : extends => 'DocumentProlog'
3876 {
3877 /*
3878 XML declaration
3879 */
3880 XDO := ['<'] ['?'] ['x'] ['m'] ['l'];
3881 } // DocumentStart
3882
3883 /*
3884 Comment declaration scanning mode
3885 */
3886 lexmode CommentDeclaration
3887 : standalone
3888 {
3889 /*
3890 Comment close
3891 */
3892 COM := ['-'] ['-'];
3893
3894 /*
3895 Comment data
3896 */
3897 ?default-token STRING : value;
3898 } // CommentDeclaration
3899
3900 /*
3901 Processing instruction name and |S| scanning mode
3902 */
3903 lexmode PIName
3904 : standalone
3905 : extends => 'Name'
3906 : extends => 'S'
3907 {
3908 /*
3909 Processing instruction close
3910 */
3911 PIC := ['?'] ['>'];
3912 } // PIName
3913
3914 /*
3915 Processing instruction name and |S| scanning mode
3916 */
3917 lexmode PINmtoken
3918 : standalone
3919 : extends => 'Nmtoken'
3920 : extends => 'S'
3921 {
3922 /*
3923 Processing instruction close
3924 */
3925 PIC := ['?'] ['>'];
3926 } // PINmtoken
3927
3928 /*
3929 Processing instruction data scanning mode
3930 */
3931 lexmode PIData
3932 : standalone
3933 {
3934 /*
3935 Processing instruction close
3936 */
3937 PIC := ['?'] ['>'];
3938
3939 /*
3940 Processing instruction target data
3941 */
3942 ?default-token DATA : value;
3943 } // PIData
3944
3945 /*
3946 Content of element scanning mode
3947 */
3948 lexmode ElementContent
3949 : standalone
3950 {
3951 /*
3952 Start tag open
3953 */
3954 STAGO := ['<'];
3955
3956 /*
3957 End tag open
3958 */
3959 ETAGO := ['<'] ['/'];
3960
3961 /*
3962 Hexadecimal character reference open
3963 */
3964 HCRO := ['&'] ['#'] ['x'];
3965
3966 /*
3967 Numeric character reference open
3968 */
3969 CRO := ['&'] ['#'];
3970
3971 /*
3972 General entity reference open
3973 */
3974 ERO := ['&'];
3975
3976 /*
3977 Comment declaration open
3978 */
3979 CDO := ['<'] ['!'] ['-'] ['-'];
3980
3981 /*
3982 CDATA section open
3983 */
3984 CDSO := ['<'] ['!'] ['[']
3985 ['C'] ['D'] ['A'] ['T'] ['A'] ['['];
3986
3987 /*
3988 Processing instruction open
3989 */
3990 PIO := ['<'] ['?'];
3991
3992 /*
3993 Markup section end
3994 */
3995 MSE := [']'] [']'] ['>'];
3996
3997 /*
3998 Character data
3999 */
4000 /*
4001 Character data and/or |MSE|
4002 */
4003 ?default-token CharData : value;
4004 } // ElementContent
4005
4006 /*
4007 CDATA section content scanning mode
4008 */
4009 lexmode CDATASectionContent
4010 : standalone
4011 {
4012 /*
4013 Markup section end
4014 */
4015 MSE := [']'] [']'] ['>'];
4016
4017 /*
4018 Character data
4019 */
4020 ?default-token CData : value;
4021 } // CDATASectionContent
4022
4023 lexmode EntityReference
4024 : standalone
4025 : extends => 'Name'
4026 {
4027 /*
4028 Reference close
4029 */
4030 REFC := [';'];
4031 } // EntityReference
4032
4033 lexmode NumericCharacterReference
4034 : standalone
4035 {
4036 /*
4037 Decimal number
4038 */
4039 $digit := ['0' '1' '2' '3' '4' '5' '6' '7' '8' '9'];
4040 NUMBER : value := $digit+;
4041
4042 /*
4043 Reference close
4044 */
4045 REFC := [';'];
4046 } // NumericCharacterReference
4047
4048 lexmode HexadecimalCharacterReference
4049 : standalone
4050 {
4051 /*
4052 Hexadecimal number
4053 */
4054 $hexdigit := ['0' '1' '2' '3' '4' '5' '6' '7' '8' '9'
4055 'A' 'B' 'C' 'D' 'E' 'F'
4056 'a' 'b' 'c' 'd' 'e' 'f'];
4057 Hex : value := $hexdigit+;
4058
4059 /*
4060 Reference close
4061 */
4062 REFC := [';'];
4063 } // HexadecimalCharacterReference
4064
4065 /*
4066 The XML Declaration and Text Declaration Scanning Mode
4067 */
4068 lexmode XMLDeclaration
4069 : standalone
4070 : extends => 'Name'
4071 : extends => 'S'
4072 {
4073
4074 /*
4075 Value indicator
4076 */
4077 VI := ['='];
4078
4079 /*
4080 Literal open
4081 */
4082 LIT := ['"'];
4083 LITA := [U+0027];
4084
4085 /*
4086 Processing instruction close
4087
4088 The |PIC|, i.e. |?>|, is split into two tokens |PIC1| and |PIC2|
4089 in this scanning mode to set |no_xml11_eol| flag in the
4090 |_XMLDeclaration_| |rule|.
4091 */
4092 PIC1 := ['?'];
4093 PIC2 := ['>'];
4094 } // XMLDeclaration
4095
4096 /*
4097 The XML Declaration or Processing Instruction Scanning Mode
4098
4099 '<?xml' S ...
4100 (DocumentStart) (XMLDeclarationOrPI) (XMLDeclaration)
4101 '<?xml' '1' S ...
4102 (DocumentStart) (XMLDeclarationOrPI) (PINmtoken)(PIName) (PITarget)
4103 '<?xml' '-' 'stylesheet' S ...
4104 (DocumentStart) (XMLDeclarationOrPI) (PINmtoken) (PIName) (PITarget)
4105 */
4106 lexmode XMLDeclarationOrPI
4107 : standalone
4108 : extends => 'NameChar'
4109 : extends => 'S'
4110 {
4111 NameChar : value := $NameChar11;
4112 } // XMLDeclarationOrPI
4113
4114 lexmode StartTag
4115 : standalone
4116 : extends => 'Name'
4117 : extends => 'S'
4118 {
4119
4120 /*
4121 Value indicator
4122 */
4123 VI := ['='];
4124
4125 /*
4126 Literal open
4127 */
4128 LIT := ['"'];
4129 LITA := [U+0027];
4130
4131 /*
4132 Tag close
4133 */
4134 TAGC := ['>'];
4135
4136 /*
4137 Null end-tag enabled start-tag close
4138 */
4139 NESTC := ['/'];
4140 } // StartTag
4141
4142 lexmode EndTag
4143 : standalone
4144 : extends => 'Name'
4145 : extends => 'S'
4146 {
4147 /*
4148 Tag close
4149 */
4150 TAGC := ['>'];
4151 } // EndTag
4152
4153 lexmode AttributeValueLiteral_ {
4154 ERO := ['&'];
4155 CRO := ['&'] ['#'];
4156 HCRO := ['&'] ['#'] ['x'];
4157 } // AttributeValueLiteral_
4158
4159 lexmode AttributeValueLiteral
4160 : standalone
4161 : extends => 'AttributeValueLiteral_'
4162 {
4163 LIT := ['"'];
4164 STRING : value := [^'"' '&' '<']+;
4165 } // AttributeValueLiteral
4166
4167 lexmode AttributeValueLiteralA
4168 : standalone
4169 : extends => 'AttributeValueLiteral_'
4170 {
4171 LITA := [U+0027];
4172 STRING : value := [^U+0027 '&' '<']+;
4173 } // AttributeValueLiteralA
4174
4175 lexmode AttributeValueLiteralE
4176 : standalone
4177 : extends => 'AttributeValueLiteral_'
4178 {
4179 STRING : value := [^'&' '<']+;
4180 } // AttributeValueLiteralE
4181
4182 lexmode EntityValue_ {
4183 PERO := ['%'];
4184 ERO := ['&'];
4185 CRO := ['&'] ['#'];
4186 HCRO := ['&'] ['#'] ['x'];
4187 } // EntityValue_
4188
4189 lexmode EntityValue
4190 : standalone
4191 : extends => 'EntityValue_'
4192 {
4193 LIT := ['"'];
4194 STRING : value := [^'"' '&' '%']+;
4195 } // EntityValue
4196
4197 lexmode EntityValueA
4198 : standalone
4199 : extends => 'EntityValue_'
4200 {
4201 LITA := [U+0027];
4202 STRING : value := [^U+0027 '&' '%']+;
4203 } // EntityValueA
4204
4205 lexmode SystemLiteral
4206 : standalone
4207 {
4208 LIT := ['"'];
4209 ?default-token STRING : value;
4210 } // SystemLiteral
4211
4212 lexmode SystemLiteralA
4213 : standalone
4214 {
4215 LITA := [U+0027];
4216 ?default-token STRING : value;
4217 } // SystemLiteralA
4218
4219 lexmode DTD
4220 : standalone
4221 : extends => 'S'
4222 {
4223 /*
4224 Markup declaration open
4225 */
4226 MDO := ['<'] ['!'];
4227
4228 /*
4229 Comment declaration open
4230 */
4231 CDO := ['<'] ['!'] ['-'] ['-'];
4232
4233 /*
4234 Processing instruction open
4235 */
4236 PIO := ['<'] ['?'];
4237
4238 /*
4239 Parameter entity reference open
4240 */
4241 PERO := ['%'];
4242
4243 /*
4244 Declaration subset close
4245 */
4246 DSC := [']'];
4247
4248 /*
4249 Contition section open
4250 */
4251 CSO := ['<'] ['!'] ['['];
4252 } // DTD
4253
4254 /*
4255 Markup declaration scanning mode
4256
4257 This mode is used to recognize |MDC| that terminates
4258 a comment declaration as well as the base |lexmode|
4259 for e.g. document type declaration scanning mode.
4260 */
4261 lexmode MarkupDeclaration
4262 : standalone
4263 : extends => 'Name'
4264 : extends => 'S'
4265 {
4266 /*
4267 Markup declaration close
4268 */
4269 MDC := ['>'];
4270
4271 /*
4272 Literal open
4273 */
4274 LIT := ['"'];
4275
4276 /*
4277 Alternative literal open
4278 */
4279 LITA := [U+0027];
4280
4281 /*
4282 Parameter entity reference open
4283 */
4284 PERO := ['%'];
4285
4286 /*
4287 Declaration subset open
4288 */
4289 DSO := ['['];
4290 } // MarkupDeclaration
4291
4292 lexmode ElementDeclaration
4293 : standalone
4294 : extends => 'MarkupDeclaration'
4295 {
4296 /*
4297 Model group open
4298 */
4299 MGO := ['('];
4300
4301 /*
4302 Model group close
4303 */
4304 MGC := [')'];
4305
4306 /*
4307 Reserved name indicator
4308 */
4309 RNI := ['#'];
4310
4311 /*
4312 Occurence indicators
4313 */
4314 OPT := ['?'];
4315 REP := ['*'];
4316 PLUS := ['+'];
4317
4318 /*
4319 Connectors
4320 */
4321 OR := ['|'];
4322 SEQ := [','];
4323 } // ElementDeclaration
4324
4325 lexmode AttlistDeclaration
4326 : standalone
4327 : extends => 'MarkupDeclaration'
4328 {
4329 /*
4330 Enumeration group open
4331 */
4332 EGO := ['('];
4333
4334 /*
4335 Enumeration group close
4336 */
4337 EGC := [')'];
4338
4339 /*
4340 Enumeration choice delimiter
4341 */
4342 OR := ['|'];
4343
4344 /*
4345 Reserved name indicator
4346 */
4347 RNI := ['#'];
4348 } // AttlistDeclaration
4349
4350 lexmode Enumeration
4351 : standalone
4352 : extends => 'Nmtoken'
4353 : extends => 'S'
4354 {
4355 /*
4356 Enumeration group close
4357 */
4358 EGC := [')'];
4359
4360 /*
4361 Enumeration choice delimiter
4362 */
4363 OR := ['|'];
4364 } // Enumeration
4365
4366
4367 token-error default : default {
4368 lang:Perl {
4369 my $location;
4370 __CODE{xp|get-location-from-token::
4371 $token => {$token},
4372 $result => {$location},
4373 }__;
4374 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
4375 xp|error-token => {$token},
4376 DOMCore|location => {$location},
4377 }__;
4378 unless ($continue) {
4379 __EXCEPTION{DOMLS|PARSE_ERR::
4380 }__;
4381 }
4382 }
4383 } // default
4384
4385 @XMLTests:
4386 @@XMLTest:
4387 @@@QName: xp.char.xml10.test
4388 @@@DEnt:
4389 @@@@test:value:
4390 <?xml version="1.0"?>
4391 <p>$u0009$u000A$u000D$u0020$uD7FF$uE000$uFFFD$U00010000$U0010FFFF</p>
4392 @@@test:domTree:
4393 document {
4394 xml-version: '1.0';
4395 element {
4396 text-content: U+0009 U+000A U+000A U+0020 U+D7FF
4397 U+E000 U+FFFD U+10000 U+10FFFF;
4398 }
4399 }
4400 @@XMLTest:
4401 @@@QName: xp.char.xml11.test
4402 @@@DEnt:
4403 @@@@test:value:
4404 <?xml version="1.1"?>
4405 <p>$u0009$u000A$u000D$u0020$uD7FF$uE000$uFFFD$U00010000$U0010FFFF</p>
4406 @@@test:domTree:
4407 document {
4408 xml-version: '1.1';
4409 element {
4410 text-content: U+0009 U+000A U+000A U+0020 U+D7FF
4411 U+E000 U+FFFD U+10000 U+10FFFF;
4412 }
4413 }
4414 @@XMLTest:
4415 @@@QName: xp.char.xml10.c0.test
4416 @@@DEnt:
4417 @@@@test:value:
4418 <?xml version="1.0"?>
4419 <p>$u0000$u0001$u0002$u0003$u0004$u0005$u0006$u0007$u0008$u000B$
4420 $u000C$u000E$u000F$u0010$u0011$u0012$u0013$u0014$u0015$u0016$
4421 $u0017$u0018$u0019$u001A$u001B$u001C$u001D$u001E$u001F</p>
4422 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+0000 */
4423 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0001 */
4424 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0002 */
4425 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0003 */
4426 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0004 */
4427 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0005 */
4428 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0006 */
4429 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0007 */
4430 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0008 */
4431 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+000B */
4432 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+000C */
4433 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+000E */
4434 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+000F */
4435 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+0010 */
4436 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+0011 */
4437 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+0012 */
4438 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0013 */
4439 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0014 */
4440 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0015 */
4441 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0016 */
4442 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0017 */
4443 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0018 */
4444 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0019 */
4445 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+001A */
4446 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+001B */
4447 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+001C */
4448 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+001D */
4449 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+001E */
4450 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+001F */
4451 @@XMLTest:
4452 @@@QName: xp.char.xml11.c0.test
4453 @@@DEnt:
4454 @@@@test:value:
4455 <?xml version="1.1"?>
4456 <p>$u0000$u0001$u0002$u0003$u0004$u0005$u0006$u0007$u0008$u000B$
4457 $u000C$u000E$u000F$u0010$u0011$u0012$u0013$u0014$u0015$u0016$
4458 $u0017$u0018$u0019$u001A$u001B$u001C$u001D$u001E$u001F</p>
4459 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+0000 */
4460 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0001 */
4461 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0002 */
4462 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0003 */
4463 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0004 */
4464 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0005 */
4465 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0006 */
4466 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0007 */
4467 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0008 */
4468 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+000B */
4469 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+000C */
4470 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+000E */
4471 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+000F */
4472 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+0010 */
4473 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+0011 */
4474 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+0012 */
4475 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0013 */
4476 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0014 */
4477 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0015 */
4478 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0016 */
4479 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0017 */
4480 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0018 */
4481 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0019 */
4482 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+001A */
4483 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+001B */
4484 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+001C */
4485 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+001D */
4486 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+001E */
4487 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+001F */
4488 @@XMLTest:
4489 @@@QName: xp.char.xml10.c1.test
4490 @@@DEnt:
4491 @@@@test:value:
4492 <?xml version="1.0"?>
4493 <p>$u007F$u0080$u0081$u0082$u0083$u0084$u0086$u0087$u0088$
4494 $u0089$u008A$u008B$u008C$
4495 $u008D$u008E$u008F$u0090$u0091$u0092$u0093$u0094$u0095$u0096$
4496 $u0097$u0098$u0099$u009A$u009B$u009C$u009D$u009E$u009F$u0085</p>
4497 @@@test:domTree:
4498 document {
4499 xml-version: '1.0';
4500 element {
4501 text-content: U+007F U+0080 U+0081 U+0082 U+0083 U+0084 U+0086
4502 U+0087 U+0088 U+0089 U+008A U+008B U+008C U+008D
4503 U+008E U+008F U+0090 U+0091 U+0092 U+0093 U+0094
4504 U+0095 U+0096 U+0097 U+0098 U+0099 U+009A U+009B
4505 U+009C U+009D U+009E U+009F U+0085;
4506 }
4507 }
4508 @@XMLTest:
4509 @@@QName: xp.char.xml11.c1.test
4510 @@@DEnt:
4511 @@@@test:value:
4512 <?xml version="1.1"?>
4513 <p>$u007F$u0080$u0081$u0082$u0083$u0084$u0086$u0087$u0088$
4514 $u0089$u008A$u008B$u008C$
4515 $u008D$u008E$u008F$u0090$u0091$u0092$u0093$u0094$u0095$u0096$
4516 $u0097$u0098$u0099$u009A$u009B$u009C$u009D$u009E$u009F$u0085</p>
4517 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+007F */
4518 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0080 */
4519 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0081 */
4520 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0082 */
4521 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0083 */
4522 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0084 */
4523 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0086 */
4524 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0087 */
4525 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0088 */
4526 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+0089 */
4527 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+008A */
4528 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+008B */
4529 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+008C */
4530 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+008D */
4531 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+008E */
4532 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+008F */
4533 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0090 */
4534 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0091 */
4535 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0092 */
4536 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0093 */
4537 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0094 */
4538 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0095 */
4539 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0096 */
4540 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+0097 */
4541 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+0098 */
4542 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+0099 */
4543 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+009A */
4544 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+009B */
4545 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+009C */
4546 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 33); } /* U+009D */
4547 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 34); } /* U+009E */
4548 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 35); } /* U+009F */
4549
4550 @@XMLTest:
4551 @@@QName: xp.syntax.empty.test
4552 @@@DEnt:
4553 @@@@test:value: \
4554 @@@c:erred:
4555 <[[xp:wf-syntax-error]]> { (1, 1); }
4556 @@XMLTest:
4557 @@@QName: xp.syntax.space.test
4558 @@@DEnt:
4559 @@@@test:value: \
4560 @@@c:erred:
4561 <[[xp:wf-syntax-error]]> { (1, 4); }
4562 @@XMLTest:
4563 @@@QName: xp.syntax.newlines.test
4564 @@@DEnt:
4565 @@@@test:value:
4566 \
4567 \
4568 \
4569 @@@c:erred:
4570 <[[xp:wf-syntax-error]]> { (3, 1); }
4571
4572 @@XMLTest:
4573 @@@QName: xp.only.docel.test
4574 @@@DEnt:
4575 @@@@test:value:
4576 <p></p>
4577 @@@test:domTree:
4578 document {
4579 xml-version: '1.0';
4580 xml-encoding: null;
4581 xml-standalone: false;
4582 element {
4583 namespace-uri: null;
4584 prefix: null;
4585 local-name: 'p';
4586 text-content: '';
4587 }
4588 }
4589 @@XMLTest:
4590 @@@QName: xp.only.docel.emptyelemtag.test
4591 @@@DEnt:
4592 @@@@test:value:
4593 <p/>
4594 @@@test:domTree:
4595 document {
4596 xml-version: '1.0';
4597 xml-encoding: null;
4598 xml-standalone: false;
4599 element {
4600 namespace-uri: null;
4601 prefix: null;
4602 local-name: 'p';
4603 text-content: '';
4604 }
4605 }
4606 @@XMLTest:
4607 @@@QName: xp.root.s.1.test
4608 @@@DEnt:
4609 @@@@test:value:
4610 <?xml version="1.0"?>$u0020$u000D$u000A$u0009
4611 <p></p>
4612 @@@test:domTree:
4613 document {
4614 element { }
4615 }
4616
4617 @@XMLTest:
4618 @@@QName: xp.Name.1.test
4619 @@@DEnt:
4620 @@@@test:value: <name/>
4621 @@@test:domTree:
4622 document {
4623 element {
4624 node-name: 'name';
4625 }
4626 }
4627 @@XMLTest:
4628 @@@QName: xp.Name.2.test
4629 @@@DEnt:
4630 @@@@test:value: <name0/>
4631 @@@test:domTree:
4632 document {
4633 element {
4634 node-name: 'name0';
4635 }
4636 }
4637 @@enImplNote:
4638 @@@ddid: xml11name
4639 @@@@:
4640 {TODO:: XML 1.1 Name tests required
4641 }
4642
4643 @@XMLTest:
4644 @@@QName: xp.content.mse.1.test
4645 @@@DEnt:
4646 @@@@test:value:
4647 <p>]]></p>
4648 @@@c:erred:
4649 <[[xp|wf-syntax-error]]> { (1, 4)..(1, 6); }
4650 @@XMLTest:
4651 @@@QName: xp.content.mse.2.test
4652 @@@DEnt:
4653 @@@@test:value:
4654 <p>aaa]]>bbb</p>
4655 @@@c:erred:
4656 <[[xp|wf-syntax-error]]> { (1, 7)..(1, 9); }
4657
4658 @@XMLTest:
4659 @@@QName: xp.root.comment.1.test
4660 @@@DEnt:
4661 @@@@test:value:
4662 <!--comment data-->
4663 <p/>
4664 @@@test:domTree:
4665 document {
4666 comment {
4667 data: 'comment data';
4668 }
4669 element { }
4670 }
4671 @@XMLTest:
4672 @@@QName: xp.root.comment.2.test
4673 @@@DEnt:
4674 @@@@test:value:
4675 <!---->
4676 <p/>
4677 @@@test:domTree:
4678 document {
4679 comment {
4680 data: '';
4681 }
4682 element { }
4683 }
4684 @@XMLTest:
4685 @@@QName: xp.root.after.pi.comment.1.test
4686 @@@DEnt:
4687 @@@@test:value:
4688 <?pi?>
4689 <!--comment data-->
4690 <p/>
4691 @@@test:domTree:
4692 document {
4693 pi { }
4694 comment {
4695 data: 'comment data';
4696 }
4697 element { }
4698 }
4699 @@XMLTest:
4700 @@@QName: xp.root.after.pi.comment.2.test
4701 @@@DEnt:
4702 @@@@test:value:
4703 <?pi?>
4704 <!---->
4705 <p/>
4706 @@@test:domTree:
4707 document {
4708 pi { }
4709 comment {
4710 data: '';
4711 }
4712 element { }
4713 }
4714 @@XMLTest:
4715 @@@QName: xp.root.after.element.comment.1.test
4716 @@@DEnt:
4717 @@@@test:value:
4718 <p/>
4719 <!--comment data-->
4720 @@@test:domTree:
4721 document {
4722 element { }
4723 comment {
4724 data: 'comment data';
4725 }
4726 }
4727 @@XMLTest:
4728 @@@QName: xp.root.after.element.comment.2.test
4729 @@@DEnt:
4730 @@@@test:value:
4731 <p/>
4732 <!---->
4733 @@@test:domTree:
4734 document {
4735 element { }
4736 comment {
4737 data: '';
4738 }
4739 }
4740 @@XMLTest:
4741 @@@QName: xp.doctype.intsubset.comment.1.test
4742 @@@DEnt:
4743 @@@@test:value:
4744 <!DOCTYPE a [
4745 <!--comment data-->
4746 ]>
4747 <p/>
4748 @@@test:domTree:
4749 document {
4750 document-type { }
4751 element { }
4752 }
4753 @@XMLTest:
4754 @@@QName: xp.doctype.intsubset.comment.2.test
4755 @@@DEnt:
4756 @@@@test:value:
4757 <!DOCTYPE a [
4758 <!---->
4759 ]>
4760 <p/>
4761 @@@test:domTree:
4762 document {
4763 document-type { }
4764 element { }
4765 }
4766 @@XMLTest:
4767 @@@QName: xp.doctype.intsubset.comment.3.test
4768 @@@DEnt:
4769 @@@@test:value:
4770 <!DOCTYPE a [
4771 <?pi?>
4772 <!---->
4773 ]>
4774 <p/>
4775 @@@test:domTree:
4776 document {
4777 document-type {
4778 pi { }
4779 }
4780 element { }
4781 }
4782 @@XMLTest:
4783 @@@QName: xp.content.comment.1.test
4784 @@@DEnt:
4785 @@@@test:value:
4786 <p><!--comment data--></p>
4787 @@@test:domTree:
4788 document {
4789 element {
4790 comment {
4791 data: 'comment data';
4792 }
4793 }
4794 }
4795 @@XMLTest:
4796 @@@QName: xp.content.comment.2.test
4797 @@@DEnt:
4798 @@@@test:value:
4799 <p><!----></p>
4800 @@@test:domTree:
4801 document {
4802 element {
4803 comment {
4804 data: '';
4805 }
4806 }
4807 }
4808 @@XMLTest:
4809 @@@QName: xp.content.comment.3.test
4810 @@@DEnt:
4811 @@@@test:value:
4812 <p>aaaaa<!---->bbbbb</p>
4813 @@@test:domTree:
4814 document {
4815 element {
4816 text {
4817 data: 'aaaaa';
4818 }
4819 comment {
4820 data: '';
4821 }
4822 text {
4823 data: 'bbbbb';
4824 }
4825 }
4826 }
4827 @@XMLTest:
4828 @@@QName: xp.content.comment.--.1.test
4829 @@@DEnt:
4830 @@@@test:value:
4831 <p><!--data--data--></p>
4832 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 12)..(1, 17); }
4833 @@XMLTest:
4834 @@@QName: xp.content.comment.---gt.test
4835 @@@DEnt:
4836 @@@@test:value:
4837 <p><!--data---></p>
4838 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 12)..(1, 15); }
4839
4840 @@XMLTest:
4841 @@@QName: xp.xmldecl.version.1.0.test
4842 @@@DEnt:
4843 @@@@test:value:
4844 <?xml version="1.0"?>
4845 <p></p>
4846 @@@test:domTree:
4847 document {
4848 xml-version: '1.0';
4849 xml-encoding: null;
4850 xml-standalone: false;
4851 element { }
4852 }
4853 @@XMLTest:
4854 @@@QName: xp.xmldecl.version.1.0.lita.test
4855 @@@DEnt:
4856 @@@@test:value:
4857 <?xml version='1.0'?>
4858 <p></p>
4859 @@@test:domTree:
4860 document {
4861 xml-version: '1.0';
4862 xml-encoding: null;
4863 xml-standalone: false;
4864 element { }
4865 }
4866 @@XMLTest:
4867 @@@QName: xp.xmldecl.version.1.0.s.test
4868 @@@DEnt:
4869 @@@@test:value:
4870 <?xml version = "1.0" ?>
4871 <p></p>
4872 @@@test:domTree:
4873 document {
4874 xml-version: '1.0';
4875 xml-encoding: null;
4876 xml-standalone: false;
4877 element { }
4878 }
4879 @@XMLTest:
4880 @@@QName: xp.xmldecl.version.1.1.test
4881 @@@DEnt:
4882 @@@@test:value:
4883 <?xml version="1.1"?>
4884 <p></p>
4885 @@@test:domTree:
4886 document {
4887 xml-version: '1.1';
4888 xml-encoding: null;
4889 xml-standalone: false;
4890 element { }
4891 }
4892
4893 @@XMLTest:
4894 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.test
4895 @@@DEnt:
4896 @@@@test:value:
4897 <?xml version="1.0" encoding="US-ascii"?>
4898 <p></p>
4899 @@@test:domTree:
4900 document {
4901 xml-version: '1.0';
4902 xml-encoding: 'US-ascii';
4903 xml-standalone: false;
4904 element { }
4905 }
4906 @@XMLTest:
4907 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.lita.test
4908 @@@DEnt:
4909 @@@@test:value:
4910 <?xml version="1.0" encoding='US-ascii'?>
4911 <p></p>
4912 @@@test:domTree:
4913 document {
4914 xml-version: '1.0';
4915 xml-encoding: 'US-ascii';
4916 xml-standalone: false;
4917 element { }
4918 }
4919 @@XMLTest:
4920 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.s.test
4921 @@@DEnt:
4922 @@@@test:value:
4923 <?xml version="1.0" encoding = "US-ascii" ?>
4924 <p></p>
4925 @@@test:domTree:
4926 document {
4927 xml-version: '1.0';
4928 xml-encoding: 'US-ascii';
4929 xml-standalone: false;
4930 element { }
4931 }
4932
4933 @@XMLTest:
4934 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.test
4935 @@@DEnt:
4936 @@@@test:value:
4937 <?xml version="1.0" encoding="us-ascii" standalone="yes"?>
4938 <p></p>
4939 @@@test:domTree:
4940 document {
4941 xml-version: '1.0';
4942 xml-encoding: 'us-ascii';
4943 xml-standalone: true;
4944 element { }
4945 }
4946 @@XMLTest:
4947 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.no.test
4948 @@@DEnt:
4949 @@@@test:value:
4950 <?xml version="1.0" encoding="us-ascii" standalone="no"?>
4951 <p></p>
4952 @@@test:domTree:
4953 document {
4954 xml-version: '1.0';
4955 xml-encoding: 'us-ascii';
4956 xml-standalone: false;
4957 element { }
4958 }
4959 @@XMLTest:
4960 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.lita.test
4961 @@@DEnt:
4962 @@@@test:value:
4963 <?xml version="1.0" encoding="us-ascii" standalone='yes'?>
4964 <p></p>
4965 @@@test:domTree:
4966 document {
4967 xml-version: '1.0';
4968 xml-encoding: 'us-ascii';
4969 xml-standalone: true;
4970 element { }
4971 }
4972 @@XMLTest:
4973 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.s.test
4974 @@@DEnt:
4975 @@@@test:value:
4976 <?xml version="1.0" encoding="us-ascii" standalone = "yes" ?>
4977 <p></p>
4978 @@@test:domTree:
4979 document {
4980 xml-version: '1.0';
4981 xml-encoding: 'us-ascii';
4982 xml-standalone: true;
4983 element { }
4984 }
4985 @@XMLTest:
4986 @@@QName: xp.xmldecl.no.encoding.but.standalone.attr.test
4987 @@@DEnt:
4988 @@@@test:value:
4989 <?xml version="1.0" standalone="yes"?>
4990 <p></p>
4991 @@@test:domTree:
4992 document {
4993 xml-version: '1.0';
4994 xml-encoding: null;
4995 xml-standalone: true;
4996 element { }
4997 }
4998 @@XMLTest:
4999 @@@QName: xp.xmldecl.encoding.encname.test
5000 @@@DEnt:
5001 @@@@test:value:
5002 <?xml version="1.0" encoding="a-._01-"?>
5003 <p></p>
5004 @@@test:domTree:
5005 document {
5006 xml-version: '1.0';
5007 xml-encoding: 'a-._01-';
5008 xml-standalone: false;
5009 element { }
5010 }
5011
5012 @@XMLTest:
5013 @@@QName: xp.xmldecl.no.s.no.attr.test
5014 @@@DEnt:
5015 @@@@test:value:
5016 <?xml?>
5017 <p></p>
5018 @@@c:erred:
5019 <[[xp:wf-syntax-error]]> { (1, 1)..(1, 7); }
5020 @@XMLTest:
5021 @@@QName: xp.xmldecl.s.no.attr.test
5022 @@@DEnt:
5023 @@@@test:value:
5024 <?xml ?>
5025 <p></p>
5026 @@@c:erred:
5027 <[[xp:wf-syntax-error]]> { (1, 8)..(1, 9); }
5028 @@XMLTest:
5029 @@@QName: xp.xmldecl.unknown.attr.test
5030 @@@DEnt:
5031 @@@@test:value:
5032 <?xml unknown="value"?>
5033 <p></p>
5034 @@@c:erred:
5035 <[[xp:wf-syntax-error]]> { (1, 8)..(1, 22); }
5036 @@XMLTest:
5037 @@@QName: xp.xmldecl.version.unknown.attr.test
5038 @@@DEnt:
5039 @@@@test:value:
5040 <?xml version="1.0" unknown="value"?>
5041 <p></p>
5042 @@@c:erred:
5043 <[[xp:wf-syntax-error]]> { (1, 21)..(1, 35); }
5044 @@XMLTest:
5045 @@@QName: xp.xmldecl.version.encoding.unknown.attr.test
5046 @@@DEnt:
5047 @@@@test:value:
5048 <?xml version="1.0" encoding="us-ascii" unknown="value"?>
5049 <p></p>
5050 @@@c:erred:
5051 <[[xp:wf-syntax-error]]> { (1, 41)..(1, 55); }
5052 @@XMLTest:
5053 @@@QName: xp.xmldecl.version.encoding.standalone.unknown.attr.test
5054 @@@DEnt:
5055 @@@@test:value:
5056 <?xml version="1.0" encoding="us-ascii" standalone="yes"
5057 unknown="value"?>
5058 <p></p>
5059 @@@c:erred:
5060 <[[xp:wf-syntax-error]]> { (2, 1)..(2, 15); }
5061 @@XMLTest:
5062 @@@QName: xp.xmldecl.no.version.but.encoding.attr.test
5063 @@@DEnt:
5064 @@@@test:value:
5065 <?xml encoding="us-ascii"?>
5066 <p></p>
5067 @@@c:erred:
5068 <[[xp:wf-syntax-error]]> { (1, 7)..(1, 25); }
5069 @@XMLTest:
5070 @@@QName: xp.xmldecl.no.version.but.standalone.attr.test
5071 @@@DEnt:
5072 @@@@test:value:
5073 <?xml standalone="yes"?>
5074 <p></p>
5075 @@@c:erred:
5076 <[[xp:wf-syntax-error]]> { (1, 7)..(1, 24); }
5077 @@XMLTest:
5078 @@@QName: xp.xmldecl.version.unsupported.test
5079 @@@DEnt:
5080 @@@@test:value:
5081 <?xml version="1.2"?>
5082 <p></p>
5083 @@@c:erred:
5084 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 19); }
5085 @@XMLTest:
5086 @@@QName: xp.xmldecl.version.unsupported.2.test
5087 @@@DEnt:
5088 @@@@test:value:
5089 <?xml version=" 1.0 "?>
5090 <p></p>
5091 @@@c:erred:
5092 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 21); }
5093 @@XMLTest:
5094 @@@QName: xp.xmldecl.version.unsupported.3.test
5095 @@@DEnt:
5096 @@@@test:value:
5097 <?xml version="01.00"?>
5098 <p></p>
5099 @@@c:erred:
5100 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 21); }
5101 @@XMLTest:
5102 @@@QName: xp.xmldecl.encoding.malformed.1.test
5103 @@@DEnt:
5104 @@@@test:value:
5105 <?xml version="1.0" encoding="0088"?>
5106 <p></p>
5107 @@@c:erred:
5108 <[[xp:wf-malformed-enc-name]]> { (1, 21)..(1, 35); }
5109 @@XMLTest:
5110 @@@QName: xp.xmldecl.encoding.malformed.2.test
5111 @@@DEnt:
5112 @@@@test:value:
5113 <?xml version="1.0" encoding="D.V.D!"?>
5114 <p></p>
5115 @@@c:erred:
5116 <[[xp:wf-malformed-enc-name]]> { (1, 21)..(1, 38); }
5117 @@XMLTest:
5118 @@@QName: xp.xmldecl.standalone.malformed.1.test
5119 @@@DEnt:
5120 @@@@test:value:
5121 <?xml version="1.0" standalone="true"?>
5122 <p></p>
5123 @@@c:erred:
5124 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 38); }
5125 @@XMLTest:
5126 @@@QName: xp.xmldecl.standalone.malformed.2.test
5127 @@@DEnt:
5128 @@@@test:value:
5129 <?xml version="1.0" standalone="YES"?>
5130 <p></p>
5131 @@@c:erred:
5132 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 37); }
5133 @@XMLTest:
5134 @@@QName: xp.xmldecl.standalone.malformed.3.test
5135 @@@DEnt:
5136 @@@@test:value:
5137 <?xml version="1.0" standalone="no "?>
5138 <p></p>
5139 @@@c:erred:
5140 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 38); }
5141
5142 @@XMLTest:
5143 @@@QName: xp.no-xmldecl.xml...-pi.test
5144 @@@DEnt:
5145 @@@@test:value:
5146 <?xmldeclaration?>
5147 <a></a>
5148 @@@test:domTree:
5149 document {
5150 pi {
5151 node-name: 'xmldeclaration';
5152 node-value: '';
5153 }
5154 element { }
5155 }
5156 @@XMLTest:
5157 @@@QName: xp.no-xmldecl.xml...-pi.after.document.element.test
5158 @@@DEnt:
5159 @@@@test:value:
5160 <a></a>
5161 <?xmldeclaration?>
5162 @@@test:domTree:
5163 document {
5164 element { }
5165 pi {
5166 node-name: 'xmldeclaration';
5167 node-value: '';
5168 }
5169 }
5170 @@XMLTest:
5171 @@@QName: xp.no-xmldecl.xml...-pi.in.document.element.test
5172 @@@DEnt:
5173 @@@@test:value:
5174 <a>
5175 <?xmldeclaration?>
5176 </a>
5177 @@@test:domTree:
5178 document {
5179 element {
5180 text { }
5181 pi {
5182 node-name: 'xmldeclaration';
5183 node-value: '';
5184 }
5185 text { }
5186 }
5187 }
5188 @@XMLTest:
5189 @@@QName: xp.no-xmldecl.xml...-pi.in.doctype.test
5190 @@@DEnt:
5191 @@@@test:value:
5192 <!DOCTYPE a [
5193 <?xmldeclaration?>
5194 ]>
5195 <a></a>
5196 @@@test:domTree:
5197 document {
5198 document-type {
5199 pi {
5200 node-name: 'xmldeclaration';
5201 node-value: '';
5202 }
5203 }
5204 element { }
5205 }
5206
5207 @@XMLTest:
5208 @@@QName: xp.XMLdecl.test
5209 @@@DEnt:
5210 @@@@test:value:
5211 <?XML version="1.0"?>
5212 <p></p>
5213 @@@c:erred:
5214 <[[xp:wf-pi-target-is-xml]]> { (1, 1)..(1, 5); }
5215 @@XMLTest:
5216 @@@QName: xp.Xmldecl.test
5217 @@@DEnt:
5218 @@@@test:value:
5219 <?Xml version="1.0"?>
5220 <p></p>
5221 @@@c:erred:
5222 <[[xp:wf-pi-target-is-xml]]> { (1, 1)..(1, 5); }
5223 @@XMLTest:
5224 @@@QName: xp.xmldecl.after.document.element.empty.test
5225 @@@DEnt:
5226 @@@@test:value:
5227 <p></p>
5228 <?xml?>
5229 @@@c:erred:
5230 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5231 @@XMLTest:
5232 @@@QName: xp.xmldecl.after.document.element.test
5233 @@@DEnt:
5234 @@@@test:value:
5235 <p></p>
5236 <?xml version="1.0"?>
5237 @@@c:erred:
5238 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5239 @@XMLTest:
5240 @@@QName: xp.xmldecl.in.element.empty.test
5241 @@@DEnt:
5242 @@@@test:value:
5243 <p>
5244 <?xml?>
5245 </p>
5246 @@@c:erred:
5247 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5248 @@XMLTest:
5249 @@@QName: xp.xmldecl.in.element.test
5250 @@@DEnt:
5251 @@@@test:value:
5252 <p>
5253 <?xml version="1.0"?>
5254 </p>
5255 @@@c:erred:
5256 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5257 @@XMLTest:
5258 @@@QName: xp.xmldecl.after.comment.test
5259 @@@DEnt:
5260 @@@@test:value:
5261 <!---->
5262 <?xml version="1.0"?>
5263 <p></p>
5264 @@@c:erred:
5265 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5266 @@XMLTest:
5267 @@@QName: xp.xmldecl.after.comment.empty.test
5268 @@@DEnt:
5269 @@@@test:value:
5270 <!---->
5271 <?xml?>
5272 <p></p>
5273 @@@c:erred:
5274 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5275 @@XMLTest:
5276 @@@QName: xp.xmldecl.after.pi.test
5277 @@@DEnt:
5278 @@@@test:value:
5279 <?xml-declaration?>
5280 <?xml version="1.0"?>
5281 <p></p>
5282 @@@c:erred:
5283 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5284 @@XMLTest:
5285 @@@QName: xp.xmldecl.after.pi.empty.test
5286 @@@DEnt:
5287 @@@@test:value:
5288 <?xml-declaration?>
5289 <?xml?>
5290 <p></p>
5291 @@@c:erred:
5292 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5293 @@XMLTest:
5294 @@@QName: xp.xmldecl.after.pi.2.test
5295 @@@DEnt:
5296 @@@@test:value:
5297 <?declaration?>
5298 <?xml version="1.0"?>
5299 <p></p>
5300 @@@c:erred:
5301 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5302 @@XMLTest:
5303 @@@QName: xp.xmldecl.after.pi.empty.2.test
5304 @@@DEnt:
5305 @@@@test:value:
5306 <?declaration?>
5307 <?xml?>
5308 <p></p>
5309 @@@c:erred:
5310 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5311 @@XMLTest:
5312 @@@QName: xp.xmldecl.after.doctype.test
5313 @@@DEnt:
5314 @@@@test:value:
5315 <!DOCTYPE a>
5316 <?xml version="1.0"?>
5317 <p></p>
5318 @@@c:erred:
5319 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5320 @@XMLTest:
5321 @@@QName: xp.xmldecl.after.doctype.empty.test
5322 @@@DEnt:
5323 @@@@test:value:
5324 <!DOCTYPE a>
5325 <?xml?>
5326 <p></p>
5327 @@@c:erred:
5328 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5329 @@XMLTest:
5330 @@@QName: xp.xmldecl.in.doctype.test
5331 @@@DEnt:
5332 @@@@test:value:
5333 <!DOCTYPE a [
5334 <?xml version="1.0"?>
5335 ]>
5336 <p></p>
5337 @@@c:erred:
5338 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5339 @@XMLTest:
5340 @@@QName: xp.xmldecl.in.doctype.empty.test
5341 @@@DEnt:
5342 @@@@test:value:
5343 <!DOCTYPE a [
5344 <?xml?>
5345 ]>
5346 <p></p>
5347 @@@c:erred:
5348 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
5349
5350 @@XMLTest:
5351 @@@QName: xp.pi.before.element.empty.test
5352 @@@DEnt:
5353 @@@@test:value:
5354 <?target?>
5355 <a></a>
5356 @@@test:domTree:
5357 document {
5358 pi {
5359 node-name: 'target';
5360 node-value: '';
5361 }
5362 element { }
5363 }
5364 @@XMLTest:
5365 @@@QName: xp.pi.before.element.s.test
5366 @@@DEnt:
5367 @@@@test:value:
5368 <?target ?>
5369 <a></a>
5370 @@@test:domTree:
5371 document {
5372 pi {
5373 node-name: 'target';
5374 node-value: '';
5375 }
5376 element { }
5377 }
5378 @@XMLTest:
5379 @@@QName: xp.pi.before.element.string.test
5380 @@@DEnt:
5381 @@@@test:value:
5382 <?target string?>
5383 <a></a>
5384 @@@test:domTree:
5385 document {
5386 pi {
5387 node-name: 'target';
5388 node-value: 'string';
5389 }
5390 element { }
5391 }
5392 @@XMLTest:
5393 @@@QName: xp.pi.before.element.string.s.test
5394 @@@DEnt:
5395 @@@@test:value:
5396 <?target string ?>
5397 <a></a>
5398 @@@test:domTree:
5399 document {
5400 pi {
5401 node-name: 'target';
5402 node-value: 'string ';
5403 }
5404 element { }
5405 }
5406 @@XMLTest:
5407 @@@QName: xp.pi.before.element.gt.test
5408 @@@DEnt:
5409 @@@@test:value:
5410 <?target string>string?>
5411 <a></a>
5412 @@@test:domTree:
5413 document {
5414 pi {
5415 node-name: 'target';
5416 node-value: 'string>string';
5417 }
5418 element { }
5419 }
5420 @@XMLTest:
5421 @@@QName: xp.pi.doctype.empty.test
5422 @@@DEnt:
5423 @@@@test:value:
5424 <!DOCTYPE a [
5425 <?target?>
5426 ]>
5427 <a></a>
5428 @@@test:domTree:
5429 document {
5430 document-type {
5431 pi {
5432 node-name: 'target';
5433 node-value: '';
5434 }
5435 }
5436 element { }
5437 }
5438
5439 @@XMLTest:
5440 @@@QName: xp.pi.no.target.test
5441 @@@DEnt:
5442 @@@@test:value:
5443 <??>
5444 <p></p>
5445 @@@c:erred:
5446 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 4); }
5447 @@XMLTest:
5448 @@@QName: xp.pi.no.target.2.test
5449 @@@DEnt:
5450 @@@@test:value:
5451 <? ?>
5452 <p></p>
5453 @@@c:erred:
5454 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 4); }
5455 @@XMLTest:
5456 @@@QName: xp.pi.bad.target.1.test
5457 @@@DEnt:
5458 @@@@test:value:
5459 <?target! ?>
5460 <p></p>
5461 @@@c:erred:
5462 <[[xp:wf-syntax-error]]> { (1, 9)..(1, 9); }
5463 @@XMLTest:
5464 @@@QName: xp.pi.bad.target.2.test
5465 @@@DEnt:
5466 @@@@test:value:
5467 <?0target ?>
5468 <p></p>
5469 @@@c:erred:
5470 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 3); }
5471
5472 @@XMLTest:
5473 @@@QName: xp.cdatasection.empty.1.test
5474 @@@DEnt:
5475 @@@@test:value:
5476 <p><![CDATA[]]></p>
5477 @@@test:domTree:
5478 document {
5479 element {
5480 cdata-section {
5481 data: '';
5482 }
5483 }
5484 }
5485 @@XMLTest:
5486 @@@QName: xp.cdatasection.empty.2.test
5487 @@@DEnt:
5488 @@@@test:value:
5489 <p>aa<![CDATA[]]>bb</p>
5490 @@@test:domTree:
5491 document {
5492 element {
5493 text { data: 'aa'; }
5494 cdata-section {
5495 data: '';
5496 }
5497 text { data: 'bb'; }
5498 }
5499 }
5500 @@XMLTest:
5501 @@@QName: xp.cdatasection.1.test
5502 @@@DEnt:
5503 @@@@test:value:
5504 <p><![CDATA[abcdefg]]></p>
5505 @@@test:domTree:
5506 document {
5507 element {
5508 cdata-section {
5509 data: 'abcdefg';
5510 }
5511 }
5512 }
5513 @@XMLTest:
5514 @@@QName: xp.cdatasection.2.test
5515 @@@DEnt:
5516 @@@@test:value:
5517 <p>aa<![CDATA[abcdefg]]>bb</p>
5518 @@@test:domTree:
5519 document {
5520 element {
5521 text { data: 'aa'; }
5522 cdata-section {
5523 data: 'abcdefg';
5524 }
5525 text { data: 'bb'; }
5526 }
5527 }
5528 @@XMLTest:
5529 @@@QName: xp.cdatasection.ref.1.test
5530 @@@DEnt:
5531 @@@@test:value:
5532 <p><![CDATA[a&amp;&#x32;&#32;%abc;&def;]]&gt;b]]></p>
5533 @@@test:domTree:
5534 document {
5535 element {
5536 cdata-section {
5537 data: 'a&amp;&#x32;&#32;%abc;&def;]]&gt;b';
5538 }
5539 }
5540 }
5541 @@XMLTest:
5542 @@@QName: xp.cdatasection.in.general.entity.test
5543 @@@DEnt:
5544 @@@@test:value:
5545 <!DOCTYPE p [
5546 <!ENTITY cdata "<![CDATA[text]]>">
5547 ]>
5548 <p>&cdata;</p>
5549 @@@test:domTree:
5550 document {
5551 document-type {
5552 general-entity {
5553 node-name: 'cdata';
5554 cdata-section {
5555 data: 'text';
5556 }
5557 }
5558 }
5559 element {
5560 general-entity-reference {
5561 node-name: 'cdata';
5562 is-expanded: true;
5563 cdata-section {
5564 data: 'text';
5565 }
5566 }
5567 }
5568 }
5569 @@XMLTest:
5570 @@@QName: xp.cdatasection.no.mse.test
5571 @@@DEnt:
5572 @@@@test:value:
5573 <p><![CDATA[text</p>
5574 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 21); }
5575 @@XMLTest:
5576 @@@QName: xp.cdatasection.nest.test
5577 @@@DEnt:
5578 @@@@test:value:
5579 <p><![CDATA[text01<![CDATA[txt2]]>text3]]></p>
5580 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 40)..(1, 42); }
5581
5582 @@XMLTest:
5583 @@@QName: xp.doctype.empty.test
5584 @@@DEnt:
5585 @@@@test:value:
5586 <!DOCTYPE a>
5587 <a></a>
5588 @@@test:domTree:
5589 document {
5590 xml-version: '1.0';
5591 xml-encoding: null;
5592 xml-standalone: false;
5593 document-type {
5594 node-name: 'a';
5595 public-id: null;
5596 system-id: null;
5597 }
5598 element {
5599 namespace-uri: null;
5600 prefix: null;
5601 local-name: 'a';
5602 text-content: '';
5603 }
5604 }
5605 @@XMLTest:
5606 @@@QName: xp.doctype.empty.after.document.element.test
5607 @@@DEnt:
5608 @@@@test:value:
5609 <a></a>
5610 <!DOCTYPE a>
5611 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
5612 @@XMLTest:
5613 @@@QName: xp.doctype.empty.in.element.test
5614 @@@DEnt:
5615 @@@@test:value:
5616 <a>
5617 <!DOCTYPE a>
5618 </a>
5619 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
5620 @@XMLTest:
5621 @@@QName: xp.doctype.empty.dup.test
5622 @@@DEnt:
5623 @@@@test:value:
5624 <!DOCTYPE a>
5625 <!DOCTYPE a>
5626 <a></a>
5627 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
5628 @@XMLTest:
5629 @@@QName: xp.doctype.empty.in.intsubset.test
5630 @@@DEnt:
5631 @@@@test:value:
5632 <!DOCTYPE a [
5633 <!DOCTYPE a>
5634 ]>
5635 <a></a>
5636 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
5637 @@XMLTest:
5638 @@@QName: xp.doctype.no.s.no.name.test
5639 @@@DEnt:
5640 @@@@test:value:
5641 <!DOCTYPE>
5642 <a></a>
5643 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 10); }
5644 @@XMLTest:
5645 @@@QName: xp.doctype.no.name.test
5646 @@@DEnt:
5647 @@@@test:value:
5648 <!DOCTYPE >
5649 <a></a>
5650 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 11); }
5651 @@XMLTest:
5652 @@@QName: xp.doctype.name.s.test
5653 @@@DEnt:
5654 @@@@test:value:
5655 <!DOCTYPE aa >
5656 <aa></aa>
5657 @@@test:domTree:
5658 document {
5659 document-type {
5660 node-name: 'aa';
5661 public-id: null;
5662 system-id: null;
5663 }
5664 element { }
5665 }
5666 @@XMLTest:
5667 @@@QName: xp.doctype.no.mdc.test
5668 @@@DEnt:
5669 @@@@test:value:
5670 <!DOCTYPE aa
5671 <aa></aa>
5672 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
5673
5674 @@XMLTest:
5675 @@@QName: xp.doctype.intsubset.empty.1.test
5676 @@@DEnt:
5677 @@@@test:value:
5678 <!DOCTYPE a []>
5679 <a></a>
5680 @@@test:domTree:
5681 document {
5682 xml-version: '1.0';
5683 xml-encoding: null;
5684 xml-standalone: false;
5685 document-type {
5686 node-name: 'a';
5687 public-id: null;
5688 system-id: null;
5689 }
5690 element {
5691 namespace-uri: null;
5692 prefix: null;
5693 local-name: 'a';
5694 text-content: '';
5695 }
5696 }
5697 @@XMLTest:
5698 @@@QName: xp.doctype.intsubset.empty.2.test
5699 @@@DEnt:
5700 @@@@test:value:
5701 <!DOCTYPE a [
5702
5703 ]>
5704 <a></a>
5705 @@@test:domTree:
5706 document {
5707 xml-version: '1.0';
5708 xml-encoding: null;
5709 xml-standalone: false;
5710 document-type {
5711 node-name: 'a';
5712 public-id: null;
5713 system-id: null;
5714 }
5715 element {
5716 namespace-uri: null;
5717 prefix: null;
5718 local-name: 'a';
5719 text-content: '';
5720 }
5721 }
5722 @@XMLTest:
5723 @@@QName: xp.doctype.intsubset.empty.3.test
5724 @@@DEnt:
5725 @@@@test:value:
5726 <!DOCTYPE a[]>
5727 <a></a>
5728 @@@test:domTree:
5729 document {
5730 document-type {
5731 node-name: 'a';
5732 public-id: null;
5733 system-id: null;
5734 }
5735 element { }
5736 }
5737 @@XMLTest:
5738 @@@QName: xp.doctype.intsubset.empty.4.test
5739 @@@DEnt:
5740 @@@@test:value:
5741 <!DOCTYPE a[] >
5742 <a></a>
5743 @@@test:domTree:
5744 document {
5745 document-type {
5746 node-name: 'a';
5747 public-id: null;
5748 system-id: null;
5749 }
5750 element { }
5751 }
5752 @@XMLTest:
5753 @@@QName: xp.doctype.intsubset.no.dsc.1.test
5754 @@@DEnt:
5755 @@@@test:value:
5756 <!DOCTYPE a [>
5757 <a></a>
5758 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 14); }
5759 @@XMLTest:
5760 @@@QName: xp.doctype.intsubset.no.dsc.2.test
5761 @@@DEnt:
5762 @@@@test:value:
5763 <!DOCTYPE a [
5764 <a></a>
5765 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
5766 @@XMLTest:
5767 @@@QName: xp.doctype.intsubset.no.dsc.3.test
5768 @@@DEnt:
5769 @@@@test:value:
5770 <!DOCTYPE a [
5771 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 14); }
5772 @@XMLTest:
5773 @@@QName: xp.doctype.intsubset.no.mdc.1.test
5774 @@@DEnt:
5775 @@@@test:value:
5776 <!DOCTYPE a []
5777 <a/>
5778 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
5779 @@XMLTest:
5780 @@@QName: xp.doctype.intsubset.no.mdc.2.test
5781 @@@DEnt:
5782 @@@@test:value:
5783 <!DOCTYPE a []]>
5784 <a/>
5785 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 15); }
5786 @@XMLTest:
5787 @@@QName: xp.doctype.pubid.sysid.1.test
5788 @@@DEnt:
5789 @@@@test:value:
5790 <!DOCTYPE a PUBLIC "pubid" "sysid">
5791 <a/>
5792 @@@test:domTree:
5793 document {
5794 document-type {
5795 node-name: 'a';
5796 public-id: 'pubid';
5797 system-id: 'sysid';
5798 }
5799 element { }
5800 }
5801 @@XMLTest:
5802 @@@QName: xp.doctype.pubid.sysid.2.test
5803 @@@DEnt:
5804 @@@@test:value:
5805 <!DOCTYPE a PUBLIC 'pubid' "sysid">
5806 <a/>
5807 @@@test:domTree:
5808 document {
5809 document-type {
5810 node-name: 'a';
5811 public-id: 'pubid';
5812 system-id: 'sysid';
5813 }
5814 element { }
5815 }
5816 @@XMLTest:
5817 @@@QName: xp.doctype.pubid.sysid.3.test
5818 @@@DEnt:
5819 @@@@test:value:
5820 <!DOCTYPE a PUBLIC "pubid" 'sysid'>
5821 <a/>
5822 @@@test:domTree:
5823 document {
5824 document-type {
5825 node-name: 'a';
5826 public-id: 'pubid';
5827 system-id: 'sysid';
5828 }
5829 element { }
5830 }
5831 @@XMLTest:
5832 @@@QName: xp.doctype.pubid.sysid.4.test
5833 @@@DEnt:
5834 @@@@test:value:
5835 <!DOCTYPE a PUBLIC 'pubid' 'sysid'>
5836 <a/>
5837 @@@test:domTree:
5838 document {
5839 document-type {
5840 node-name: 'a';
5841 public-id: 'pubid';
5842 system-id: 'sysid';
5843 }
5844 element { }
5845 }
5846 @@XMLTest:
5847 @@@QName: xp.doctype.pubid.sysid.5.test
5848 @@@DEnt:
5849 @@@@test:value:
5850 <!DOCTYPE a PUBLIC "pubid" "sysid" >
5851 <a/>
5852 @@@test:domTree:
5853 document {
5854 document-type {
5855 node-name: 'a';
5856 public-id: 'pubid';
5857 system-id: 'sysid';
5858 }
5859 element { }
5860 }
5861 @@XMLTest:
5862 @@@QName: xp.doctype.pubid.sysid.6.test
5863 @@@DEnt:
5864 @@@@test:value:
5865 <!DOCTYPE a PUBLIC 'pubid' 'sysid' >
5866 <a/>
5867 @@@test:domTree:
5868 document {
5869 document-type {
5870 node-name: 'a';
5871 public-id: 'pubid';
5872 system-id: 'sysid';
5873 }
5874 element { }
5875 }
5876 @@XMLTest:
5877 @@@QName: xp.doctype.pubid.sysid.intsubset.1.test
5878 @@@DEnt:
5879 @@@@test:value:
5880 <!DOCTYPE a PUBLIC "pubid" "sysid"[]>
5881 <a/>
5882 @@@test:domTree:
5883 document {
5884 document-type {
5885 node-name: 'a';
5886 public-id: 'pubid';
5887 system-id: 'sysid';
5888 }
5889 element { }
5890 }
5891 @@XMLTest:
5892 @@@QName: xp.doctype.pubid.sysid.intsubset.2.test
5893 @@@DEnt:
5894 @@@@test:value:
5895 <!DOCTYPE a PUBLIC "pubid" "sysid" []>
5896 <a/>
5897 @@@test:domTree:
5898 document {
5899 document-type {
5900 node-name: 'a';
5901 public-id: 'pubid';
5902 system-id: 'sysid';
5903 }
5904 element { }
5905 }
5906 @@XMLTest:
5907 @@@QName: xp.doctype.pubid.sysid.intsubset.3.test
5908 @@@DEnt:
5909 @@@@test:value:
5910 <!DOCTYPE a PUBLIC 'pubid' 'sysid'[]>
5911 <a/>
5912 @@@test:domTree:
5913 document {
5914 document-type {
5915 node-name: 'a';
5916 public-id: 'pubid';
5917 system-id: 'sysid';
5918 }
5919 element { }
5920 }
5921 @@XMLTest:
5922 @@@QName: xp.doctype.pubid.sysid.intsubset.4.test
5923 @@@DEnt:
5924 @@@@test:value:
5925 <!DOCTYPE a PUBLIC 'pubid' 'sysid' []>
5926 <a/>
5927 @@@test:domTree:
5928 document {
5929 document-type {
5930 node-name: 'a';
5931 public-id: 'pubid';
5932 system-id: 'sysid';
5933 }
5934 element { }
5935 }
5936 @@XMLTest:
5937 @@@QName: xp.doctype.sysid.1.test
5938 @@@DEnt:
5939 @@@@test:value:
5940 <!DOCTYPE a SYSTEM "sysid">
5941 <a/>
5942 @@@test:domTree:
5943 document {
5944 document-type {
5945 node-name: 'a';
5946 public-id: null;
5947 system-id: 'sysid';
5948 }
5949 element { }
5950 }
5951 @@XMLTest:
5952 @@@QName: xp.doctype.sysid.2.test
5953 @@@DEnt:
5954 @@@@test:value:
5955 <!DOCTYPE a SYSTEM 'sysid'>
5956 <a/>
5957 @@@test:domTree:
5958 document {
5959 document-type {
5960 node-name: 'a';
5961 public-id: null;
5962 system-id: 'sysid';
5963 }
5964 element { }
5965 }
5966 @@XMLTest:
5967 @@@QName: xp.doctype.sysid.3.test
5968 @@@DEnt:
5969 @@@@test:value:
5970 <!DOCTYPE a SYSTEM "sysid" >
5971 <a/>
5972 @@@test:domTree:
5973 document {
5974 document-type {
5975 node-name: 'a';
5976 public-id: null;
5977 system-id: 'sysid';
5978 }
5979 element { }
5980 }
5981 @@XMLTest:
5982 @@@QName: xp.doctype.sysid.4.test
5983 @@@DEnt:
5984 @@@@test:value:
5985 <!DOCTYPE a SYSTEM 'sysid' >
5986 <a/>
5987 @@@test:domTree:
5988 document {
5989 document-type {
5990 node-name: 'a';
5991 public-id: null;
5992 system-id: 'sysid';
5993 }
5994 element { }
5995 }
5996 @@XMLTest:
5997 @@@QName: xp.doctype.sysid.intsubset.1.test
5998 @@@DEnt:
5999 @@@@test:value:
6000 <!DOCTYPE a SYSTEM "sysid"[]>
6001 <a/>
6002 @@@test:domTree:
6003 document {
6004 document-type {
6005 node-name: 'a';
6006 public-id: null;
6007 system-id: 'sysid';
6008 }
6009 element { }
6010 }
6011 @@XMLTest:
6012 @@@QName: xp.doctype.sysid.intsubset.2.test
6013 @@@DEnt:
6014 @@@@test:value:
6015 <!DOCTYPE a SYSTEM "sysid" []>
6016 <a/>
6017 @@@test:domTree:
6018 document {
6019 document-type {
6020 node-name: 'a';
6021 public-id: null;
6022 system-id: 'sysid';
6023 }
6024 element { }
6025 }
6026 @@XMLTest:
6027 @@@QName: xp.doctype.sysid.intsubset.3.test
6028 @@@DEnt:
6029 @@@@test:value:
6030 <!DOCTYPE a SYSTEM 'sysid'[]>
6031 <a/>
6032 @@@test:domTree:
6033 document {
6034 document-type {
6035 node-name: 'a';
6036 public-id: null;
6037 system-id: 'sysid';
6038 }
6039 element { }
6040 }
6041 @@XMLTest:
6042 @@@QName: xp.doctype.sysid.intsubset.4.test
6043 @@@DEnt:
6044 @@@@test:value:
6045 <!DOCTYPE a SYSTEM 'sysid' []>
6046 <a/>
6047 @@@test:domTree:
6048 document {
6049 document-type {
6050 node-name: 'a';
6051 public-id: null;
6052 system-id: 'sysid';
6053 }
6054 element { }
6055 }
6056 @@XMLTest:
6057 @@@QName: xp.doctype.public.stago.test
6058 @@@DEnt:
6059 @@@@test:value:
6060 <!DOCTYPE a PUBLIC<a/>
6061 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6062 @@XMLTest:
6063 @@@QName: xp.doctype.public.mdc.test
6064 @@@DEnt:
6065 @@@@test:value:
6066 <!DOCTYPE a PUBLIC>
6067 <a/>
6068 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6069 @@XMLTest:
6070 @@@QName: xp.doctype.public.s.stago.test
6071 @@@DEnt:
6072 @@@@test:value:
6073 <!DOCTYPE a PUBLIC <a/>
6074 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 20); }
6075 @@XMLTest:
6076 @@@QName: xp.doctype.public.s.mdc.test
6077 @@@DEnt:
6078 @@@@test:value:
6079 <!DOCTYPE a PUBLIC >
6080 <a/>
6081 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 20); }
6082 @@XMLTest:
6083 @@@QName: xp.doctype.public.lit.test
6084 @@@DEnt:
6085 @@@@test:value:
6086 <!DOCTYPE a PUBLIC"p" "s">
6087 <a/>
6088 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6089 @@XMLTest:
6090 @@@QName: xp.doctype.public.lita.test
6091 @@@DEnt:
6092 @@@@test:value:
6093 <!DOCTYPE a PUBLIC'p' "s">
6094 <a/>
6095 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6096 @@XMLTest:
6097 @@@QName: xp.doctype.pubid.lit.lita.unmatched.1.test
6098 @@@DEnt:
6099 @@@@test:value:
6100 <!DOCTYPE a PUBLIC "p' "s">
6101 <a/>
6102 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 25); }
6103 @@XMLTest:
6104 @@@QName: xp.doctype.pubid.lit.lita.unmatched.2.test
6105 @@@DEnt:
6106 @@@@test:value:
6107 <!DOCTYPE a PUBLIC "p' 's'><a/>
6108 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
6109 @@XMLTest:
6110 @@@QName: xp.doctype.pubid.lita.lit.unmatched.1.test
6111 @@@DEnt:
6112 @@@@test:value:
6113 <!DOCTYPE a PUBLIC 'p" "s"><a/>
6114 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
6115 @@XMLTest:
6116 @@@QName: xp.doctype.pubid.lita.lit.unmatched.2.test
6117 @@@DEnt:
6118 @@@@test:value:
6119 <!DOCTYPE a PUBLIC 'p" 's'>
6120 <a/>
6121 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 21)..(1, 25); }
6122 @@XMLTest:
6123 @@@QName: xp.doctype.public.s.lit.mdc.test
6124 @@@DEnt:
6125 @@@@test:value:
6126 <!DOCTYPE a PUBLIC "><a/>
6127 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 26); }
6128 @@XMLTest:
6129 @@@QName: xp.doctype.public.s.lita.mdc.test
6130 @@@DEnt:
6131 @@@@test:value:
6132 <!DOCTYPE a PUBLIC '><a/>
6133 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 26); }
6134 @@XMLTest:
6135 @@@QName: xp.doctype.public.lit.pubid.lit.mdc.test
6136 @@@DEnt:
6137 @@@@test:value:
6138 <!DOCTYPE a PUBLIC "p">
6139 <a/>
6140 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 23); }
6141 @@XMLTest:
6142 @@@QName: xp.doctype.public.lita.pubid.lita.mdc.test
6143 @@@DEnt:
6144 @@@@test:value:
6145 <!DOCTYPE a PUBLIC 'p'>
6146 <a/>
6147 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 23); }
6148 @@XMLTest:
6149 @@@QName: xp.doctype.public.lit.pubid.lit.s.mdc.test
6150 @@@DEnt:
6151 @@@@test:value:
6152 <!DOCTYPE a PUBLIC "p" >
6153 <a/>
6154 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 24); }
6155 @@XMLTest:
6156 @@@QName: xp.doctype.public.lita.pubid.lita.s.mdc.test
6157 @@@DEnt:
6158 @@@@test:value:
6159 <!DOCTYPE a PUBLIC 'p' >
6160 <a/>
6161 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 24); }
6162 @@XMLTest:
6163 @@@QName: xp.doctype.public.lit.pubid.lit.s.lit.mdc.test
6164 @@@DEnt:
6165 @@@@test:value:
6166 <!DOCTYPE a PUBLIC "p" "><a/>
6167 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
6168 @@XMLTest:
6169 @@@QName: xp.doctype.public.lit.pubid.lit.s.lita.mdc.test
6170 @@@DEnt:
6171 @@@@test:value:
6172 <!DOCTYPE a PUBLIC "p" '><a/>
6173 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
6174 @@XMLTest:
6175 @@@QName: xp.doctype.public.lita.pubid.lita.s.lit.mdc.test
6176 @@@DEnt:
6177 @@@@test:value:
6178 <!DOCTYPE a PUBLIC 'p' "><a/>
6179 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
6180 @@XMLTest:
6181 @@@QName: xp.doctype.public.lita.pubid.lita.s.lita.mdc.test
6182 @@@DEnt:
6183 @@@@test:value:
6184 <!DOCTYPE a PUBLIC 'p' '><a/>
6185 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
6186 @@XMLTest:
6187 @@@QName: xp.doctype.public.lit.pubid.lit.lit.lita.unmatched.mdc.test
6188 @@@DEnt:
6189 @@@@test:value:
6190 <!DOCTYPE a PUBLIC "p" "s'><a/>
6191 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
6192 @@XMLTest:
6193 @@@QName: xp.doctype.public.lita.pubid.lita.lita.lit.unmatched.mdc.test
6194 @@@DEnt:
6195 @@@@test:value:
6196 <!DOCTYPE a PUBLIC 'p' 's"><a/>
6197 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
6198 @@XMLTest:
6199 @@@QName: xp.doctype.pubid.sysid.stago.1.test
6200 @@@DEnt:
6201 @@@@test:value:
6202 <!DOCTYPE a PUBLIC "p" "s"<a/>
6203 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27); }
6204 @@XMLTest:
6205 @@@QName: xp.doctype.pubid.sysid.stago.2.test
6206 @@@DEnt:
6207 @@@@test:value:
6208 <!DOCTYPE a PUBLIC "p" 's'<a/>
6209 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27); }
6210 @@XMLTest:
6211 @@@QName: xp.doctype.pubid.sysid.stago.s.1.test
6212 @@@DEnt:
6213 @@@@test:value:
6214 <!DOCTYPE a PUBLIC "p" "s" <a/>
6215 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
6216 @@XMLTest:
6217 @@@QName: xp.doctype.pubid.sysid.stago.s.2.test
6218 @@@DEnt:
6219 @@@@test:value:
6220 <!DOCTYPE a PUBLIC "p" 's' <a/>
6221 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
6222
6223 @@XMLTest:
6224 @@@QName: xp.endofline.1.0.crlf.test
6225 @@@DEnt:
6226 @@@@test:value:
6227 <?xml version="1.0"?>
6228 <p>aaa$u000D$u000Abbb</p>
6229 @@@test:domTree:
6230 document {
6231 xml-version: '1.0';
6232 element {
6233 text-content: 'aaa' U+000A 'bbb';
6234 }
6235 }
6236 @@XMLTest:
6237 @@@QName: xp.endofline.1.1.crlf.test
6238 @@@DEnt:
6239 @@@@test:value:
6240 <?xml version="1.1"?>
6241 <p>aaa$u000D$u000Abbb</p>
6242 @@@test:domTree:
6243 document {
6244 xml-version: '1.1';
6245 element {
6246 text-content: 'aaa' U+000A 'bbb';
6247 }
6248 }
6249 @@XMLTest:
6250 @@@QName: xp.endofline.1.0.crnl.test
6251 @@@DEnt:
6252 @@@@test:value:
6253 <?xml version="1.0"?>
6254 <p>aaa$u000D$u0085bbb</p>
6255 @@@test:domTree:
6256 document {
6257 xml-version: '1.0';
6258 element {
6259 text-content: 'aaa' U+000A U+0085 'bbb';
6260 }
6261 }
6262 @@XMLTest:
6263 @@@QName: xp.endofline.1.1.crnl.test
6264 @@@DEnt:
6265 @@@@test:value:
6266 <?xml version="1.1"?>
6267 <p>aaa$u000D$u0085bbb</p>
6268 @@@test:domTree:
6269 document {
6270 xml-version: '1.1';
6271 element {
6272 text-content: 'aaa' U+000A 'bbb';
6273 }
6274 }
6275 @@XMLTest:
6276 @@@QName: xp.endofline.1.0.nl.test
6277 @@@DEnt:
6278 @@@@test:value:
6279 <?xml version="1.0"?>
6280 <p>aaa$u0085bbb</p>
6281 @@@test:domTree:
6282 document {
6283 xml-version: '1.0';
6284 element {
6285 text-content: 'aaa' U+0085 'bbb';
6286 }
6287 }
6288 @@XMLTest:
6289 @@@QName: xp.endofline.1.1.nl.test
6290 @@@DEnt:
6291 @@@@test:value:
6292 <?xml version="1.1"?>
6293 <p>aaa$u0085bbb</p>
6294 @@@test:domTree:
6295 document {
6296 xml-version: '1.1';
6297 element {
6298 text-content: 'aaa' U+000A 'bbb';
6299 }
6300 }
6301 @@XMLTest:
6302 @@@QName: xp.endofline.1.0.ls.test
6303 @@@DEnt:
6304 @@@@test:value:
6305 <?xml version="1.0"?>
6306 <p>aaa$u2028bbb</p>
6307 @@@test:domTree:
6308 document {
6309 xml-version: '1.0';
6310 element {
6311 text-content: 'aaa' U+2028 'bbb';
6312 }
6313 }
6314 @@XMLTest:
6315 @@@QName: xp.endofline.1.1.ls.test
6316 @@@DEnt:
6317 @@@@test:value:
6318 <?xml version="1.1"?>
6319 <p>aaa$u2028bbb</p>
6320 @@@test:domTree:
6321 document {
6322 xml-version: '1.1';
6323 element {
6324 text-content: 'aaa' U+000A 'bbb';
6325 }
6326 }
6327 @@XMLTest:
6328 @@@QName: xp.endofline.1.0.cr.test
6329 @@@DEnt:
6330 @@@@test:value:
6331 <?xml version="1.0"?>
6332 <p>aaa$u000Dbbb</p>
6333 @@@test:domTree:
6334 document {
6335 xml-version: '1.0';
6336 element {
6337 text-content: 'aaa' U+000A 'bbb';
6338 }
6339 }
6340 @@XMLTest:
6341 @@@QName: xp.endofline.1.1.cr.test
6342 @@@DEnt:
6343 @@@@test:value:
6344 <?xml version="1.1"?>
6345 <p>aaa$u000Dbbb</p>
6346 @@@test:domTree:
6347 document {
6348 xml-version: '1.1';
6349 element {
6350 text-content: 'aaa' U+000A 'bbb';
6351 }
6352 }
6353 @@XMLTest:
6354 @@@QName: xp.endofline.1.0.lf.test
6355 @@@DEnt:
6356 @@@@test:value:
6357 <?xml version="1.0"?>
6358 <p>aaa$u000Abbb</p>
6359 @@@test:domTree:
6360 document {
6361 xml-version: '1.0';
6362 element {
6363 text-content: 'aaa' U+000A 'bbb';
6364 }
6365 }
6366 @@XMLTest:
6367 @@@QName: xp.endofline.1.1.lf.test
6368 @@@DEnt:
6369 @@@@test:value:
6370 <?xml version="1.1"?>
6371 <p>aaa$u000Abbb</p>
6372 @@@test:domTree:
6373 document {
6374 xml-version: '1.1';
6375 element {
6376 text-content: 'aaa' U+000A 'bbb';
6377 }
6378 }
6379 @@XMLTest:
6380 @@@QName: xp.xml10.endofline.nl.in.xmldecl.1.test
6381 @@@DEnt:
6382 @@@@test:value:
6383 <?xml$u0085version="1.0"?>
6384 <p/>
6385 @@@c:erred:
6386 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
6387 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6388 @@XMLTest:
6389 @@@QName: xp.xml11.endofline.nl.in.xmldecl.1.test
6390 @@@DEnt:
6391 @@@@test:value:
6392 <?xml$u0085version="1.1"?>
6393 (err)<p/>
6394 @@@c:erred:
6395 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
6396 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6397 @@XMLTest:
6398 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.1.test
6399 @@@DEnt:
6400 @@@@test:value:
6401 <?xml$u000D$u0085version="1.0"?>
6402 <p/>
6403 @@@c:erred:
6404 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
6405 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6406 @@XMLTest:
6407 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.1.test
6408 @@@DEnt:
6409 @@@@test:value:
6410 <?xml$u000D$u0085version="1.1"?>
6411 (err)<p/>
6412 @@@c:erred:
6413 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
6414 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6415 @@XMLTest:
6416 @@@QName: xp.xml10.endofline.ls.in.xmldecl.1.test
6417 @@@DEnt:
6418 @@@@test:value:
6419 <?xml$u2028version="1.0"?>
6420 <p/>
6421 @@@c:erred:
6422 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
6423 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6424 @@XMLTest:
6425 @@@QName: xp.xml11.endofline.ls.in.xmldecl.1.test
6426 @@@DEnt:
6427 @@@@test:value:
6428 <?xml$u2028version="1.1"?>
6429 (err)<p/>
6430 @@@c:erred:
6431 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
6432 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6433 @@XMLTest:
6434 @@@QName: xp.xml10.endofline.nl.in.xmldecl.2.test
6435 @@@DEnt:
6436 @@@@test:value:
6437 <?xml version="1.0"$u0085?>
6438 <p/>
6439 @@@c:erred:
6440 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
6441 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6442 @@XMLTest:
6443 @@@QName: xp.xml11.endofline.nl.in.xmldecl.2.test
6444 @@@DEnt:
6445 @@@@test:value:
6446 <?xml version="1.1"$u0085?>
6447 (err)<p/>
6448 @@@c:erred:
6449 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
6450 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6451 @@XMLTest:
6452 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.2.test
6453 @@@DEnt:
6454 @@@@test:value:
6455 <?xml version="1.0"$u000D$u0085?>
6456 <p/>
6457 @@@c:erred:
6458 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
6459 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6460 @@XMLTest:
6461 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.2.test
6462 @@@DEnt:
6463 @@@@test:value:
6464 <?xml version="1.1"$u000D$u0085?>
6465 (err)<p/>
6466 @@@c:erred:
6467 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
6468 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6469 @@XMLTest:
6470 @@@QName: xp.xml10.endofline.ls.in.xmldecl.2.test
6471 @@@DEnt:
6472 @@@@test:value:
6473 <?xml version="1.0"$u2028?>
6474 <p/>
6475 @@@c:erred:
6476 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
6477 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6478 @@XMLTest:
6479 @@@QName: xp.xml11.endofline.ls.in.xmldecl.2.test
6480 @@@DEnt:
6481 @@@@test:value:
6482 <?xml version="1.1"$u2028?>
6483 (err)<p/>
6484 @@@c:erred:
6485 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
6486 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6487 @@XMLTest:
6488 @@@QName: xp.xml10.endofline.nl.in.xmldecl.3.test
6489 @@@DEnt:
6490 @@@@test:value:
6491 <?xml $u0085version="1.0"?>
6492 <p/>
6493 @@@c:erred:
6494 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
6495 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6496 @@XMLTest:
6497 @@@QName: xp.xml11.endofline.nl.in.xmldecl.3.test
6498 @@@DEnt:
6499 @@@@test:value:
6500 <?xml $u0085version="1.1"?>
6501 (err)<p/>
6502 @@@c:erred:
6503 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
6504 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6505 @@XMLTest:
6506 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.3.test
6507 @@@DEnt:
6508 @@@@test:value:
6509 <?xml $u000D$u0085version="1.0"?>
6510 <p/>
6511 @@@c:erred:
6512 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
6513 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6514 @@XMLTest:
6515 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.3.test
6516 @@@DEnt:
6517 @@@@test:value:
6518 <?xml $u000D$u0085version="1.1"?>
6519 (err)<p/>
6520 @@@c:erred:
6521 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
6522 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6523 @@XMLTest:
6524 @@@QName: xp.xml10.endofline.ls.in.xmldecl.3.test
6525 @@@DEnt:
6526 @@@@test:value:
6527 <?xml $u2028version="1.0"?>
6528 <p/>
6529 @@@c:erred:
6530 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
6531 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6532 @@XMLTest:
6533 @@@QName: xp.xml11.endofline.ls.in.xmldecl.3.test
6534 @@@DEnt:
6535 @@@@test:value:
6536 <?xml $u2028version="1.1"?>
6537 (err)<p/>
6538 @@@c:erred:
6539 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
6540 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6541 @@XMLTest:
6542 @@@QName: xp.xml10implied.endofline.nl.in.pi.1.test
6543 @@@DEnt:
6544 @@@@test:value:
6545 <?xml-$u0085?>
6546 <p/>
6547 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 7)..(2, 0); }
6548 @@XMLTest:
6549 @@@QName: xp.xml10.endofline.nl.in.pi.1.test
6550 @@@DEnt:
6551 @@@@test:value:
6552 <?xml version="1.0"?>
6553 <?xml-$u0085?>
6554 <p/>
6555 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 7)..(3, 0); }
6556 @@XMLTest:
6557 @@@QName: xp.xml11.endofline.nl.in.pi.1.test
6558 @@@DEnt:
6559 @@@@test:value:
6560 <?xml version="1.1"?>
6561 <?xml-$u0085?>
6562 <p/>
6563 @@@test:domTree:
6564 document {
6565 xml-version: '1.1';
6566 pi {
6567 node-name: 'xml-';
6568 node-value: '';
6569 }
6570 element { }
6571 }
6572 @@XMLTest:
6573 @@@QName: xp.xml10implied.endofline.crnl.in.pi.1.test
6574 @@@DEnt:
6575 @@@@test:value:
6576 <?xml-$u000D$u0085?>
6577 <p/>
6578 @@@test:domTree:
6579 document {
6580 xml-version: '1.0';
6581 pi {
6582 node-name: 'xml-';
6583 node-value: U+0085;
6584 }
6585 element { }
6586 }
6587 @@XMLTest:
6588 @@@QName: xp.xml10.endofline.crnl.in.pi.1.test
6589 @@@DEnt:
6590 @@@@test:value:
6591 <?xml version="1.0"?>
6592 <?xml-$u000D$u0085?>
6593 <p/>
6594 @@@test:domTree:
6595 document {
6596 xml-version: '1.0';
6597 pi {
6598 node-name: 'xml-';
6599 node-value: U+0085;
6600 }
6601 element { }
6602 }
6603 @@XMLTest:
6604 @@@QName: xp.xml11.endofline.crnl.in.pi.1.test
6605 @@@DEnt:
6606 @@@@test:value:
6607 <?xml version="1.1"?>
6608 <?xml-$u000D$u0085?>
6609 <p/>
6610 @@@test:domTree:
6611 document {
6612 xml-version: '1.1';
6613 pi {
6614 node-name: 'xml-';
6615 node-value: '';
6616 }
6617 element { }
6618 }
6619 @@XMLTest:
6620 @@@QName: xp.xml10implied.endofline.ls.in.pi.1.test
6621 @@@DEnt:
6622 @@@@test:value:
6623 <?xml-$u2028?>
6624 <p/>
6625 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 7)..(2, 0); }
6626 @@XMLTest:
6627 @@@QName: xp.xml10.endofline.ls.in.pi.1.test
6628 @@@DEnt:
6629 @@@@test:value:
6630 <?xml version="1.0"?>
6631 <?xml-$u2028?>
6632 <p/>
6633 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 7)..(3, 0); }
6634 @@XMLTest:
6635 @@@QName: xp.xml11.endofline.ls.in.pi.1.test
6636 @@@DEnt:
6637 @@@@test:value:
6638 <?xml version="1.1"?>
6639 <?xml-$u2028?>
6640 <p/>
6641 @@@test:domTree:
6642 document {
6643 xml-version: '1.1';
6644 pi {
6645 node-name: 'xml-';
6646 node-value: '';
6647 }
6648 element { }
6649 }
6650 @@XMLTest:
6651 @@@QName: xp.noxmldecl.pi.pi.test
6652 @@@DEnt:
6653 @@@@test:value:
6654 <?noxml 1?><?noxml 2?><p/>
6655 @@@test:domTree:
6656 document {
6657 xml-version: '1.0';
6658 pi {
6659 node-name: 'noxml';
6660 node-value: '1';
6661 }
6662 pi {
6663 node-name: 'noxml';
6664 node-value: '2';
6665 }
6666 element { }
6667 }
6668 @@XMLTest:
6669 @@@QName: xp.noxmldecl.pi.pi.2.test
6670 @@@DEnt:
6671 @@@@test:value:
6672 <?xmlno 1?><?xmlno 2?><p/>
6673 @@@test:domTree:
6674 document {
6675 xml-version: '1.0';
6676 pi {
6677 node-name: 'xmlno';
6678 node-value: '1';
6679 }
6680 pi {
6681 node-name: 'xmlno';
6682 node-value: '2';
6683 }
6684 element { }
6685 }
6686 @@XMLTest:
6687 @@@QName: xp.noxmldecl.pi.pi.3.test
6688 @@@DEnt:
6689 @@@@test:value:
6690 <?xmln 1?><?xmln 2?><p/>
6691 @@@test:domTree:
6692 document {
6693 xml-version: '1.0';
6694 pi {
6695 node-name: 'xmln';
6696 node-value: '1';
6697 }
6698 pi {
6699 node-name: 'xmln';
6700 node-value: '2';
6701 }
6702 element { }
6703 }
6704 @@XMLTest:
6705 @@@QName: xp.noxml.s.nl.test
6706 @@@DEnt:
6707 @@@@test:value:
6708 $u0085<p/>
6709 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
6710 @@XMLTest:
6711 @@@QName: xp.noxml.s.crnl.test
6712 @@@DEnt:
6713 @@@@test:value:
6714 $u000D$u0085<p/>
6715 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
6716 @@XMLTest:
6717 @@@QName: xp.noxml.s.ls.test
6718 @@@DEnt:
6719 @@@@test:value:
6720 $u2028<p/>
6721 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
6722 @@XMLTest:
6723 @@@QName: xp.xml10.decl.s.nl.test
6724 @@@DEnt:
6725 @@@@test:value:
6726 <?xml version="1.0"?>$u0085<p/>
6727 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 22)..(2, 0); }
6728 @@XMLTest:
6729 @@@QName: xp.xml10.decl.s.crnl.test
6730 @@@DEnt:
6731 @@@@test:value:
6732 <?xml version="1.0"?>$u000D$u0085<p/>
6733 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 0)..(3, 0); }
6734 @@XMLTest:
6735 @@@QName: xp.xml10.decl.s.ls.test
6736 @@@DEnt:
6737 @@@@test:value:
6738 <?xml version="1.0"?>$u2028<p/>
6739 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 22)..(2, 0); }
6740 @@XMLTest:
6741 @@@QName: xp.xml11.decl.s.nl.test
6742 @@@DEnt:
6743 @@@@test:value:
6744 <?xml version="1.1"?>$u0085<p/>
6745 @@@test:domTree:
6746 document {
6747 xml-version: '1.1';
6748 element { }
6749 }
6750 @@XMLTest:
6751 @@@QName: xp.xml11.decl.s.crnl.test
6752 @@@DEnt:
6753 @@@@test:value:
6754 <?xml version="1.1"?>$u000D$u0085<p/>
6755 @@@test:domTree:
6756 document {
6757 xml-version: '1.1';
6758 element { }
6759 }
6760 @@XMLTest:
6761 @@@QName: xp.xml11.decl.s.ls.test
6762 @@@DEnt:
6763 @@@@test:value:
6764 <?xml version="1.1"?>$u2028<p/>
6765 @@@test:domTree:
6766 document {
6767 xml-version: '1.1';
6768 element { }
6769 }
6770
6771 @@XMLTest:
6772 @@@QName: xp.element.type.match.1.test
6773 @@@DEnt:
6774 @@@@test:value:
6775 <p></pa>(err)
6776 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 4)..(1, 8); }
6777 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6778 @@XMLTest:
6779 @@@QName: xp.element.type.match.2.test
6780 @@@DEnt:
6781 @@@@test:value:
6782 <p><pa></pa></pa>(err)
6783 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 13)..(1, 17); }
6784 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6785 @@XMLTest:
6786 @@@QName: xp.element.type.match.3.test
6787 @@@DEnt:
6788 @@@@test:value:
6789 <p><pa></p></p>(err)
6790 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 8)..(1, 11); }
6791 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6792 @@XMLTest:
6793 @@@QName: xp.element.type.match.4.test
6794 @@@DEnt:
6795 @@@@test:value:
6796 <a:p xmlns:a="about:1"></p>(err)
6797 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 24)..(1, 27); }
6798 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6799 @@XMLTest:
6800 @@@QName: xp.element.type.match.5.test
6801 @@@DEnt:
6802 @@@@test:value:
6803 <a:p xmlns:a="about:1" xmlns:b="about:1"></b:p>(err)
6804 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 42)..(1, 47); }
6805 @@@c:erred: <[[xp|wf-syntax-error]]> { }
6806
6807 @@XMLTest:
6808 @@@QName: xp.stag.stago.name.etago.test
6809 @@@DEnt:
6810 @@@@test:value:
6811 <a</a>
6812 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 3); }
6813 @@XMLTest:
6814 @@@QName: xp.stag.stago.name.s.etago.test
6815 @@@DEnt:
6816 @@@@test:value:
6817 <a </a>
6818 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 4); }
6819 @@XMLTest:
6820 @@@QName: xp.stag.stago.name.s.attr.etago.test
6821 @@@DEnt:
6822 @@@@test:value:
6823 <a a="b"</a>
6824 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
6825 @@XMLTest:
6826 @@@QName: xp.stag.stago.name.s.attr.s.attr.etago.test
6827 @@@DEnt:
6828 @@@@test:value:
6829 <a a="b" c="d"</a>
6830 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 15); }
6831 @@XMLTest:
6832 @@@QName: xp.stag.stago.name.s.attr.s.etago.test
6833 @@@DEnt:
6834 @@@@test:value:
6835 <a a="b" </a>
6836 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 10); }
6837 @@XMLTest:
6838 @@@QName: xp.stag.etag.1.test
6839 @@@DEnt:
6840 @@@@test:value:
6841 <root><a></a></root>
6842 @@@test:domTree:
6843 document {
6844 element {
6845 element {
6846 node-name: 'a';
6847 }
6848 }
6849 }
6850 @@XMLTest:
6851 @@@QName: xp.stag.etag.2.test
6852 @@@DEnt:
6853 @@@@test:value:
6854 <root><ab></ab></root>
6855 @@@test:domTree:
6856 document {
6857 element {
6858 element {
6859 node-name: 'ab';
6860 }
6861 }
6862 }
6863 @@XMLTest:
6864 @@@QName: xp.stag.etag.s.1.test
6865 @@@DEnt:
6866 @@@@test:value:
6867 <root><a ></a ></root>
6868 @@@test:domTree:
6869 document {
6870 element {
6871 element {
6872 node-name: 'a';
6873 }
6874 }
6875 }
6876 @@XMLTest:
6877 @@@QName: xp.etag.1.test
6878 @@@DEnt:
6879 @@@@test:value:
6880 <root><a/></root>
6881 @@@test:domTree:
6882 document {
6883 element {
6884 element {
6885 node-name: 'a';
6886 }
6887 }
6888 }
6889 @@XMLTest:
6890 @@@QName: xp.etag.2.test
6891 @@@DEnt:
6892 @@@@test:value:
6893 <root><a /></root>
6894 @@@test:domTree:
6895 document {
6896 element {
6897 element {
6898 node-name: 'a';
6899 }
6900 }
6901 }
6902 @@XMLTest:
6903 @@@QName: xp.stag.etag.attr.1.test
6904 @@@DEnt:
6905 @@@@test:value:
6906 <root><a at="v"></a></root>
6907 @@@test:domTree:
6908 document {
6909 element {
6910 element {
6911 node-name: 'a';
6912 attribute {
6913 node-name: 'at';
6914 value: 'v';
6915 }
6916 }
6917 }
6918 }
6919 @@XMLTest:
6920 @@@QName: xp.stag.etag.attr.2.test
6921 @@@DEnt:
6922 @@@@test:value:
6923 <root><a at="v" ></a></root>
6924 @@@test:domTree:
6925 document {
6926 element {
6927 element {
6928 node-name: 'a';
6929 attribute {
6930 node-name: 'at';
6931 value: 'v';
6932 }
6933 }
6934 }
6935 }
6936 @@XMLTest:
6937 @@@QName: xp.stag.etag.attr.3.test
6938 @@@DEnt:
6939 @@@@test:value:
6940 <root><a at ="v"></a></root>
6941 @@@test:domTree:
6942 document {
6943 element {
6944 element {
6945 node-name: 'a';
6946 attribute {
6947 node-name: 'at';
6948 value: 'v';
6949 }
6950 }
6951 }
6952 }
6953 @@XMLTest:
6954 @@@QName: xp.stag.etag.attr.4.test
6955 @@@DEnt:
6956 @@@@test:value:
6957 <root><a at= "v"></a></root>
6958 @@@test:domTree:
6959 document {
6960 element {
6961 element {
6962 node-name: 'a';
6963 attribute {
6964 node-name: 'at';
6965 value: 'v';
6966 }
6967 }
6968 }
6969 }
6970 @@XMLTest:
6971 @@@QName: xp.stag.etag.attr.5.test
6972 @@@DEnt:
6973 @@@@test:value:
6974 <root><a at='v'></a></root>
6975 @@@test:domTree:
6976 document {
6977 element {
6978 element {
6979 node-name: 'a';
6980 attribute {
6981 node-name: 'at';
6982 value: 'v';
6983 }
6984 }
6985 }
6986 }
6987 @@XMLTest:
6988 @@@QName: xp.stag.etag.attr.6.test
6989 @@@DEnt:
6990 @@@@test:value:
6991 <root><a at= 'v' ></a></root>
6992 @@@test:domTree:
6993 document {
6994 element {
6995 element {
6996 node-name: 'a';
6997 attribute {
6998 node-name: 'at';
6999 value: 'v';
7000 }
7001 }
7002 }
7003 }
7004 @@XMLTest:
7005 @@@QName: xp.stag.etag.attr.attr.1.test
7006 @@@DEnt:
7007 @@@@test:value:
7008 <root><a at="v" tr="w"></a></root>
7009 @@@test:domTree:
7010 document {
7011 element {
7012 element {
7013 node-name: 'a';
7014 attribute {
7015 node-name: 'at';
7016 value: 'v';
7017 }
7018 attribute {
7019 node-name: 'tr';
7020 value: 'w';
7021 }
7022 }
7023 }
7024 }
7025 @@XMLTest:
7026 @@@QName: xp.stag.etag.attr.attr.2.test
7027 @@@DEnt:
7028 @@@@test:value:
7029 <root><a tr="w" at="v"></a></root>
7030 @@@test:domTree:
7031 document {
7032 element {
7033 element {
7034 node-name: 'a';
7035 attribute {
7036 node-name: 'at';
7037 value: 'v';
7038 }
7039 attribute {
7040 node-name: 'tr';
7041 value: 'w';
7042 }
7043 }
7044 }
7045 }
7046 @@XMLTest:
7047 @@@QName: xp.stag.etag.attr.no.s.attr.test
7048 @@@DEnt:
7049 @@@@test:value:
7050 <root><a at="v"tr="w"></a></root>
7051 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 16)..(1, 17); }
7052 @@XMLTest:
7053 @@@QName: xp.etag.attr.1.test
7054 @@@DEnt:
7055 @@@@test:value:
7056 <root><a at="v" tr="w"></a b="c"></root>
7057 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
7058 @@XMLTest:
7059 @@@QName: xp.etag.no.etagc.1.test
7060 @@@DEnt:
7061 @@@@test:value:
7062 <root><a at="v" tr="w"></a</root>
7063 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27)..(1, 28); }
7064 @@XMLTest:
7065 @@@QName: xp.etag.no.etagc.2.test
7066 @@@DEnt:
7067 @@@@test:value:
7068 <root><a at="v" tr="w"></a </root>
7069 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 29)..(1, 30); }
7070 @@XMLTest:
7071 @@@QName: xp.mtag.attr.1.test
7072 @@@DEnt:
7073 @@@@test:value:
7074 <root><a b="c"/></root>
7075 @@@test:domTree:
7076 document {
7077 element {
7078 element {
7079 node-name: 'a';
7080 attribute {
7081 node-name: 'b';
7082 value: 'c';
7083 }
7084 }
7085 }
7086 }
7087 @@XMLTest:
7088 @@@QName: xp.mtag.attr.2.test
7089 @@@DEnt:
7090 @@@@test:value:
7091 <root><a b="c" /></root>
7092 @@@test:domTree:
7093 document {
7094 element {
7095 element {
7096 node-name: 'a';
7097 attribute {
7098 node-name: 'b';
7099 value: 'c';
7100 }
7101 }
7102 }
7103 }
7104 @@XMLTest:
7105 @@@QName: xp.mtag.attr.3.test
7106 @@@DEnt:
7107 @@@@test:value:
7108 <root><a b='c'/></root>
7109 @@@test:domTree:
7110 document {
7111 element {
7112 element {
7113 node-name: 'a';
7114 attribute {
7115 node-name: 'b';
7116 value: 'c';
7117 }
7118 }
7119 }
7120 }
7121 @@XMLTest:
7122 @@@QName: xp.mtag.attr.4.test
7123 @@@DEnt:
7124 @@@@test:value:
7125 <root><a b="c" d="e"/></root>
7126 @@@test:domTree:
7127 document {
7128 element {
7129 element {
7130 node-name: 'a';
7131 attribute {
7132 node-name: 'b';
7133 value: 'c';
7134 }
7135 attribute {
7136 node-name: 'd';
7137 value: 'e';
7138 }
7139 }
7140 }
7141 }
7142
7143 @@XMLTest:
7144 @@@QName: xp.attvalue.lt.1.test
7145 @@@DEnt:
7146 @@@@test:value:
7147 <a b="aa<dd"/>
7148 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
7149 @@XMLTest:
7150 @@@QName: xp.attvalue.lt.2.test
7151 @@@DEnt:
7152 @@@@test:value:
7153 <a b='aa<dd'/>
7154 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
7155 @@XMLTest:
7156 @@@QName: xp.attvalue.amp.1.test
7157 @@@DEnt:
7158 @@@@test:value:
7159 <a b="aa& dd"/>
7160 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 12); }
7161 @@XMLTest:
7162 @@@QName: xp.attvalue.amp.2.test
7163 @@@DEnt:
7164 @@@@test:value:
7165 <a b='aa& dd'/>
7166 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 12); }
7167 @@XMLTest:
7168 @@@QName: xp.attvalue.amp.3.test
7169 @@@DEnt:
7170 @@@@test:value:
7171 <a b="aa&# dd"/>
7172 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 13); }
7173 @@XMLTest:
7174 @@@QName: xp.attvalue.amp.4.test
7175 @@@DEnt:
7176 @@@@test:value:
7177 <a b="aa&#x dd"/>
7178 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 14); }
7179
7180 @@XMLTest:
7181 @@@QName: xp.unique.att.spec.1.test
7182 @@@DEnt:
7183 @@@@test:value:
7184 <a b="c" b="d"/>
7185 @@@c:erred: <[[xp|wf-unique-att-spec]]> { (1, 4)..(1, 14); }
7186 @@XMLTest:
7187 @@@QName: xp.unique.att.spec.2.test
7188 @@@DEnt:
7189 @@@@test:value:
7190 <a d:b="c" d:b="d" xmlns:d="about:2"/>
7191 @@@c:erred: <[[xp|wf-unique-att-spec]]> { (1, 4)..(1, 18); }
7192
7193 @@XMLTest:
7194 @@@QName: xp.no.external.entity.references.1.test
7195 @@@DEnt:
7196 @@@@test:value:
7197 <!DOCTYPE a [
7198 <!ENTITY ent SYSTEM "something">
7199 ]>
7200 <a b="c&ent;"/>
7201 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (4, 8)..(4, 12); }
7202 @@XMLTest:
7203 @@@QName: xp.no.external.entity.references.2.test
7204 @@@DEnt:
7205 @@@@test:value:
7206 <!DOCTYPE a [
7207 <!NOTATION n SYSTEM "notation">
7208 <!ENTITY ent SYSTEM "something" NDATA n>
7209 ]>
7210 <a b="c&ent;"/>
7211 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (5, 8)..(5, 12); }
7212 @@XMLTest:
7213 @@@QName: xp.no.external.entity.references.3.test
7214 @@@DEnt:
7215 @@@@test:value:
7216 <!DOCTYPE a [
7217 <!ENTITY ent SYSTEM "something">
7218 <!ENTITY ent2 "ddd&ent;">
7219 ]>
7220 <a b="c&ent2;"/>
7221 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 4)..(1, 8); }
7222 @@XMLTest:
7223 @@@QName: xp.no.external.entity.references.4.test
7224 @@@DEnt:
7225 @@@@test:value:
7226 <!DOCTYPE a [
7227 <!NOTATION n SYSTEM "notation">
7228 <!ENTITY ent SYSTEM "something" NDATA n>
7229 <!ENTITY ent2 "ddd&ent;">
7230 ]>
7231 <a b="c&ent2;"/>
7232 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 4)..(1, 8); }
7233 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
7234 @@XMLTest:
7235 @@@QName: xp.no.lt.in.attr.value.1.test
7236 @@@DEnt:
7237 @@@@test:value:
7238 <!DOCTYPE a [
7239 <!ENTITY ent "aa<bb">
7240 ]>
7241 <a b="c&ent;"/>
7242 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
7243 @@@c:erred:
7244 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
7245 @@@@enImplNote: When entity node is created.
7246 @@XMLTest:
7247 @@@QName: xp.no.lt.in.attr.value.2.test
7248 @@@DEnt:
7249 @@@@test:value:
7250 <!DOCTYPE a [
7251 <!ENTITY ent "aa<bb">
7252 <!ENTITY ent2 "ccc&ent;">
7253 ]>
7254 <a b="c&ent2;"/>
7255 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
7256 @@@c:erred:
7257 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
7258 @@@@enImplNote: When entity node is created.
7259 @@XMLTest:
7260 @@@QName: xp.no.lt.in.attr.value.3.test
7261 @@@DEnt:
7262 @@@@test:value:
7263 <!DOCTYPE a [
7264 <!ENTITY ent "aa&#x3C;bb">
7265 ]>
7266 <a b="c&ent;"/>
7267 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
7268 @@@c:erred:
7269 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
7270 @@@@enImplNote: When entity node is created.
7271 @@XMLTest:
7272 @@@QName: xp.no.lt.in.attr.value.4.test
7273 @@@DEnt:
7274 @@@@test:value:
7275 <!DOCTYPE a [
7276 <!ENTITY ent "aa&#x3C;bb">
7277 <!ENTITY ent2 "ccc&ent;">
7278 ]>
7279 <a b="c&ent2;"/>
7280 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
7281 @@@c:erred:
7282 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
7283 @@@@enImplNote: When entity node is created.
7284 @@XMLTest:
7285 @@@QName: xp.ger.lt.in.attr.value.1.test
7286 @@@DEnt:
7287 @@@@test:value:
7288 <!DOCTYPE a [
7289 <!ENTITY ent "aa&lt;bb">
7290 ]>
7291 <a b="c&ent;"/>
7292 @@@test:domTree:
7293 document {
7294 document-type {
7295 general-entity {
7296 node-name: 'ent';
7297 text-content: 'aa<bb';
7298 }
7299 }
7300 element {
7301 attribute {
7302 node-name: 'b';
7303 text { data: 'c'; }
7304 general-entity-reference {
7305 is-expanded: true;
7306 node-name: 'ent';
7307 text-content: 'aa<bb';
7308 }
7309 }
7310 }
7311 }
7312 @@XMLTest:
7313 @@@QName: xp.ger.lt.in.attr.value.2.test
7314 @@@DEnt:
7315 @@@@test:value:
7316 <!DOCTYPE a [
7317 <!ENTITY ent "aa&lt;bb">
7318 <!ENTITY ent2 "ccc&ent;">
7319 ]>
7320 <a b="c&ent2;"/>
7321 @@@test:domTree:
7322 document {
7323 document-type {
7324 general-entity {
7325 node-name: 'ent';
7326 text-content: 'aa<bb';
7327 }
7328 general-entity {
7329 node-name: 'ent2';
7330 text { data: 'ccc'; }
7331 general-entity-reference {
7332 node-name: 'ent';
7333 text-content: 'aa<bb';
7334 is-expanded: true;
7335 }
7336 }
7337 }
7338 element {
7339 attribute {
7340 node-name: 'b';
7341 text { data: 'c'; }
7342 general-entity-reference {
7343 node-name: 'ent2';
7344 text { data: 'ccc'; }
7345 general-entity-reference {
7346 node-name: 'ent';
7347 text-content: 'aa<bb';
7348 is-expanded: true;
7349 }
7350 is-expanded: true;
7351 }
7352 }
7353 }
7354 }
7355
7356 @@XMLTest:
7357 @@@QName: xp.doctype.intsubset.pi.test
7358 @@@DEnt:
7359 @@@@test:value:
7360 <!DOCTYPE a [
7361 <?pi data ?>
7362 ]>
7363 <a></a>
7364 @@@test:domTree:
7365 document {
7366 xml-version: '1.0';
7367 xml-encoding: null;
7368 xml-standalone: false;
7369 document-type {
7370 node-name: 'a';
7371 pi {
7372 target: 'pi';
7373 data: 'data ';
7374 }
7375 }
7376 element {
7377 namespace-uri: null;
7378 prefix: null;
7379 local-name: 'a';
7380 text-content: '';
7381 }
7382 }
7383 @@@enImplNote:
7384 A DOM PI node in doctype node is a manakai extension.
7385
7386
7387 @@XMLTest:
7388 @@@QName: xp.doctype.intsubset.entity.general.internal.test
7389 @@@DEnt:
7390 @@@@test:value:
7391 <!DOCTYPE a [
7392 <!ENTITY entity "entity value">
7393 ]>
7394 <a></a>
7395 @@@test:domTree:
7396 document {
7397 xml-version: '1.0';
7398 xml-encoding: null;
7399 xml-standalone: false;
7400 document-type {
7401 node-name: 'a';
7402 general-entity {
7403 node-name: 'entity';
7404 text-content: 'entity value';
7405 has-replacement-tree: true;
7406 }
7407 }
7408 element {
7409 namespace-uri: null;
7410 prefix: null;
7411 local-name: 'a';
7412 text-content: '';
7413 }
7414 }
7415 @@XMLTest:
7416 @@@QName: xp.doctype.intsubset.entity.parameter.internal.test
7417 @@@DEnt:
7418 @@@@test:value:
7419 <!DOCTYPE a [
7420 <!ENTITY % entity "entity value">
7421 ]>
7422 <a></a>
7423 @@@test:domTree:
7424 document {
7425 xml-version: '1.0';
7426 xml-encoding: null;
7427 xml-standalone: false;
7428 document-type {
7429 node-name: 'a';
7430 }
7431 element {
7432 namespace-uri: null;
7433 prefix: null;
7434 local-name: 'a';
7435 text-content: '';
7436 }
7437 }
7438
7439 @@XMLTest:
7440 @@@QName: xp.doctype.internal.entity.root.element.text.only.test
7441 @@@DEnt:
7442 @@@@test:value:
7443 <!DOCTYPE a [
7444 <!ENTITY entity "entity value">
7445 ]>
7446 <a>&entity;</a>
7447 @@@test:domTree:
7448 document {
7449 xml-version: '1.0';
7450 xml-encoding: null;
7451 xml-standalone: false;
7452 document-type {
7453 node-name: 'a';
7454 general-entity {
7455 node-name: 'entity';
7456 text-content: 'entity value';
7457 has-replacement-tree: true;
7458 }
7459 }
7460 element {
7461 namespace-uri: null;
7462 prefix: null;
7463 local-name: 'a';
7464 general-entity-reference {
7465 node-name: 'entity';
7466 text {
7467 data: 'entity value';
7468 }
7469 is-expanded: true;
7470 }
7471 }
7472 }
7473 @@XMLTest:
7474 @@@QName: xp.doctype.internal.entity.root.element.text.mult.test
7475 @@@DEnt:
7476 @@@@test:value:
7477 <!DOCTYPE a [
7478 <!ENTITY entity "entity value">
7479 ]>
7480 <a>&entity; and &entity;</a>
7481 @@@test:domTree:
7482 document {
7483 xml-version: '1.0';
7484 xml-encoding: null;
7485 xml-standalone: false;
7486 document-type {
7487 node-name: 'a';
7488 general-entity {
7489 node-name: 'entity';
7490 text-content: 'entity value';
7491 has-replacement-tree: true;
7492 }
7493 }
7494 element {
7495 namespace-uri: null;
7496 prefix: null;
7497 local-name: 'a';
7498 general-entity-reference {
7499 node-name: 'entity';
7500 text {
7501 data: 'entity value';
7502 }
7503 is-expanded: true;
7504 }
7505 text { data: ' and '; }
7506 general-entity-reference {
7507 node-name: 'entity';
7508 text {
7509 data: 'entity value';
7510 }
7511 is-expanded: true;
7512 }
7513 }
7514 }
7515 @@XMLTest:
7516 @@@QName: xp.doctype.internal.entity.root.element.text.element.test
7517 @@@DEnt:
7518 @@@@test:value:
7519 <!DOCTYPE a [
7520 <!ENTITY entity "entity <p>value</p> with <e>element</e> ">
7521 ]>
7522 <a>&entity;</a>
7523 @@@test:domTree:
7524 document {
7525 xml-version: '1.0';
7526 xml-encoding: null;
7527 xml-standalone: false;
7528 document-type {
7529 node-name: 'a';
7530 general-entity {
7531 node-name: 'entity';
7532 has-replacement-tree: true;
7533 text { data: 'entity '; }
7534 element {
7535 node-name: 'p';
7536 text-content: 'value';
7537 }
7538 text { data: ' with '; }
7539 element {
7540 node-name: 'e';
7541 text-content: 'element';
7542 }
7543 text { data: ' '; }
7544 }
7545 }
7546 element {
7547 namespace-uri: null;
7548 prefix: null;
7549 local-name: 'a';
7550 general-entity-reference {
7551 node-name: 'entity';
7552 is-expanded: true;
7553 text {
7554 data: 'entity ';
7555 }
7556 element {
7557 namespace-uri: null;
7558 prefix: null;
7559 local-name: 'p';
7560 text {
7561 data: 'value';
7562 }
7563 }
7564 text {
7565 data: ' with ';
7566 }
7567 element {
7568 namespace-uri: null;
7569 prefix: null;
7570 local-name: 'e';
7571 text {
7572 data: 'element';
7573 }
7574 }
7575 text {
7576 data: ' ';
7577 }
7578 }
7579 }
7580 }
7581 @@XMLTest:
7582 @@@QName: xp.doctype.internal.entity.root.element.text.in.ent.test
7583 @@@DEnt:
7584 @@@@test:value:
7585 <!DOCTYPE a [
7586 <!ENTITY entity1 "entity value">
7587 <!ENTITY entity2 "e&entity1;n">
7588 ]>
7589 <a>&entity2;</a>
7590 @@@test:domTree:
7591 document {
7592 xml-version: '1.0';
7593 xml-encoding: null;
7594 xml-standalone: false;
7595 document-type {
7596 node-name: 'a';
7597 general-entity {
7598 node-name: 'entity1';
7599 text-content: 'entity value';
7600 }
7601 general-entity {
7602 node-name: 'entity2';
7603 text { data: 'e'; }
7604 general-entity-reference {
7605 node-name: 'entity1';
7606 text-content: 'entity value';
7607 is-expanded: true;
7608 }
7609 text { data: 'n'; }
7610 }
7611 }
7612 element {
7613 namespace-uri: null;
7614 prefix: null;
7615 local-name: 'a';
7616 general-entity-reference {
7617 node-name: 'entity2';
7618 text { data: 'e'; }
7619 is-expanded: true;
7620 general-entity-reference {
7621 node-name: 'entity1';
7622 text {
7623 data: 'entity value';
7624 }
7625 is-expanded: true;
7626 }
7627 text { data: 'n'; }
7628 }
7629 }
7630 }
7631
7632 @@XMLTest:
7633 @@@QName: xp.doctype.entity.value.charref.test
7634 @@@DEnt:
7635 @@@@test:value:
7636 <!DOCTYPE a [
7637 <!ENTITY entity1 "entity &#x21;value&#35;">
7638 <!ENTITY entity2 '&#x21;value&#35;'>
7639 ]>
7640 <a></a>
7641 @@@test:domTree:
7642 document {
7643 document-type {
7644 general-entity {
7645 node-name: 'entity1';
7646 text-content: 'entity !value#';
7647 has-replacement-tree: true;
7648 }
7649 general-entity {
7650 node-name: 'entity2';
7651 text-content: '!value#';
7652 has-replacement-tree: true;
7653 }
7654 }
7655 element { }
7656 }
7657
7658 @@XMLTest:
7659 @@@QName: xp.predefined.in.content.test
7660 @@@DEnt:
7661 @@@@test:value:
7662 <a>_&lt;_&gt;_&quot;_&apos;_&amp;_</a>
7663 @@@test:domTree:
7664 document {
7665 element {
7666 text-content: '_<_>_"_' U+0027 '_&_';
7667 }
7668 }
7669 @@XMLTest:
7670 @@@QName: xp.predefined.in.attr.test
7671 @@@DEnt:
7672 @@@@test:value:
7673 <a at="_&lt;_&gt;_&quot;_&apos;_&amp;_"></a>
7674 @@@test:domTree:
7675 document {
7676 element {
7677 attribute {
7678 node-name: 'at';
7679 text-content: '_<_>_"_' U+0027 '_&_';
7680 }
7681 }
7682 }
7683 @@XMLTest:
7684 @@@QName: xp.predefined.in.content.in.entity.test
7685 @@@DEnt:
7686 @@@@test:value:
7687 <!DOCTYPE a [
7688 <!ENTITY ent "_&lt;_&gt;_&quot;_&apos;_&amp;_">
7689 ]>
7690 <a>&ent;</a>
7691 @@@test:domTree:
7692 document {
7693 document-type {
7694 general-entity {
7695 node-name: 'ent';
7696 text-content: '_<_>_"_' U+0027 '_&_';
7697 }
7698 }
7699 element {
7700 text-content: '_<_>_"_' U+0027 '_&_';
7701 }
7702 }
7703 @@XMLTest:
7704 @@@QName: xp.predefined.decl.ignore.test
7705 @@@DEnt:
7706 @@@@test:value:
7707 <!DOCTYPE a [
7708 <!ENTITY lt "&#x26;#x3C;">
7709 <!ENTITY gt "&#x3E;">
7710 <!ENTITY amp "&#x26;#x26;">
7711 <!ENTITY quot "&#x22;">
7712 <!ENTITY apos "&#x27;">
7713 <!ENTITY other "other">
7714 ]>
7715 <a>_&lt;_&gt;_&quot;_&apos;_&amp;_&other;_</a>
7716 @@@test:domTree:
7717 document {
7718 document-type {
7719 general-entity {
7720 node-name: 'other';
7721 text-content: 'other';
7722 }
7723 }
7724 element {
7725 text-content: '_<_>_"_' U+0027 '_&_other_';
7726 }
7727 }
7728
7729 @@XMLTest:
7730 @@@QName: xp.doctype.internal.attr.empty.test
7731 @@@DEnt:
7732 @@@@test:value:
7733 <!DOCTYPE a [
7734 <!ATTLIST a>
7735 ]>
7736 <a></a>
7737 @@@test:domTree:
7738 document {
7739 xml-version: '1.0';
7740 xml-encoding: null;
7741 xml-standalone: false;
7742 document-type {
7743 node-name: 'a';
7744 element-type-definition {
7745 node-name: 'a';
7746 }
7747 }
7748 element {
7749 namespace-uri: null;
7750 local-name: 'a';
7751 }
7752 }
7753 @@XMLTest:
7754 @@@QName: xp.doctype.internal.attr.cdata.implied.test
7755 @@@DEnt:
7756 @@@@test:value:
7757 <!DOCTYPE a [
7758 <!ATTLIST a
7759 at CDATA #IMPLIED
7760 >
7761 ]>
7762 <a></a>
7763 @@@test:domTree:
7764 document {
7765 xml-version: '1.0';
7766 xml-encoding: null;
7767 xml-standalone: false;
7768 document-type {
7769 node-name: 'a';
7770 element-type-definition {
7771 node-name: 'a';
7772 attribute-definition {
7773 node-name: 'at';
7774 declared-type: const (CDATA_ATTR);
7775 allowed-tokens: DOMStringList ();
7776 default-type: const (IMPLIED_DEFAULT);
7777 text-content: '';
7778 }
7779 }
7780 }
7781 element {
7782 namespace-uri: null;
7783 local-name: 'a';
7784 }
7785 }
7786 @@XMLTest:
7787 @@@QName: xp.doctype.internal.attr.types.implied.test
7788 @@@DEnt:
7789 @@@@test:value:
7790 <!DOCTYPE a [
7791 <!ATTLIST a
7792 at1 ID #IMPLIED
7793 at2 IDREF #IMPLIED
7794 at3 IDREFS #IMPLIED
7795 at4 ENTITY #IMPLIED
7796 at5 ENTITIES #IMPLIED
7797 at6 NMTOKEN #IMPLIED
7798 at7 NMTOKENS #IMPLIED
7799 at8 NOTATION (n1 | n2|n3) #IMPLIED
7800 at9 (e1| e2| e3 ) #IMPLIED
7801 >
7802 ]>
7803 <a></a>
7804 @@@test:domTree:
7805 document {
7806 xml-version: '1.0';
7807 xml-encoding: null;
7808 xml-standalone: false;
7809 document-type {
7810 node-name: 'a';
7811 element-type-definition {
7812 node-name: 'a';
7813 attribute-definition {
7814 node-name: 'at1';
7815 declared-type: const (ID_ATTR);
7816 allowed-tokens: DOMStringList ();
7817 default-type: const (IMPLIED_DEFAULT);
7818 text-content: '';
7819 }
7820 attribute-definition {
7821 node-name: 'at2';
7822 declared-type: const (IDREF_ATTR);
7823 allowed-tokens: DOMStringList ();
7824 default-type: const (IMPLIED_DEFAULT);
7825 text-content: '';
7826 }
7827 attribute-definition {
7828 node-name: 'at3';
7829 declared-type: const (IDREFS_ATTR);
7830 allowed-tokens: DOMStringList ();
7831 default-type: const (IMPLIED_DEFAULT);
7832 text-content: '';
7833 }
7834 attribute-definition {
7835 node-name: 'at4';
7836 declared-type: const (ENTITY_ATTR);
7837 allowed-tokens: DOMStringList ();
7838 default-type: const (IMPLIED_DEFAULT);
7839 text-content: '';
7840 }
7841 attribute-definition {
7842 node-name: 'at5';
7843 declared-type: const (ENTITIES_ATTR);
7844 allowed-tokens: DOMStringList ();
7845 default-type: const (IMPLIED_DEFAULT);
7846 text-content: '';
7847 }
7848 attribute-definition {
7849 node-name: 'at6';
7850 declared-type: const (NMTOKEN_ATTR);
7851 allowed-tokens: DOMStringList ();
7852 default-type: const (IMPLIED_DEFAULT);
7853 text-content: '';
7854 }
7855 attribute-definition {
7856 node-name: 'at7';
7857 declared-type: const (NMTOKENS_ATTR);
7858 allowed-tokens: DOMStringList ();
7859 default-type: const (IMPLIED_DEFAULT);
7860 text-content: '';
7861 }
7862 attribute-definition {
7863 node-name: 'at8';
7864 declared-type: const (NOTATION_ATTR);
7865 allowed-tokens: DOMStringList ('n1', 'n2', 'n3');
7866 default-type: const (IMPLIED_DEFAULT);
7867 text-content: '';
7868 }
7869 attribute-definition {
7870 node-name: 'at9';
7871 declared-type: const (ENUMERATION_ATTR);
7872 allowed-tokens: DOMStringList ('e1', 'e2', 'e3');
7873 default-type: const (IMPLIED_DEFAULT);
7874 text-content: '';
7875 }
7876 }
7877 }
7878 element {
7879 namespace-uri: null;
7880 local-name: 'a';
7881 }
7882 }
7883 @@XMLTest:
7884 @@@QName: xp.doctype.internal.attr.cdata.defaults.test
7885 @@@DEnt:
7886 @@@@test:value:
7887 <!DOCTYPE a [
7888 <!ATTLIST a
7889 at1 CDATA #IMPLIED
7890 at2 CDATA #REQUIRED
7891 at3 CDATA #FIXED "value3"
7892 at4 CDATA "value4"
7893 at5 CDATA #FIXED 'value5'
7894 at6 CDATA 'value6'
7895 >
7896 ]>
7897 <a></a>
7898 @@@test:domTree:
7899 document {
7900 xml-version: '1.0';
7901 xml-encoding: null;
7902 xml-standalone: false;
7903 document-type {
7904 node-name: 'a';
7905 element-type-definition {
7906 node-name: 'a';
7907 attribute-definition {
7908 node-name: 'at1';
7909 declared-type: const (CDATA_ATTR);
7910 allowed-tokens: DOMStringList ();
7911 default-type: const (IMPLIED_DEFAULT);
7912 text-content: '';
7913 }
7914 attribute-definition {
7915 node-name: 'at2';
7916 declared-type: const (CDATA_ATTR);
7917 allowed-tokens: DOMStringList ();
7918 default-type: const (REQUIRED_DEFAULT);
7919 text-content: '';
7920 }
7921 attribute-definition {
7922 node-name: 'at3';
7923 declared-type: const (CDATA_ATTR);
7924 allowed-tokens: DOMStringList ();
7925 default-type: const (FIXED_DEFAULT);
7926 text-content: 'value3';
7927 }
7928 attribute-definition {
7929 node-name: 'at4';
7930 declared-type: const (CDATA_ATTR);
7931 allowed-tokens: DOMStringList ();
7932 default-type: const (EXPLICIT_DEFAULT);
7933 text-content: 'value4';
7934 }
7935 attribute-definition {
7936 node-name: 'at5';
7937 declared-type: const (CDATA_ATTR);
7938 allowed-tokens: DOMStringList ();
7939 default-type: const (FIXED_DEFAULT);
7940 text-content: 'value5';
7941 }
7942 attribute-definition {
7943 node-name: 'at6';
7944 declared-type: const (CDATA_ATTR);
7945 allowed-tokens: DOMStringList ();
7946 default-type: const (EXPLICIT_DEFAULT);
7947 text-content: 'value6';
7948 }
7949 }
7950 }
7951 element {
7952 namespace-uri: null;
7953 local-name: 'a';
7954 attribute {
7955 node-name: 'at3';
7956 text-content: 'value3';
7957 specified: false;
7958 }
7959 attribute {
7960 node-name: 'at4';
7961 text-content: 'value4';
7962 specified: false;
7963 }
7964 attribute {
7965 node-name: 'at5';
7966 text-content: 'value5';
7967 specified: false;
7968 }
7969 attribute {
7970 node-name: 'at6';
7971 text-content: 'value6';
7972 specified: false;
7973 }
7974 }
7975 }
7976
7977 @@XMLTest:
7978 @@@QName: xp.doctype.internal.attr.cdata.default.normalize.test
7979 @@@DEnt:
7980 @@@@test:value:
7981 <!DOCTYPE a [
7982 <!ATTLIST a
7983 at CDATA " default &#x0A;value "
7984 >
7985 ]>
7986 <a></a>
7987 @@@test:domTree:
7988 document {
7989 xml-version: '1.0';
7990 xml-encoding: null;
7991 xml-standalone: false;
7992 document-type {
7993 node-name: 'a';
7994 element-type-definition {
7995 node-name: 'a';
7996 attribute-definition {
7997 node-name: 'at';
7998 declared-type: const (CDATA_ATTR);
7999 allowed-tokens: DOMStringList ();
8000 default-type: const (EXPLICIT_DEFAULT);
8001 text-content: ' default ' U+000A 'value ';
8002 }
8003 }
8004 }
8005 element {
8006 namespace-uri: null;
8007 local-name: 'a';
8008 attribute {
8009 node-name: 'at';
8010 text-content: ' default ' U+000A 'value ';
8011 specified: false;
8012 }
8013 }
8014 }
8015 @@XMLTest:
8016 @@@QName: xp.doctype.internal.attr.nmtoken.default.normalize.test
8017 @@@DEnt:
8018 @@@@test:value:
8019 <!DOCTYPE a [
8020 <!ATTLIST a
8021 at NMTOKEN " default &#x0A;value "
8022 >
8023 ]>
8024 <a></a>
8025 @@@test:domTree:
8026 document {
8027 xml-version: '1.0';
8028 xml-encoding: null;
8029 xml-standalone: false;
8030 document-type {
8031 node-name: 'a';
8032 element-type-definition {
8033 node-name: 'a';
8034 attribute-definition {
8035 node-name: 'at';
8036 declared-type: const (NMTOKEN_ATTR);
8037 allowed-tokens: DOMStringList ();
8038 default-type: const (EXPLICIT_DEFAULT);
8039 text-content: ' default ' U+000A 'value ';
8040 }
8041 }
8042 }
8043 element {
8044 namespace-uri: null;
8045 local-name: 'a';
8046 attribute {
8047 node-name: 'at';
8048 text-content: ' default ' U+000A 'value ';
8049 specified: false;
8050 }
8051 }
8052 }
8053
8054 @@XMLTest:
8055 @@@QName: xp.doctype.attrtype.no-value.test
8056 @@@DEnt:
8057 @@@@test:value:
8058 <!DOCTYPE a>
8059 <a at=" at value "></a>
8060 @@@test:domTree:
8061 document {
8062 xml-version: '1.0';
8063 xml-encoding: null;
8064 xml-standalone: false;
8065 document-type { }
8066 element {
8067 namespace-uri: null;
8068 local-name: 'a';
8069 attribute {
8070 namespace-uri: null;
8071 local-name: 'at';
8072 value: ' at value ';
8073 text {
8074 data: ' at value ';
8075 }
8076 schema-type-info: TypeInfo (null, null);
8077 specified: true;
8078 }
8079 }
8080 }
8081 @@XMLTest:
8082 @@@QName: xp.doctype.attrtype.cdata.test
8083 @@@DEnt:
8084 @@@@test:value:
8085 <!DOCTYPE a [
8086 <!ATTLIST a
8087 at CDATA #IMPLIED
8088 >
8089 ]>
8090 <a at=" at value "></a>
8091 @@@test:domTree:
8092 document {
8093 xml-version: '1.0';
8094 xml-encoding: null;
8095 xml-standalone: false;
8096 document-type { }
8097 element {
8098 namespace-uri: null;
8099 local-name: 'a';
8100 attribute {
8101 namespace-uri: null;
8102 local-name: 'at';
8103 value: ' at value ';
8104 text {
8105 data: ' at value ';
8106 }
8107 schema-type-info:
8108 TypeInfo ('http://www.w3.org/TR/REC-xml', 'CDATA');
8109 specified: true;
8110 }
8111 }
8112 }
8113 @@XMLTest:
8114 @@@QName: xp.doctype.attrtype.nmtoken.test
8115 @@@DEnt:
8116 @@@@test:value:
8117 <!DOCTYPE a [
8118 <!ATTLIST a
8119 at NMTOKEN #IMPLIED
8120 >
8121 ]>
8122 <a at=" at value "></a>
8123 @@@test:domTree:
8124 document {
8125 xml-version: '1.0';
8126 xml-encoding: null;
8127 xml-standalone: false;
8128 document-type { }
8129 element {
8130 namespace-uri: null;
8131 local-name: 'a';
8132 attribute {
8133 namespace-uri: null;
8134 local-name: 'at';
8135 value: 'at value';
8136 text {
8137 data: ' at value ';
8138 }
8139 schema-type-info:
8140 TypeInfo ('http://www.w3.org/TR/REC-xml', 'NMTOKEN');
8141 specified: true;
8142 }
8143 }
8144 }
8145
8146 @@XMLTest:
8147 @@@QName: xp.doctype.attr.normalization.1.test
8148 @@@DEnt:
8149 @@@@test:value:
8150 <a at=" at &#xA;value "></a>
8151 @@@test:domTree:
8152 document {
8153 element {
8154 attribute {
8155 node-name: 'at';
8156 value: ' at ' U+000A 'value ';
8157 schema-type-info: TypeInfo (null, null);
8158 specified: true;
8159 }
8160 }
8161 }
8162 @@XMLTest:
8163 @@@QName: xp.doctype.attr.normalization.2.test
8164 @@@DEnt:
8165 @@@@test:value:
8166 <a at=" at &#xD;value "></a>
8167 @@@test:domTree:
8168 document {
8169 element {
8170 attribute {
8171 value: ' at ' U+000D 'value ';
8172 schema-type-info: TypeInfo (null, null);
8173 specified: true;
8174 }
8175 }
8176 }
8177 @@XMLTest:
8178 @@@QName: xp.doctype.attr.normalization.3.test
8179 @@@DEnt:
8180 @@@@test:value:
8181 <a at=" at &#x9;value "></a>
8182 @@@test:domTree:
8183 document {
8184 element {
8185 attribute {
8186 node-name: 'at';
8187 value: ' at ' U+0009 'value ';
8188 schema-type-info: TypeInfo (null, null);
8189 specified: true;
8190 }
8191 }
8192 }
8193
8194 @@XMLTest:
8195 @@@QName: xp.doctype.attr.specified.1.test
8196 @@@DEnt:
8197 @@@@test:value:
8198 <!DOCTYPE a [
8199 <!ATTLIST a
8200 at CDATA "default"
8201 >
8202 ]>
8203 <a></a>
8204 @@@test:domTree:
8205 document {
8206 document-type { }
8207 element {
8208 attribute {
8209 node-name: 'at';
8210 value: 'default';
8211 specified: false;
8212 }
8213 }
8214 }
8215 @@XMLTest:
8216 @@@QName: xp.doctype.attr.specified.2.test
8217 @@@DEnt:
8218 @@@@test:value:
8219 <!DOCTYPE a [
8220 <!ATTLIST a
8221 at CDATA "default"
8222 >
8223 ]>
8224 <a at2="specified"></a>
8225 @@@test:domTree:
8226 document {
8227 document-type { }
8228 element {
8229 attribute {
8230 node-name: 'at';
8231 value: 'default';
8232 specified: false;
8233 }
8234 attribute {
8235 node-name: 'at2';
8236 value: 'specified';
8237 specified: true;
8238 }
8239 }
8240 }
8241 @@XMLTest:
8242 @@@QName: xp.doctype.attr.specified.3.test
8243 @@@DEnt:
8244 @@@@test:value:
8245 <!DOCTYPE a [
8246 <!ATTLIST a
8247 at CDATA "default"
8248 >
8249 ]>
8250 <a at="specified"></a>
8251 @@@test:domTree:
8252 document {
8253 document-type { }
8254 element {
8255 attribute {
8256 node-name: 'at';
8257 value: 'specified';
8258 specified: true;
8259 }
8260 }
8261 }
8262
8263 @@XMLTest:
8264 @@@QName: xp.attr.literal.charref.test
8265 @@@DEnt:
8266 @@@@test:value:
8267 <a at1 = "value&#33;_&#x25;value"
8268 at2 = 'value&#x25;_&#33;value'></a>
8269 @@@test:domTree:
8270 document {
8271 element {
8272 attribute {
8273 node-name: 'at1';
8274 text-content: 'value!_%value';
8275 }
8276 attribute {
8277 node-name: 'at2';
8278 text-content: 'value%_!value';
8279 }
8280 }
8281 }
8282 @@XMLTest:
8283 @@@QName: xp.attr.literal.entref.test
8284 @@@DEnt:
8285 @@@@test:value:
8286 <!DOCTYPE a [
8287 <!ENTITY ent "entity&#x26;#33;_&#x26;#x29;value">
8288 ]>
8289 <a at1 = "value&ent;value"
8290 at2 = 'value&ent;value'></a>
8291 @@@test:domTree:
8292 document {
8293 document-type {
8294 general-entity {
8295 node-name: 'ent';
8296 text-content: 'entity!_)value';
8297 }
8298 }
8299 element {
8300 attribute {
8301 node-name: 'at1';
8302 text-content: 'valueentity!_)valuevalue';
8303 }
8304 attribute {
8305 node-name: 'at2';
8306 text-content: 'valueentity!_)valuevalue';
8307 }
8308 }
8309 }
8310 @@XMLTest:
8311 @@@QName: xp.attr.literal.entref.nest.test
8312 @@@DEnt:
8313 @@@@test:value:
8314 <!DOCTYPE a [
8315 <!ENTITY ent1 "entity&#x26;#33;_&#x26;#x29;value">
8316 <!ENTITY ent2 "@&ent1;@">
8317 ]>
8318 <a at1 = "value&ent2;value"
8319 at2 = 'value&ent2;value'></a>
8320 @@@test:domTree:
8321 document {
8322 document-type {
8323 general-entity {
8324 node-name: 'ent1';
8325 text-content: 'entity!_)value';
8326 }
8327 general-entity {
8328 node-name: 'ent2';
8329 text-content: '@entity!_)value@';
8330 }
8331 }
8332 element {
8333 attribute {
8334 node-name: 'at1';
8335 text-content: 'value@entity!_)value@value';
8336 }
8337 attribute {
8338 node-name: 'at2';
8339 text-content: 'value@entity!_)value@value';
8340 }
8341 }
8342 }
8343
8344 @@XMLTest:
8345 @@@QName: xp.element.content.ncr.1.test
8346 @@@DEnt:
8347 @@@@test:value:
8348 <e>&#33;</e>
8349 @@@test:domTree:
8350 document {
8351 element {
8352 text-content: '!';
8353 }
8354 }
8355 @@XMLTest:
8356 @@@QName: xp.element.content.ncr.2.test
8357 @@@DEnt:
8358 @@@@test:value:
8359 <e>aaaa&#33;bbbb</e>
8360 @@@test:domTree:
8361 document {
8362 element {
8363 text-content: 'aaaa!bbbb';
8364 }
8365 }
8366 @@XMLTest:
8367 @@@QName: xp.attrval.ncr.1.test
8368 @@@DEnt:
8369 @@@@test:value:
8370 <e a="&#33;"/>
8371 @@@test:domTree:
8372 document {
8373 element {
8374 attribute {
8375 node-name: 'a';
8376 text-content: '!';
8377 }
8378 }
8379 }
8380 @@XMLTest:
8381 @@@QName: xp.attrval.ncr.2.test
8382 @@@DEnt:
8383 @@@@test:value:
8384 <e a="aaaaa&#33;bbbbb"/>
8385 @@@test:domTree:
8386 document {
8387 element {
8388 attribute {
8389 node-name: 'a';
8390 text-content: 'aaaaa!bbbbb';
8391 }
8392 }
8393 }
8394 @@XMLTest:
8395 @@@QName: xp.attrval.ncr.3.test
8396 @@@DEnt:
8397 @@@@test:value:
8398 <e a='&#33;'/>
8399 @@@test:domTree:
8400 document {
8401 element {
8402 attribute {
8403 node-name: 'a';
8404 text-content: '!';
8405 }
8406 }
8407 }
8408 @@XMLTest:
8409 @@@QName: xp.attrval.ncr.4.test
8410 @@@DEnt:
8411 @@@@test:value:
8412 <e a='aaaaa&#33;bbbbb'/>
8413 @@@test:domTree:
8414 document {
8415 element {
8416 attribute {
8417 node-name: 'a';
8418 text-content: 'aaaaa!bbbbb';
8419 }
8420 }
8421 }
8422 @@XMLTest:
8423 @@@QName: xp.entval.ncr.1.test
8424 @@@DEnt:
8425 @@@@test:value:
8426 <!DOCTYPE e [
8427 <!ENTITY ent "&#33;">
8428 ]>
8429 <e/>
8430 @@@test:domTree:
8431 document {
8432 document-type {
8433 general-entity {
8434 node-name: 'ent';
8435 text-content: '!';
8436 }
8437 }
8438 element { }
8439 }
8440 @@XMLTest:
8441 @@@QName: xp.entval.ncr.2.test
8442 @@@DEnt:
8443 @@@@test:value:
8444 <!DOCTYPE e [
8445 <!ENTITY ent "aaaaa&#33;bbbbb">
8446 ]>
8447 <e/>
8448 @@@test:domTree:
8449 document {
8450 document-type {
8451 general-entity {
8452 node-name: 'ent';
8453 text-content: 'aaaaa!bbbbb';
8454 }
8455 }
8456 element { }
8457 }
8458 @@XMLTest:
8459 @@@QName: xp.element.content.reptxt.ncr.1.test
8460 @@@DEnt:
8461 @@@@test:value:
8462 <!DOCTYPE e [
8463 <!ENTITY ent "&#38;#33;">
8464 ]>
8465 <e>&ent;</e>
8466 @@@test:domTree:
8467 document {
8468 document-type { }
8469 element {
8470 general-entity-reference {
8471 node-name: 'ent';
8472 text-content: '!';
8473 is-expanded: true;
8474 }
8475 }
8476 }
8477 @@XMLTest:
8478 @@@QName: xp.element.content.reptxt.ncr.2.test
8479 @@@DEnt:
8480 @@@@test:value:
8481 <!DOCTYPE e [
8482 <!ENTITY ent "aaaaa&#38;#33;bbbbb">
8483 ]>
8484 <e>&ent;</e>
8485 @@@test:domTree:
8486 document {
8487 document-type { }
8488 element {
8489 general-entity-reference {
8490 node-name: 'ent';
8491 text-content: 'aaaaa!bbbbb';
8492 is-expanded: true;
8493 }
8494 }
8495 }
8496 @@XMLTest:
8497 @@@QName: xp.element.content.reptxt.reptxt.ncr.1.test
8498 @@@DEnt:
8499 @@@@test:value:
8500 <!DOCTYPE e [
8501 <!ENTITY ent "&#38;#33;">
8502 <!ENTITY ent2 "&ent;">
8503 ]>
8504 <e>&ent2;</e>
8505 @@@test:domTree:
8506 document {
8507 document-type { }
8508 element {
8509 general-entity-reference {
8510 node-name: 'ent2';
8511 general-entity-reference {
8512 node-name: 'ent';
8513 text-content: '!';
8514 is-expanded: true;
8515 }
8516 is-expanded: true;
8517 }
8518 }
8519 }
8520 @@XMLTest:
8521 @@@QName: xp.element.content.reptxt.reptxt.ncr.2.test
8522 @@@DEnt:
8523 @@@@test:value:
8524 <!DOCTYPE e [
8525 <!ENTITY ent "aa&#38;#33;bb">
8526 <!ENTITY ent2 "&ent;">
8527 ]>
8528 <e>&ent2;</e>
8529 @@@test:domTree:
8530 document {
8531 document-type { }
8532 element {
8533 general-entity-reference {
8534 node-name: 'ent2';
8535 general-entity-reference {
8536 node-name: 'ent';
8537 text-content: 'aa!bb';
8538 is-expanded: true;
8539 }
8540 is-expanded: true;
8541 }
8542 }
8543 }
8544 @@XMLTest:
8545 @@@QName: xp.attval.reptxt.ncr.1.test
8546 @@@DEnt:
8547 @@@@test:value:
8548 <!DOCTYPE e [
8549 <!ENTITY ent "&#38;#33;">
8550 ]>
8551 <e a="&ent;"/>
8552 @@@test:domTree:
8553 document {
8554 document-type { }
8555 element {
8556 attribute {
8557 node-name: 'a';
8558 general-entity-reference {
8559 node-name: 'ent';
8560 text-content: '!';
8561 is-expanded: true;
8562 }
8563 }
8564 }
8565 }
8566 @@XMLTest:
8567 @@@QName: xp.attval.reptxt.ncr.2.test
8568 @@@DEnt:
8569 @@@@test:value:
8570 <!DOCTYPE e [
8571 <!ENTITY ent "aaaaa&#38;#33;bbbbb">
8572 ]>
8573 <e a="&ent;"/>
8574 @@@test:domTree:
8575 document {
8576 document-type { }
8577 element {
8578 attribute {
8579 node-name: 'a';
8580 general-entity-reference {
8581 node-name: 'ent';
8582 text-content: 'aaaaa!bbbbb';
8583 is-expanded: true;
8584 }
8585 }
8586 }
8587 }
8588 @@XMLTest:
8589 @@@QName: xp.attval.reptxt.reptxt.ncr.1.test
8590 @@@DEnt:
8591 @@@@test:value:
8592 <!DOCTYPE e [
8593 <!ENTITY ent "&#38;#33;">
8594 <!ENTITY ent2 "&ent;">
8595 ]>
8596 <e a="&ent2;"/>
8597 @@@test:domTree:
8598 document {
8599 document-type { }
8600 element {
8601 attribute {
8602 node-name: 'a';
8603 general-entity-reference {
8604 node-name: 'ent2';
8605 is-expanded: true;
8606 general-entity-reference {
8607 node-name: 'ent';
8608 text-content: '!';
8609 is-expanded: true;
8610 }
8611 }
8612 }
8613 }
8614 }
8615 @@XMLTest:
8616 @@@QName: xp.attval.reptxt.reptxt.ncr.2.test
8617 @@@DEnt:
8618 @@@@test:value:
8619 <!DOCTYPE e [
8620 <!ENTITY ent "aa&#38;#33;bb">
8621 <!ENTITY ent2 "&ent;">
8622 ]>
8623 <e a="&ent2;"/>
8624 @@@test:domTree:
8625 document {
8626 document-type { }
8627 element {
8628 attribute {
8629 node-name: 'a';
8630 general-entity-reference {
8631 node-name: 'ent2';
8632 is-expanded: true;
8633 general-entity-reference {
8634 node-name: 'ent';
8635 text-content: 'aa!bb';
8636 is-expanded: true;
8637 }
8638 }
8639 }
8640 }
8641 }
8642
8643 @@XMLTest:
8644 @@@QName: xp.element.content.hcr.1.test
8645 @@@DEnt:
8646 @@@@test:value:
8647 <e>&#x21;</e>
8648 @@@test:domTree:
8649 document {
8650 element {
8651 text-content: '!';
8652 }
8653 }
8654 @@XMLTest:
8655 @@@QName: xp.element.content.hcr.2.test
8656 @@@DEnt:
8657 @@@@test:value:
8658 <e>aaaa&#x21;bbbb</e>
8659 @@@test:domTree:
8660 document {
8661 element {
8662 text-content: 'aaaa!bbbb';
8663 }
8664 }
8665 @@XMLTest:
8666 @@@QName: xp.attrval.hcr.1.test
8667 @@@DEnt:
8668 @@@@test:value:
8669 <e a="&#x21;"/>
8670 @@@test:domTree:
8671 document {
8672 element {
8673 attribute {
8674 node-name: 'a';
8675 text-content: '!';
8676 }
8677 }
8678 }
8679 @@XMLTest:
8680 @@@QName: xp.attrval.hcr.2.test
8681 @@@DEnt:
8682 @@@@test:value:
8683 <e a="aaaaa&#x21;bbbbb"/>
8684 @@@test:domTree:
8685 document {
8686 element {
8687 attribute {
8688 node-name: 'a';
8689 text-content: 'aaaaa!bbbbb';
8690 }
8691 }
8692 }
8693 @@XMLTest:
8694 @@@QName: xp.attrval.hcr.3.test
8695 @@@DEnt:
8696 @@@@test:value:
8697 <e a='&#x21;'/>
8698 @@@test:domTree:
8699 document {
8700 element {
8701 attribute {
8702 node-name: 'a';
8703 text-content: '!';
8704 }
8705 }
8706 }
8707 @@XMLTest:
8708 @@@QName: xp.attrval.hcr.4.test
8709 @@@DEnt:
8710 @@@@test:value:
8711 <e a='aaaaa&#x21;bbbbb'/>
8712 @@@test:domTree:
8713 document {
8714 element {
8715 attribute {
8716 node-name: 'a';
8717 text-content: 'aaaaa!bbbbb';
8718 }
8719 }
8720 }
8721 @@XMLTest:
8722 @@@QName: xp.entval.hcr.1.test
8723 @@@DEnt:
8724 @@@@test:value:
8725 <!DOCTYPE e [
8726 <!ENTITY ent "&#x21;">
8727 ]>
8728 <e/>
8729 @@@test:domTree:
8730 document {
8731 document-type {
8732 general-entity {
8733 node-name: 'ent';
8734 text-content: '!';
8735 }
8736 }
8737 element { }
8738 }
8739 @@XMLTest:
8740 @@@QName: xp.entval.hcr.2.test
8741 @@@DEnt:
8742 @@@@test:value:
8743 <!DOCTYPE e [
8744 <!ENTITY ent "aaaaa&#x21;bbbbb">
8745 ]>
8746 <e/>
8747 @@@test:domTree:
8748 document {
8749 document-type {
8750 general-entity {
8751 node-name: 'ent';
8752 text-content: 'aaaaa!bbbbb';
8753 }
8754 }
8755 element { }
8756 }
8757 @@XMLTest:
8758 @@@QName: xp.element.content.reptxt.hcr.1.test
8759 @@@DEnt:
8760 @@@@test:value:
8761 <!DOCTYPE e [
8762 <!ENTITY ent "&#38;#x21;">
8763 ]>
8764 <e>&ent;</e>
8765 @@@test:domTree:
8766 document {
8767 document-type { }
8768 element {
8769 general-entity-reference {
8770 node-name: 'ent';
8771 text-content: '!';
8772 is-expanded: true;
8773 }
8774 }
8775 }
8776 @@XMLTest:
8777 @@@QName: xp.element.content.reptxt.hcr.2.test
8778 @@@DEnt:
8779 @@@@test:value:
8780 <!DOCTYPE e [
8781 <!ENTITY ent "aaaaa&#38;#x21;bbbbb">
8782 ]>
8783 <e>&ent;</e>
8784 @@@test:domTree:
8785 document {
8786 document-type { }
8787 element {
8788 general-entity-reference {
8789 node-name: 'ent';
8790 text-content: 'aaaaa!bbbbb';
8791 is-expanded: true;
8792 }
8793 }
8794 }
8795 @@XMLTest:
8796 @@@QName: xp.element.content.reptxt.reptxt.hcr.1.test
8797 @@@DEnt:
8798 @@@@test:value:
8799 <!DOCTYPE e [
8800 <!ENTITY ent "&#38;#x21;">
8801 <!ENTITY ent2 "&ent;">
8802 ]>
8803 <e>&ent2;</e>
8804 @@@test:domTree:
8805 document {
8806 document-type { }
8807 element {
8808 general-entity-reference {
8809 node-name: 'ent2';
8810 is-expanded: true;
8811 general-entity-reference {
8812 node-name: 'ent';
8813 text-content: '!';
8814 is-expanded: true;
8815 }
8816 }
8817 }
8818 }
8819 @@XMLTest:
8820 @@@QName: xp.element.content.reptxt.reptxt.hcr.2.test
8821 @@@DEnt:
8822 @@@@test:value:
8823 <!DOCTYPE e [
8824 <!ENTITY ent "aa&#38;#x21;bb">
8825 <!ENTITY ent2 "&ent;">
8826 ]>
8827 <e>&ent2;</e>
8828 @@@test:domTree:
8829 document {
8830 document-type { }
8831 element {
8832 general-entity-reference {
8833 node-name: 'ent2';
8834 is-expanded: true;
8835 general-entity-reference {
8836 node-name: 'ent';
8837 is-expanded: true;
8838 text-content: 'aa!bb';
8839 }
8840 }
8841 }
8842 }
8843 @@XMLTest:
8844 @@@QName: xp.attval.reptxt.hcr.1.test
8845 @@@DEnt:
8846 @@@@test:value:
8847 <!DOCTYPE e [
8848 <!ENTITY ent "&#38;#x21;">
8849 ]>
8850 <e a="&ent;"/>
8851 @@@test:domTree:
8852 document {
8853 document-type { }
8854 element {
8855 attribute {
8856 node-name: 'a';
8857 general-entity-reference {
8858 node-name: 'ent';
8859 is-expanded: true;
8860 text-content: '!';
8861 }
8862 }
8863 }
8864 }
8865 @@XMLTest:
8866 @@@QName: xp.attval.reptxt.hcr.2.test
8867 @@@DEnt:
8868 @@@@test:value:
8869 <!DOCTYPE e [
8870 <!ENTITY ent "aaaaa&#38;#x21;bbbbb">
8871 ]>
8872 <e a="&ent;"/>
8873 @@@test:domTree:
8874 document {
8875 document-type { }
8876 element {
8877 attribute {
8878 node-name: 'a';
8879 general-entity-reference {
8880 node-name: 'ent';
8881 is-expanded: true;
8882 text-content: 'aaaaa!bbbbb';
8883 }
8884 }
8885 }
8886 }
8887 @@XMLTest:
8888 @@@QName: xp.attval.reptxt.reptxt.hcr.1.test
8889 @@@DEnt:
8890 @@@@test:value:
8891 <!DOCTYPE e [
8892 <!ENTITY ent "&#38;#x21;">
8893 <!ENTITY ent2 "&ent;">
8894 ]>
8895 <e a="&ent2;"/>
8896 @@@test:domTree:
8897 document {
8898 document-type { }
8899 element {
8900 attribute {
8901 node-name: 'a';
8902 general-entity-reference {
8903 node-name: 'ent2';
8904 is-expanded: true;
8905 general-entity-reference {
8906 node-name: 'ent';
8907 is-expanded: true;
8908 text-content: '!';
8909 }
8910 }
8911 }
8912 }
8913 }
8914 @@XMLTest:
8915 @@@QName: xp.attval.reptxt.reptxt.hcr.2.test
8916 @@@DEnt:
8917 @@@@test:value:
8918 <!DOCTYPE e [
8919 <!ENTITY ent "aa&#38;#x21;bb">
8920 <!ENTITY ent2 "&ent;">
8921 ]>
8922 <e a="&ent2;"/>
8923 @@@test:domTree:
8924 document {
8925 document-type { }
8926 element {
8927 attribute {
8928 node-name: 'a';
8929 general-entity-reference {
8930 node-name: 'ent2';
8931 is-expanded: true;
8932 general-entity-reference {
8933 node-name: 'ent';
8934 is-expanded: true;
8935 text-content: 'aa!bb';
8936 }
8937 }
8938 }
8939 }
8940 }
8941
8942 @@XMLTest:
8943 @@@QName: xp.element.content.ncr.legal.char.1.0.1.test
8944 @@@DEnt:
8945 @@@@test:value:
8946 <?xml version="1.0"?>
8947 <e>&#0;</e>
8948 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
8949 @@XMLTest:
8950 @@@QName: xp.element.content.ncr.legal.char.1.1.1.test
8951 @@@DEnt:
8952 @@@@test:value:
8953 <?xml version="1.1"?>
8954 <e>&#0;</e>
8955 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
8956 @@XMLTest:
8957 @@@QName: xp.element.content.ncr.legal.char.1.0.2.test
8958 @@@DEnt:
8959 @@@@test:value:
8960 <?xml version="1.0"?>
8961 <e>&#1;</e>
8962 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
8963 @@XMLTest:
8964 @@@QName: xp.element.content.ncr.legal.char.1.1.2.test
8965 @@@DEnt:
8966 @@@@test:value:
8967 <?xml version="1.1"?>
8968 <e>&#1;</e>
8969 @@@test:domTree:
8970 document {
8971 xml-version: '1.1';
8972 element {
8973 text-content: U+0001;
8974 }
8975 }
8976 @@XMLTest:
8977 @@@QName: xp.element.content.hcr.legal.char.1.0.1.test
8978 @@@DEnt:
8979 @@@@test:value:
8980 <?xml version="1.0"?>
8981 <e>&#x0;</e>
8982 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
8983 @@XMLTest:
8984 @@@QName: xp.element.content.hcr.legal.char.1.1.1.test
8985 @@@DEnt:
8986 @@@@test:value:
8987 <?xml version="1.1"?>
8988 <e>&#x0;</e>
8989 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
8990 @@XMLTest:
8991 @@@QName: xp.element.content.hcr.legal.char.1.0.2.test
8992 @@@DEnt:
8993 @@@@test:value:
8994 <?xml version="1.0"?>
8995 <e>&#x1;</e>
8996 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
8997 @@XMLTest:
8998 @@@QName: xp.element.content.hcr.legal.char.1.1.2.test
8999 @@@DEnt:
9000 @@@@test:value:
9001 <?xml version="1.1"?>
9002 <e>&#x1;</e>
9003 @@@test:domTree:
9004 document {
9005 xml-version: '1.1';
9006 element {
9007 text-content: U+0001;
9008 }
9009 }
9010
9011 @@XMLTest:
9012 @@@QName: xp.element.content.ger.entity.declared.nodtd.1.test
9013 @@@DEnt:
9014 @@@@test:value:
9015 <p>&entity;</p>
9016 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 4)..(1, 11); }
9017 @@XMLTest:
9018 @@@QName: xp.element.content.ger.entity.declared.nodtd.2.test
9019 @@@DEnt:
9020 @@@@test:value:
9021 <?xml version="1.0" standalone="yes"?>
9022 <p>&entity;</p>
9023 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9024 @@XMLTest:
9025 @@@QName: xp.element.content.ger.entity.declared.nodtd.3.test
9026 @@@DEnt:
9027 @@@@test:value:
9028 <?xml version="1.0" standalone="no"?>
9029 <p>&entity;</p>
9030 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9031 @@XMLTest:
9032 @@@QName: xp.element.content.ger.entity.declared.nodtd.-1.test
9033 @@@DEnt:
9034 @@@@test:value:
9035 <p>&lt;&gt;&amp;&quot;&apos;</p>
9036 @@@test:domTree:
9037 document {
9038 element {
9039 text-content: '<>&"' U+0027;
9040 }
9041 }
9042 @@XMLTest:
9043 @@@QName: xp.element.content.ger.entity.declared.nopref.1.test
9044 @@@DEnt:
9045 @@@@test:value:
9046 <!DOCTYPE p []>
9047 <p>&entity;</p>
9048 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9049 @@XMLTest:
9050 @@@QName: xp.element.content.ger.entity.declared.nopref.2.test
9051 @@@DEnt:
9052 @@@@test:value:
9053 <!DOCTYPE p [
9054 <!ENTITY other "aa">
9055 <!ENTITY % another "aa">
9056 ]>
9057 <p>&entity;</p>
9058 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 4)..(5, 11); }
9059 @@XMLTest:
9060 @@@QName: xp.element.content.ger.entity.declared.nopref.3.test
9061 @@@DEnt:
9062 @@@@test:value:
9063 <?xml version="1.0" standalone="yes"?>
9064 <!DOCTYPE p []>
9065 <p>&entity;</p>
9066 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
9067 @@XMLTest:
9068 @@@QName: xp.element.content.ger.entity.declared.nopref.4.test
9069 @@@DEnt:
9070 @@@@test:value:
9071 <?xml version="1.0" standalone="no"?>
9072 <!DOCTYPE p []>
9073 <p>&entity;</p>
9074 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
9075 @@XMLTest:
9076 @@@QName: xp.element.content.ger.entity.declared.nopref.5.test
9077 @@@DEnt:
9078 @@@@test:value:
9079 <?xml version="1.0" standalone="yes"?>
9080 <!DOCTYPE p [
9081 <!ENTITY other "aa">
9082 <!ENTITY % another "aa">
9083 ]>
9084 <p>&entity;</p>
9085 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
9086 @@XMLTest:
9087 @@@QName: xp.element.content.ger.entity.declared.nopref.6.test
9088 @@@DEnt:
9089 @@@@test:value:
9090 <?xml version="1.0" standalone="no"?>
9091 <!DOCTYPE p [
9092 <!ENTITY other "aa">
9093 <!ENTITY % another "aa">
9094 ]>
9095 <p>&entity;</p>
9096 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
9097 @@XMLTest:
9098 @@@QName: xp.element.content.ger.entity.declared.nopref.-1.test
9099 @@@DEnt:
9100 @@@@test:value:
9101 <!DOCTYPE p [
9102 <!ENTITY entity "value">
9103 ]>
9104 <p>&entity;</p>
9105 @@@test:domTree:
9106 document {
9107 document-type {
9108 general-entity {
9109 node-name: 'entity';
9110 text-content: 'value';
9111 }
9112 }
9113 element {
9114 general-entity-reference {
9115 node-name: 'entity';
9116 is-expanded: true;
9117 text-content: 'value';
9118 }
9119 }
9120 }
9121 @@XMLTest:
9122 @@@QName: xp.element.content.ger.entity.declared.nopref.-2.test
9123 @@@DEnt:
9124 @@@@test:value:
9125 <!DOCTYPE p [
9126 <!ENTITY entity "value">
9127 <!ENTITY another SYSTEM "another">
9128 ]>
9129 <p>&entity;</p>
9130 @@@test:domTree:
9131 document {
9132 document-type {
9133 general-entity {
9134 node-name: 'entity';
9135 text-content: 'value';
9136 }
9137 general-entity {
9138 node-name: 'another';
9139 public-id: null;
9140 system-id: 'another';
9141 }
9142 }
9143 element {
9144 general-entity-reference {
9145 node-name: 'entity';
9146 is-expanded: true;
9147 text-content: 'value';
9148 }
9149 }
9150 }
9151 @@XMLTest:
9152 @@@QName: xp.element.content.ger.entity.declared.standalone.1.test
9153 @@@DEnt:
9154 @@@@test:value:
9155 <?xml version="1.0" standalone="yes"?>
9156 <p>&entity;</p>
9157 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9158 @@XMLTest:
9159 @@@QName: xp.element.content.ger.entity.declared.standalone.2.test
9160 @@@DEnt:
9161 @@@@test:value:
9162 <?xml version="1.0" standalone="yes"?>
9163 <!DOCTYPE p []>
9164 <p>&entity;</p>
9165 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
9166 @@XMLTest:
9167 @@@QName: xp.element.content.ger.entity.declared.standalone.3.test
9168 @@@DEnt:
9169 @@@@test:value:
9170 <?xml version="1.0" standalone="yes"?>
9171 <!DOCTYPE p [
9172 <!ENTITY % para "<!-- -->">
9173 %para;
9174 ]>
9175 <p>&entity;</p>
9176 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
9177 @@XMLTest:
9178 @@@QName: xp.element.content.ger.entity.declared.standalone.-1.test
9179 @@@DEnt:
9180 @@@@test:value:
9181 <?xml version="1.0" standalone="no"?>
9182 <!DOCTYPE p [
9183 <!ENTITY % para "<!-- -->">
9184 %para;
9185 ]>
9186 <p>&entity;</p>
9187 @@@test:domTree:
9188 document {
9189 document-type { }
9190 element {
9191 general-entity-reference {
9192 is-expanded: false;
9193 }
9194 }
9195 }
9196 @@XMLTest:
9197 @@@QName: xp.element.content.ger.entity.declared.standalone.-2.test
9198 @@@DEnt:
9199 @@@@test:value:
9200 <!DOCTYPE p [
9201 <!ENTITY % para "<!-- -->">
9202 %para;
9203 ]>
9204 <p>&entity;</p>
9205 @@@test:domTree:
9206 document {
9207 document-type { }
9208 element {
9209 general-entity-reference {
9210 is-expanded: false;
9211 }
9212 }
9213 }
9214 @@XMLTest:
9215 @@@QName: xp.element.content.ger.entity.declared.standalone.4.test
9216 @@@DEnt:
9217 @@@@test:value:
9218 <?xml version="1.0" standalone="yes"?>
9219 <!DOCTYPE p [
9220 <!ENTITY % para SYSTEM "para">
9221 %para;
9222 ]>
9223 <p>&entity;</p>
9224 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
9225 @@XMLTest:
9226 @@@QName: xp.element.content.ger.entity.declared.standalone.-3.test
9227 @@@DEnt:
9228 @@@@test:value:
9229 <?xml version="1.0" standalone="no"?>
9230 <!DOCTYPE p [
9231 <!ENTITY % para SYSTEM "para">
9232 %para;
9233 ]>
9234 <p>&entity;</p>
9235 @@@test:domTree:
9236 document {
9237 document-type { }
9238 element {
9239 general-entity-reference {
9240 is-expanded: false;
9241 }
9242 }
9243 }
9244 @@XMLTest:
9245 @@@QName: xp.element.content.ger.entity.declared.standalone.-4.test
9246 @@@DEnt:
9247 @@@@test:value:
9248 <!DOCTYPE p [
9249 <!ENTITY % para SYSTEM "para">
9250 %para;
9251 ]>
9252 <p>&entity;</p>
9253 @@@test:domTree:
9254 document {
9255 document-type { }
9256 element {
9257 general-entity-reference {
9258 is-expanded: false;
9259 }
9260 }
9261 }
9262 @@XMLTest:
9263 @@@QName: xp.element.content.ger.entity.declared.standalone.5.test
9264 @@@DEnt:
9265 @@@@test:value:
9266 <?xml version="1.0" standalone="yes"?>
9267 <!DOCTYPE p SYSTEM "dtd">
9268 <p>&entity;</p>
9269 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
9270 @@XMLTest:
9271 @@@QName: xp.element.content.ger.entity.declared.standalone.-5.test
9272 @@@DEnt:
9273 @@@@test:value:
9274 <?xml version="1.0" standalone="no"?>
9275 <!DOCTYPE p SYSTEM "dtd">
9276 <p>&entity;</p>
9277 @@@test:domTree:
9278 document {
9279 document-type { }
9280 element {
9281 general-entity-reference {
9282 is-expanded: false;
9283 }
9284 }
9285 }
9286 @@XMLTest:
9287 @@@QName: xp.element.content.ger.entity.declared.standalone.-6.test
9288 @@@DEnt:
9289 @@@@test:value:
9290 <!DOCTYPE p SYSTEM "dtd">
9291 <p>&entity;</p>
9292 @@@test:domTree:
9293 document {
9294 document-type { }
9295 element {
9296 general-entity-reference {
9297 is-expanded: false;
9298 }
9299 }
9300 }
9301
9302 @@XMLTest:
9303 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.1.test
9304 @@@DEnt:
9305 @@@@test:value:
9306 <!DOCTYPE p [
9307 <!ENTITY c "&entity;">
9308 ]>
9309 <p>&c;</p>
9310 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9311 @@XMLTest:
9312 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.2.test
9313 @@@DEnt:
9314 @@@@test:value:
9315 <!DOCTYPE p [
9316 <!ENTITY other "aa">
9317 <!ENTITY % another "aa">
9318 <!ENTITY c "&entity;">
9319 ]>
9320 <p>&c;</p>
9321 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9322 @@XMLTest:
9323 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.3.test
9324 @@@DEnt:
9325 @@@@test:value:
9326 <?xml version="1.0" standalone="yes"?>
9327 <!DOCTYPE p [
9328 <!ENTITY c "&entity;">
9329 ]>
9330 <p>&c;</p>
9331 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9332 @@XMLTest:
9333 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.4.test
9334 @@@DEnt:
9335 @@@@test:value:
9336 <?xml version="1.0" standalone="no"?>
9337 <!DOCTYPE p [
9338 <!ENTITY c "&entity;">
9339 ]>
9340 <p>&c;</p>
9341 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9342 @@XMLTest:
9343 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.5.test
9344 @@@DEnt:
9345 @@@@test:value:
9346 <?xml version="1.0" standalone="yes"?>
9347 <!DOCTYPE p [
9348 <!ENTITY other "aa">
9349 <!ENTITY % another "aa">
9350 <!ENTITY c "&entity;">
9351 ]>
9352 <p>&c;</p>
9353 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9354 @@XMLTest:
9355 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.6.test
9356 @@@DEnt:
9357 @@@@test:value:
9358 <?xml version="1.0" standalone="no"?>
9359 <!DOCTYPE p [
9360 <!ENTITY other "aa">
9361 <!ENTITY % another "aa">
9362 <!ENTITY c "&entity;">
9363 ]>
9364 <p>&c;</p>
9365 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9366 @@XMLTest:
9367 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.-1.test
9368 @@@DEnt:
9369 @@@@test:value:
9370 <!DOCTYPE p [
9371 <!ENTITY entity "value">
9372 <!ENTITY c "&entity;">
9373 ]>
9374 <p>&c;</p>
9375 @@@test:domTree:
9376 document {
9377 document-type {
9378 general-entity {
9379 node-name: 'entity';
9380 text-content: 'value';
9381 }
9382 general-entity {
9383 node-name: 'c';
9384 general-entity-reference {
9385 node-name: 'entity';
9386 text-content: 'value';
9387 }
9388 }
9389 }
9390 element {
9391 general-entity-reference {
9392 node-name: 'c';
9393 general-entity-reference {
9394 node-name: 'entity';
9395 text-content: 'value';
9396 }
9397 }
9398 }
9399 }
9400 @@XMLTest:
9401 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.-2.test
9402 @@@DEnt:
9403 @@@@test:value:
9404 <!DOCTYPE p [
9405 <!ENTITY entity "value">
9406 <!ENTITY another SYSTEM "another">
9407 <!ENTITY c "&entity;">
9408 ]>
9409 <p>&c;</p>
9410 @@@test:domTree:
9411 document {
9412 document-type {
9413 general-entity {
9414 node-name: 'entity';
9415 text-content: 'value';
9416 }
9417 general-entity {
9418 node-name: 'c';
9419 general-entity-reference {
9420 node-name: 'entity';
9421 is-expanded: true;
9422 text-content: 'value';
9423 }
9424 }
9425 general-entity {
9426 node-name: 'another';
9427 public-id: null;
9428 system-id: 'another';
9429 has-replacement-tree: false;
9430 }
9431 }
9432 element {
9433 general-entity-reference {
9434 node-name: 'c';
9435 is-expanded: true;
9436 general-entity-reference {
9437 node-name: 'entity';
9438 is-expanded: true;
9439 text-content: 'value';
9440 }
9441 }
9442 }
9443 }
9444 @@XMLTest:
9445 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.2.test
9446 @@@DEnt:
9447 @@@@test:value:
9448 <?xml version="1.0" standalone="yes"?>
9449 <!DOCTYPE p [
9450 <!ENTITY c "&entity;">
9451 ]>
9452 <p>&c;</p>
9453 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9454 @@XMLTest:
9455 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.3.test
9456 @@@DEnt:
9457 @@@@test:value:
9458 <?xml version="1.0" standalone="yes"?>
9459 <!DOCTYPE p [
9460 <!ENTITY % para "<!-- -->">
9461 %para;
9462 <!ENTITY c "&entity;">
9463 ]>
9464 <p>&c;</p>
9465 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9466 @@XMLTest:
9467 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-1.test
9468 @@@DEnt:
9469 @@@@test:value:
9470 <?xml version="1.0" standalone="no"?>
9471 <!DOCTYPE p [
9472 <!ENTITY c "&entity;">
9473 <!ENTITY % para "<!-- -->">
9474 %para;
9475 ]>
9476 <p>&c;</p>
9477 @@@test:domTree:
9478 document {
9479 document-type {
9480 general-entity {
9481 node-name: 'c';
9482 general-entity-reference {
9483 node-name: 'entity';
9484 is-expanded: false;
9485 }
9486 }
9487 }
9488 element {
9489 general-entity-reference {
9490 node-name: 'c';
9491 general-entity-reference {
9492 node-name: 'entity';
9493 is-expanded: false;
9494 }
9495 }
9496 }
9497 }
9498 @@XMLTest:
9499 @@@QName:
9500 xp.reptxt.element.content.ger.entity.declared.standalone.-1.2.test
9501 @@@DEnt:
9502 @@@@test:value:
9503 <?xml version="1.0" standalone="no"?>
9504 <!DOCTYPE p [
9505 <!ENTITY % para "<!-- -->">
9506 %para;
9507 <!ENTITY c "&entity;">
9508 ]>
9509 <p>&c;</p>
9510 @@@test:domTree:
9511 document {
9512 document-type { }
9513 element {
9514 general-entity-reference {
9515 node-name: 'c';
9516 is-expanded: false;
9517 }
9518 }
9519 }
9520 @@XMLTest:
9521 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-2.test
9522 @@@DEnt:
9523 @@@@test:value:
9524 <!DOCTYPE p [
9525 <!ENTITY c "&entity;">
9526 <!ENTITY % para "<!-- -->">
9527 %para;
9528 ]>
9529 <p>&c;</p>
9530 @@@test:domTree:
9531 document {
9532 document-type { }
9533 element {
9534 general-entity-reference {
9535 node-name: 'c';
9536 is-expanded: true;
9537 general-entity-reference {
9538 node-name: 'entity';
9539 is-expanded: false;
9540 }
9541 }
9542 }
9543 }
9544 @@XMLTest:
9545 @@@QName:
9546 xp.reptxt.element.content.ger.entity.declared.standalone.-2.2.test
9547 @@@DEnt:
9548 @@@@test:value:
9549 <!DOCTYPE p [
9550 <!ENTITY % para "<!-- -->">
9551 %para;
9552 <!ENTITY c "&entity;">
9553 ]>
9554 <p>&c;</p>
9555 @@@test:domTree:
9556 document {
9557 document-type { }
9558 element {
9559 general-entity-reference {
9560 node-name: 'c';
9561 is-expanded: false;
9562 }
9563 }
9564 }
9565 @@XMLTest:
9566 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.4.test
9567 @@@DEnt:
9568 @@@@test:value:
9569 <?xml version="1.0" standalone="yes"?>
9570 <!DOCTYPE p [
9571 <!ENTITY % para SYSTEM "para">
9572 %para;
9573 <!ENTITY c "&entity;">
9574 ]>
9575 <p>&c;</p>
9576 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9577 @@XMLTest:
9578 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-3.test
9579 @@@DEnt:
9580 @@@@test:value:
9581 <?xml version="1.0" standalone="no"?>
9582 <!DOCTYPE p [
9583 <!ENTITY c "&entity;">
9584 <!ENTITY % para SYSTEM "para">
9585 %para;
9586 ]>
9587 <p>&c;</p>
9588 @@@test:domTree:
9589 document {
9590 document-type { }
9591 element {
9592 general-entity-reference {
9593 node-name: 'c';
9594 is-expanded: true;
9595 general-entity-reference {
9596 node-name: 'entity';
9597 is-expanded: false;
9598 }
9599 }
9600 }
9601 }
9602 @@XMLTest:
9603 @@@QName:
9604 xp.reptxt.element.content.ger.entity.declared.standalone.-3.2.test
9605 @@@DEnt:
9606 @@@@test:value:
9607 <?xml version="1.0" standalone="no"?>
9608 <!DOCTYPE p [
9609 <!ENTITY % para SYSTEM "para">
9610 %para;
9611 <!ENTITY c "&entity;">
9612 ]>
9613 <p>&c;</p>
9614 @@@test:domTree:
9615 document {
9616 document-type { }
9617 element {
9618 general-entity-reference {
9619 node-name: 'c';
9620 is-expanded: false;
9621 }
9622 }
9623 }
9624 @@XMLTest:
9625 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-4.test
9626 @@@DEnt:
9627 @@@@test:value:
9628 <!DOCTYPE p [
9629 <!ENTITY c "&entity;">
9630 <!ENTITY % para SYSTEM "para">
9631 %para;
9632 ]>
9633 <p>&c;</p>
9634 @@@test:domTree:
9635 document {
9636 document-type { }
9637 element {
9638 general-entity-reference {
9639 node-name: 'c';
9640 is-expanded: true;
9641 general-entity-reference {
9642 node-name: 'entity';
9643 is-expanded: false;
9644 }
9645 }
9646 }
9647 }
9648 @@XMLTest:
9649 @@@QName:
9650 xp.reptxt.element.content.ger.entity.declared.standalone.-4.2.test
9651 @@@DEnt:
9652 @@@@test:value:
9653 <!DOCTYPE p [
9654 <!ENTITY % para SYSTEM "para">
9655 %para;
9656 <!ENTITY c "&entity;">
9657 ]>
9658 <p>&c;</p>
9659 @@@test:domTree:
9660 document {
9661 document-type { }
9662 element {
9663 general-entity-reference {
9664 node-name: 'c';
9665 is-expanded: false;
9666 }
9667 }
9668 }
9669 @@XMLTest:
9670 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.5.test
9671 @@@DEnt:
9672 @@@@test:value:
9673 <?xml version="1.0" standalone="yes"?>
9674 <!DOCTYPE p SYSTEM "dtd" [
9675 <!ENTITY c "&entity;">
9676 ]>
9677 <p>&c;</p>
9678 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
9679 @@XMLTest:
9680 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-5.test
9681 @@@DEnt:
9682 @@@@test:value:
9683 <?xml version="1.0" standalone="no"?>
9684 <!DOCTYPE p SYSTEM "dtd" [
9685 <!ENTITY c "&entity;">
9686 ]>
9687 <p>&c;</p>
9688 @@@test:domTree:
9689 document {
9690 document-type { }
9691 element {
9692 general-entity-reference {
9693 node-name: 'c';
9694 is-expanded: true;
9695 general-entity-reference {
9696 node-name: 'entity';
9697 is-expanded: false;
9698 }
9699 }
9700 }
9701 }
9702 @@XMLTest:
9703 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-6.test
9704 @@@DEnt:
9705 @@@@test:value:
9706 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">]>
9707 <p>&c;</p>
9708 @@@test:domTree:
9709 document {
9710 document-type { }
9711 element {
9712 general-entity-reference {
9713 node-name: 'c';
9714 is-expanded: true;
9715 general-entity-reference {
9716 node-name: 'entity';
9717 is-expanded: false;
9718 }
9719 }
9720 }
9721 }
9722
9723 @@XMLTest:
9724 @@@QName: xp.attval.ger.entity.declared.nodtd.1.test
9725 @@@DEnt:
9726 @@@@test:value:
9727 <p a="&entity;"/>
9728 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 7)..(1, 14); }
9729 @@XMLTest:
9730 @@@QName: xp.attval.ger.entity.declared.nodtd.2.test
9731 @@@DEnt:
9732 @@@@test:value:
9733 <?xml version="1.0" standalone="yes"?>
9734 <p a="&entity;"/>
9735 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
9736 @@XMLTest:
9737 @@@QName: xp.attval.ger.entity.declared.nodtd.3.test
9738 @@@DEnt:
9739 @@@@test:value:
9740 <?xml version="1.0" standalone="no"?>
9741 <p a="&entity;"/>
9742 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
9743 @@XMLTest:
9744 @@@QName: xp.attval.ger.entity.declared.nodtd.-1.test
9745 @@@DEnt:
9746 @@@@test:value:
9747 <p a="&lt;&gt;&amp;&quot;&apos;"/>
9748 @@@test:domTree:
9749 document {
9750 element {
9751 attribute {
9752 node-name: 'a';
9753 text-content: '<>&"' U+0027;
9754 }
9755 }
9756 }
9757 @@XMLTest:
9758 @@@QName: xp.attval.ger.entity.declared.nopref.1.test
9759 @@@DEnt:
9760 @@@@test:value:
9761 <!DOCTYPE p []>
9762 <p a="&entity;"/>
9763 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
9764 @@XMLTest:
9765 @@@QName: xp.attval.ger.entity.declared.nopref.2.test
9766 @@@DEnt:
9767 @@@@test:value:
9768 <!DOCTYPE p [
9769 <!ENTITY other "aa">
9770 <!ENTITY % another "aa">
9771 ]>
9772 <p a="&entity;"/>
9773 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 7)..(5, 14); }
9774 @@XMLTest:
9775 @@@QName: xp.attval.ger.entity.declared.nopref.3.test
9776 @@@DEnt:
9777 @@@@test:value:
9778 <?xml version="1.0" standalone="yes"?>
9779 <!DOCTYPE p []>
9780 <p a="&entity;"/>
9781 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
9782 @@XMLTest:
9783 @@@QName: xp.attval.ger.entity.declared.nopref.4.test
9784 @@@DEnt:
9785 @@@@test:value:
9786 <?xml version="1.0" standalone="no"?>
9787 <!DOCTYPE p []>
9788 <p a="&entity;"/>
9789 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
9790 @@XMLTest:
9791 @@@QName: xp.attval.ger.entity.declared.nopref.5.test
9792 @@@DEnt:
9793 @@@@test:value:
9794 <?xml version="1.0" standalone="yes"?>
9795 <!DOCTYPE p [
9796 <!ENTITY other "aa">
9797 <!ENTITY % another "aa">
9798 ]>
9799 <p a="&entity;"/>
9800 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
9801 @@XMLTest:
9802 @@@QName: xp.attval.ger.entity.declared.nopref.6.test
9803 @@@DEnt:
9804 @@@@test:value:
9805 <?xml version="1.0" standalone="no"?>
9806 <!DOCTYPE p [
9807 <!ENTITY other "aa">
9808 <!ENTITY % another "aa">
9809 ]>
9810 <p a="&entity;"/>
9811 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
9812 @@XMLTest:
9813 @@@QName: xp.attval.ger.entity.declared.nopref.-1.test
9814 @@@DEnt:
9815 @@@@test:value:
9816 <!DOCTYPE p [
9817 <!ENTITY entity "value">
9818 ]>
9819 <p a="&entity;"/>
9820 @@@test:domTree:
9821 document {
9822 document-type {
9823 general-entity {
9824 node-name: 'entity';
9825 text-content: 'value';
9826 }
9827 }
9828 element {
9829 attribute {
9830 node-name: 'a';
9831 general-entity-reference {
9832 node-name: 'entity';
9833 is-expanded: true;
9834 text-content: 'value';
9835 }
9836 }
9837 }
9838 }
9839 @@XMLTest:
9840 @@@QName: xp.attval.ger.entity.declared.nopref.-2.test
9841 @@@DEnt:
9842 @@@@test:value:
9843 <!DOCTYPE p [
9844 <!ENTITY entity "value">
9845 <!ENTITY another SYSTEM "another">
9846 ]>
9847 <p a="&entity;"/>
9848 @@@test:domTree:
9849 document {
9850 document-type {
9851 general-entity {
9852 node-name: 'entity';
9853 text-content: 'value';
9854 has-replacement-tree: true;
9855 }
9856 general-entity {
9857 node-name: 'another';
9858 public-id: null;
9859 system-id: 'another';
9860 has-replacement-tree: false;
9861 }
9862 }
9863 element {
9864 attribute {
9865 node-name: 'a';
9866 general-entity-reference {
9867 node-name: 'entity';
9868 is-expanded: true;
9869 text-content: 'value';
9870 }
9871 }
9872 }
9873 }
9874 @@XMLTest:
9875 @@@QName: xp.attval.ger.entity.declared.standalone.1.test
9876 @@@DEnt:
9877 @@@@test:value:
9878 <?xml version="1.0" standalone="yes"?>
9879 <p a="&entity;"/>
9880 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
9881 @@XMLTest:
9882 @@@QName: xp.attval.ger.entity.declared.standalone.2.test
9883 @@@DEnt:
9884 @@@@test:value:
9885 <?xml version="1.0" standalone="yes"?>
9886 <!DOCTYPE p []>
9887 <p a="&entity;"/>
9888 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
9889 @@XMLTest:
9890 @@@QName: xp.attval.ger.entity.declared.standalone.3.test
9891 @@@DEnt:
9892 @@@@test:value:
9893 <?xml version="1.0" standalone="yes"?>
9894 <!DOCTYPE p [
9895 <!ENTITY % para "<!-- -->">
9896 %para;
9897 ]>
9898 <p a="&entity;"/>
9899 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
9900 @@XMLTest:
9901 @@@QName: xp.attval.ger.entity.declared.standalone.-1.test
9902 @@@DEnt:
9903 @@@@test:value:
9904 <?xml version="1.0" standalone="no"?>
9905 <!DOCTYPE p [
9906 <!ENTITY % para "<!-- -->">
9907 %para;
9908 ]>
9909 <p a="&entity;"/>
9910 @@@test:domTree:
9911 document {
9912 document-type { }
9913 element {
9914 attribute {
9915 node-name: 'a';
9916 general-entity-reference {
9917 is-expanded: false;
9918 }
9919 }
9920 }
9921 }
9922 @@XMLTest:
9923 @@@QName: xp.attval.ger.entity.declared.standalone.-2.test
9924 @@@DEnt:
9925 @@@@test:value:
9926 <!DOCTYPE p [
9927 <!ENTITY % para "<!-- -->">
9928 %para;
9929 ]>
9930 <p a="&entity;"/>
9931 @@@test:domTree:
9932 document {
9933 document-type { }
9934 element {
9935 attribute {
9936 node-name: 'a';
9937 general-entity-reference {
9938 is-expanded: false;
9939 }
9940 }
9941 }
9942 }
9943 @@XMLTest:
9944 @@@QName: xp.attval.ger.entity.declared.standalone.4.test
9945 @@@DEnt:
9946 @@@@test:value:
9947 <?xml version="1.0" standalone="yes"?>
9948 <!DOCTYPE p [
9949 <!ENTITY % para SYSTEM "para">
9950 %para;
9951 ]>
9952 <p a="&entity;"/>
9953 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
9954 @@XMLTest:
9955 @@@QName: xp.attval.ger.entity.declared.standalone.-3.test
9956 @@@DEnt:
9957 @@@@test:value:
9958 <?xml version="1.0" standalone="no"?>
9959 <!DOCTYPE p [
9960 <!ENTITY % para SYSTEM "para">
9961 %para;
9962 ]>
9963 <p a="&entity;"/>
9964 @@@test:domTree:
9965 document {
9966 document-type { }
9967 element {
9968 attribute {
9969 node-name: 'a';
9970 general-entity-reference {
9971 is-expanded: false;
9972 }
9973 }
9974 }
9975 }
9976 @@XMLTest:
9977 @@@QName: xp.attval.ger.entity.declared.standalone.-4.test
9978 @@@DEnt:
9979 @@@@test:value:
9980 <!DOCTYPE p [
9981 <!ENTITY % para SYSTEM "para">
9982 %para;
9983 ]>
9984 <p a="&entity;"/>
9985 @@@test:domTree:
9986 document {
9987 document-type { }
9988 element {
9989 attribute {
9990 node-name: 'a';
9991 general-entity-reference {
9992 is-expanded: false;
9993 }
9994 }
9995 }
9996 }
9997 @@XMLTest:
9998 @@@QName: xp.attval.ger.entity.declared.standalone.5.test
9999 @@@DEnt:
10000 @@@@test:value:
10001 <?xml version="1.0" standalone="yes"?>
10002 <!DOCTYPE p SYSTEM "dtd">
10003 <p a="&entity;"/>
10004 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10005 @@XMLTest:
10006 @@@QName: xp.attval.ger.entity.declared.standalone.-5.test
10007 @@@DEnt:
10008 @@@@test:value:
10009 <?xml version="1.0" standalone="no"?>
10010 <!DOCTYPE p SYSTEM "dtd">
10011 <p a="&entity;"/>
10012 @@@test:domTree:
10013 document {
10014 document-type { }
10015 element {
10016 attribute {
10017 node-name: 'a';
10018 general-entity-reference {
10019 is-expanded: false;
10020 }
10021 }
10022 }
10023 }
10024 @@XMLTest:
10025 @@@QName: xp.attval.ger.entity.declared.standalone.-6.test
10026 @@@DEnt:
10027 @@@@test:value:
10028 <!DOCTYPE p SYSTEM "dtd">
10029 <p a="&entity;"/>
10030 @@@test:domTree:
10031 document {
10032 document-type { }
10033 element {
10034 attribute {
10035 node-name: 'a';
10036 general-entity-reference {
10037 is-expanded: false;
10038 }
10039 }
10040 }
10041 }
10042
10043 @@XMLTest:
10044 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.1.test
10045 @@@DEnt:
10046 @@@@test:value:
10047 <!DOCTYPE p [
10048 <!ENTITY c "&entity;">
10049 ]>
10050 <p a="&c;"/>
10051 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10052 @@XMLTest:
10053 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.2.test
10054 @@@DEnt:
10055 @@@@test:value:
10056 <!DOCTYPE p [
10057 <!ENTITY other "aa">
10058 <!ENTITY % another "aa">
10059 <!ENTITY c "&entity;">
10060 ]>
10061 <p a="&c;"/>
10062 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10063 @@XMLTest:
10064 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.3.test
10065 @@@DEnt:
10066 @@@@test:value:
10067 <?xml version="1.0" standalone="yes"?>
10068 <!DOCTYPE p [
10069 <!ENTITY c "&entity;">
10070 ]>
10071 <p a="&c;"/>
10072 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10073 @@XMLTest:
10074 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.4.test
10075 @@@DEnt:
10076 @@@@test:value:
10077 <?xml version="1.0" standalone="no"?>
10078 <!DOCTYPE p [
10079 <!ENTITY c "&entity;">
10080 ]>
10081 <p a="&c;"/>
10082 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10083 @@XMLTest:
10084 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.5.test
10085 @@@DEnt:
10086 @@@@test:value:
10087 <?xml version="1.0" standalone="yes"?>
10088 <!DOCTYPE p [
10089 <!ENTITY other "aa">
10090 <!ENTITY % another "aa">
10091 <!ENTITY c "&entity;">
10092 ]>
10093 <p a="&c;"/>
10094 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10095 @@XMLTest:
10096 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.6.test
10097 @@@DEnt:
10098 @@@@test:value:
10099 <?xml version="1.0" standalone="no"?>
10100 <!DOCTYPE p [
10101 <!ENTITY other "aa">
10102 <!ENTITY % another "aa">
10103 <!ENTITY c "&entity;">
10104 ]>
10105 <p a="&c;"/>
10106 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10107 @@XMLTest:
10108 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.-1.test
10109 @@@DEnt:
10110 @@@@test:value:
10111 <!DOCTYPE p [
10112 <!ENTITY entity "value">
10113 <!ENTITY c "&entity;">
10114 ]>
10115 <p a="&c;"/>
10116 @@@test:domTree:
10117 document {
10118 document-type {
10119 general-entity {
10120 node-name: 'entity';
10121 text-content: 'value';
10122 }
10123 general-entity {
10124 node-name: 'c';
10125 general-entity-reference {
10126 node-name: 'entity';
10127 text-content: 'value';
10128 }
10129 }
10130 }
10131 element {
10132 attribute {
10133 node-name: 'a';
10134 general-entity-reference {
10135 node-name: 'c';
10136 general-entity-reference {
10137 node-name: 'entity';
10138 text-content: 'value';
10139 }
10140 }
10141 }
10142 }
10143 }
10144 @@XMLTest:
10145 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.-2.test
10146 @@@DEnt:
10147 @@@@test:value:
10148 <!DOCTYPE p [
10149 <!ENTITY entity "value">
10150 <!ENTITY another SYSTEM "another">
10151 <!ENTITY c "&entity;">
10152 ]>
10153 <p a="&c;"/>
10154 @@@test:domTree:
10155 document {
10156 document-type {
10157 general-entity {
10158 node-name: 'entity';
10159 text-content: 'value';
10160 }
10161 general-entity {
10162 node-name: 'c';
10163 general-entity-reference {
10164 node-name: 'entity';
10165 text-content: 'value';
10166 }
10167 }
10168 general-entity {
10169 node-name: 'another';
10170 public-id: null;
10171 system-id: 'another';
10172 has-replacement-tree: false;
10173 }
10174 }
10175 element {
10176 attribute {
10177 node-name: 'a';
10178 general-entity-reference {
10179 node-name: 'c';
10180 general-entity-reference {
10181 node-name: 'entity';
10182 text-content: 'value';
10183 }
10184 }
10185 }
10186 }
10187 }
10188 @@XMLTest:
10189 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.2.test
10190 @@@DEnt:
10191 @@@@test:value:
10192 <?xml version="1.0" standalone="yes"?>
10193 <!DOCTYPE p [
10194 <!ENTITY c "&entity;">
10195 ]>
10196 <p a="&c;"/>
10197 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10198 @@XMLTest:
10199 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.3.test
10200 @@@DEnt:
10201 @@@@test:value:
10202 <?xml version="1.0" standalone="yes"?>
10203 <!DOCTYPE p [
10204 <!ENTITY % para "<!-- -->">
10205 %para;
10206 <!ENTITY c "&entity;">
10207 ]>
10208 <p a="&c;"/>
10209 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10210 @@XMLTest:
10211 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-1.test
10212 @@@DEnt:
10213 @@@@test:value:
10214 <?xml version="1.0" standalone="no"?>
10215 <!DOCTYPE p [
10216 <!ENTITY c "&entity;">
10217 <!ENTITY % para "<!-- -->">
10218 %para;
10219 ]>
10220 <p a="&c;"/>
10221 @@@test:domTree:
10222 document {
10223 document-type {
10224 general-entity {
10225 node-name: 'c';
10226 general-entity-reference {
10227 node-name: 'entity';
10228 is-expanded: false;
10229 }
10230 }
10231 }
10232 element {
10233 attribute {
10234 node-name: 'a';
10235 general-entity-reference {
10236 node-name: 'c';
10237 general-entity-reference {
10238 node-name: 'entity';
10239 is-expanded: false;
10240 }
10241 }
10242 }
10243 }
10244 }
10245 @@XMLTest:
10246 @@@QName:
10247 xp.reptxt.attval.ger.entity.declared.standalone.-1.2.test
10248 @@@DEnt:
10249 @@@@test:value:
10250 <?xml version="1.0" standalone="no"?>
10251 <!DOCTYPE p [
10252 <!ENTITY % para "<!-- -->">
10253 %para;
10254 <!ENTITY c "&entity;">
10255 ]>
10256 <p a="&c;"/>
10257 @@@test:domTree:
10258 document {
10259 document-type { }
10260 element {
10261 attribute {
10262 node-name: 'a';
10263 general-entity-reference {
10264 node-name: 'c';
10265 is-expanded: false;
10266 }
10267 }
10268 }
10269 }
10270 @@XMLTest:
10271 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-2.test
10272 @@@DEnt:
10273 @@@@test:value:
10274 <!DOCTYPE p [
10275 <!ENTITY c "&entity;">
10276 <!ENTITY % para "<!-- -->">
10277 %para;
10278 ]>
10279 <p a="&c;"/>
10280 @@@test:domTree:
10281 document {
10282 document-type { }
10283 element {
10284 attribute {
10285 node-name: 'a';
10286 general-entity-reference {
10287 node-name: 'c';
10288 is-expanded: true;
10289 general-entity-reference {
10290 node-name: 'entity';
10291 is-expanded: false;
10292 }
10293 }
10294 }
10295 }
10296 }
10297 @@XMLTest:
10298 @@@QName:
10299 xp.reptxt.attval.ger.entity.declared.standalone.-2.2.test
10300 @@@DEnt:
10301 @@@@test:value:
10302 <!DOCTYPE p [
10303 <!ENTITY % para "<!-- -->">
10304 %para;
10305 <!ENTITY c "&entity;">
10306 ]>
10307 <p a="&c;"/>
10308 @@@test:domTree:
10309 document {
10310 document-type { }
10311 element {
10312 attribute {
10313 node-name: 'a';
10314 general-entity-reference {
10315 node-name: 'c';
10316 is-expanded: false;
10317 }
10318 }
10319 }
10320 }
10321 @@XMLTest:
10322 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.4.test
10323 @@@DEnt:
10324 @@@@test:value:
10325 <?xml version="1.0" standalone="yes"?>
10326 <!DOCTYPE p [
10327 <!ENTITY % para SYSTEM "para">
10328 %para;
10329 <!ENTITY c "&entity;">
10330 ]>
10331 <p a="&c;"/>
10332 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10333 @@XMLTest:
10334 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-3.test
10335 @@@DEnt:
10336 @@@@test:value:
10337 <?xml version="1.0" standalone="no"?>
10338 <!DOCTYPE p [
10339 <!ENTITY c "&entity;">
10340 <!ENTITY % para SYSTEM "para">
10341 %para;
10342 ]>
10343 <p a="&c;"/>
10344 @@@test:domTree:
10345 document {
10346 document-type { }
10347 element {
10348 attribute {
10349 node-name: 'a';
10350 general-entity-reference {
10351 node-name: 'c';
10352 is-expanded: true;
10353 general-entity-reference {
10354 node-name: 'entity';
10355 is-expanded: false;
10356 }
10357 }
10358 }
10359 }
10360 }
10361 @@XMLTest:
10362 @@@QName:
10363 xp.reptxt.attval.ger.entity.declared.standalone.-3.2.test
10364 @@@DEnt:
10365 @@@@test:value:
10366 <?xml version="1.0" standalone="no"?>
10367 <!DOCTYPE p [
10368 <!ENTITY % para SYSTEM "para">
10369 %para;
10370 <!ENTITY c "&entity;">
10371 ]>
10372 <p a="&c;"/>
10373 @@@test:domTree:
10374 document {
10375 document-type { }
10376 element {
10377 attribute {
10378 node-name: 'a';
10379 general-entity-reference {
10380 node-name: 'c';
10381 is-expanded: false;
10382 }
10383 }
10384 }
10385 }
10386 @@XMLTest:
10387 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-4.test
10388 @@@DEnt:
10389 @@@@test:value:
10390 <!DOCTYPE p [
10391 <!ENTITY c "&entity;">
10392 <!ENTITY % para SYSTEM "para">
10393 %para;
10394 ]>
10395 <p a="&c;"/>
10396 @@@test:domTree:
10397 document {
10398 document-type { }
10399 element {
10400 attribute {
10401 node-name: 'a';
10402 general-entity-reference {
10403 node-name: 'c';
10404 is-expanded: true;
10405 general-entity-reference {
10406 node-name: 'entity';
10407 is-expanded: false;
10408 }
10409 }
10410 }
10411 }
10412 }
10413 @@XMLTest:
10414 @@@QName:
10415 xp.reptxt.attval.ger.entity.declared.standalone.-4.2.test
10416 @@@DEnt:
10417 @@@@test:value:
10418 <!DOCTYPE p [
10419 <!ENTITY % para SYSTEM "para">
10420 %para;
10421 <!ENTITY c "&entity;">
10422 ]>
10423 <p a="&c;"/>
10424 @@@test:domTree:
10425 document {
10426 document-type { }
10427 element {
10428 attribute {
10429 node-name: 'a';
10430 general-entity-reference {
10431 node-name: 'c';
10432 is-expanded: false;
10433 }
10434 }
10435 }
10436 }
10437 @@XMLTest:
10438 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.5.test
10439 @@@DEnt:
10440 @@@@test:value:
10441 <?xml version="1.0" standalone="yes"?>
10442 <!DOCTYPE p SYSTEM "dtd" [
10443 <!ENTITY c "&entity;">
10444 ]>
10445 <p a="&c;"/>
10446 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10447 @@XMLTest:
10448 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-5.test
10449 @@@DEnt:
10450 @@@@test:value:
10451 <?xml version="1.0" standalone="no"?>
10452 <!DOCTYPE p SYSTEM "dtd" [
10453 <!ENTITY c "&entity;">
10454 ]>
10455 <p a="&c;"/>
10456 @@@test:domTree:
10457 document {
10458 document-type { }
10459 element {
10460 attribute {
10461 node-name: 'a';
10462 general-entity-reference {
10463 node-name: 'c';
10464 is-expanded: true;
10465 general-entity-reference {
10466 node-name: 'entity';
10467 is-expanded: false;
10468 }
10469 }
10470 }
10471 }
10472 }
10473 @@XMLTest:
10474 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-6.test
10475 @@@DEnt:
10476 @@@@test:value:
10477 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">]>
10478 <p a="&c;"/>
10479 @@@test:domTree:
10480 document {
10481 document-type { }
10482 element {
10483 attribute {
10484 node-name: 'a';
10485 general-entity-reference {
10486 node-name: 'c';
10487 is-expanded: true;
10488 general-entity-reference {
10489 node-name: 'entity';
10490 is-expanded: false;
10491 }
10492 }
10493 }
10494 }
10495 }
10496
10497 @@XMLTest:
10498 @@@QName: xp.attlist.dup.entity.declared.1.test
10499 @@@DEnt:
10500 @@@@test:value:
10501 <!DOCTYPE p [
10502 <!ATTLIST p a CDATA "no-entity">
10503 <!ATTLIST p a CDATA "&entity;">
10504 ]>
10505 <p/>
10506 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 21)..(3, 29); }
10507 @@XMLTest:
10508 @@@QName: xp.attlist.dup.entity.declared.2.test
10509 @@@DEnt:
10510 @@@@test:value:
10511 <!DOCTYPE p [
10512 <!ATTLIST p a CDATA "no-entity"
10513 a CDATA "&entity;">
10514 ]>
10515 <p/>
10516 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 21)..(3, 29); }
10517 @@XMLTest:
10518 @@@QName: xp.attlist.unused.entity.declared.1.test
10519 @@@DEnt:
10520 @@@@test:value:
10521 <!DOCTYPE p [
10522 <!ATTLIST q a CDATA "&entity;">
10523 ]>
10524 <p/>
10525 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 21)..(2, 29); }
10526 @@XMLTest:
10527 @@@QName: xp.attlist.unused.entity.declared.2.test
10528 @@@DEnt:
10529 @@@@test:value:
10530 <!DOCTYPE p [
10531 <!ATTLIST p a CDATA "&entity;">
10532 ]>
10533 <p a="bb"/>
10534 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 21)..(2, 29); }
10535
10536 @@XMLTest:
10537 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.1.test
10538 @@@DEnt:
10539 @@@@test:value:
10540 <!DOCTYPE p [
10541 <!ENTITY c "&entity;">
10542 <!ATTLIST p a CDATA "&c;">
10543 ]>
10544 <p/>
10545 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10546 @@XMLTest:
10547 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.2.test
10548 @@@DEnt:
10549 @@@@test:value:
10550 <!DOCTYPE p [
10551 <!ENTITY other "aa">
10552 <!ENTITY % another "aa">
10553 <!ENTITY c "&entity;">
10554 <!ATTLIST p a CDATA "&c;">
10555 ]>
10556 <p/>
10557 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10558 @@XMLTest:
10559 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.3.test
10560 @@@DEnt:
10561 @@@@test:value:
10562 <?xml version="1.0" standalone="yes"?>
10563 <!DOCTYPE p [
10564 <!ENTITY c "&entity;">
10565 <!ATTLIST p a CDATA "&c;">
10566 ]>
10567 <p/>
10568 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10569 @@XMLTest:
10570 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.4.test
10571 @@@DEnt:
10572 @@@@test:value:
10573 <?xml version="1.0" standalone="no"?>
10574 <!DOCTYPE p [
10575 <!ENTITY c "&entity;">
10576 <!ATTLIST p a CDATA "&c;">
10577 ]>
10578 <p/>
10579 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10580 @@XMLTest:
10581 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.5.test
10582 @@@DEnt:
10583 @@@@test:value:
10584 <?xml version="1.0" standalone="yes"?>
10585 <!DOCTYPE p [
10586 <!ENTITY other "aa">
10587 <!ENTITY % another "aa">
10588 <!ENTITY c "&entity;">
10589 <!ATTLIST p a CDATA "&c;">
10590 ]>
10591 <p/>
10592 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10593 @@XMLTest:
10594 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.6.test
10595 @@@DEnt:
10596 @@@@test:value:
10597 <?xml version="1.0" standalone="no"?>
10598 <!DOCTYPE p [
10599 <!ENTITY other "aa">
10600 <!ENTITY % another "aa">
10601 <!ENTITY c "&entity;">
10602 <!ATTLIST p a CDATA "&c;">
10603 ]>
10604 <p/>
10605 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10606 @@XMLTest:
10607 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.-1.test
10608 @@@DEnt:
10609 @@@@test:value:
10610 <!DOCTYPE p [
10611 <!ENTITY entity "value">
10612 <!ENTITY c "&entity;">
10613 <!ATTLIST p a CDATA "&c;">
10614 ]>
10615 <p/>
10616 @@@test:domTree:
10617 document {
10618 document-type {
10619 general-entity {
10620 node-name: 'entity';
10621 text-content: 'value';
10622 }
10623 general-entity {
10624 node-name: 'c';
10625 general-entity-reference {
10626 node-name: 'entity';
10627 is-expanded: true;
10628 text-content: 'value';
10629 }
10630 }
10631 element-type-definition {
10632 node-name: 'p';
10633 attribute-definition {
10634 node-name: 'a';
10635 general-entity-reference {
10636 node-name: 'c';
10637 is-expanded: true;
10638 general-entity-reference {
10639 node-name: 'entity';
10640 is-expanded: true;
10641 text-content: 'value';
10642 }
10643 }
10644 }
10645 }
10646 }
10647 element {
10648 attribute {
10649 node-name: 'a';
10650 specified: false;
10651 general-entity-reference {
10652 node-name: 'c';
10653 general-entity-reference {
10654 node-name: 'entity';
10655 text-content: 'value';
10656 }
10657 }
10658 }
10659 }
10660 }
10661 @@XMLTest:
10662 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.-2.test
10663 @@@DEnt:
10664 @@@@test:value:
10665 <!DOCTYPE p [
10666 <!ENTITY entity "value">
10667 <!ENTITY another SYSTEM "another">
10668 <!ENTITY c "&entity;">
10669 <!ATTLIST p a CDATA "&c;">
10670 ]>
10671 <p/>
10672 @@@test:domTree:
10673 document {
10674 document-type {
10675 general-entity {
10676 node-name: 'entity';
10677 text-content: 'value';
10678 }
10679 general-entity {
10680 node-name: 'c';
10681 general-entity-reference {
10682 node-name: 'entity';
10683 text-content: 'value';
10684 }
10685 }
10686 general-entity {
10687 node-name: 'another';
10688 public-id: null;
10689 system-id: 'another';
10690 has-replacement-tree: false;
10691 }
10692 element-type-definition {
10693 node-name: 'p';
10694 attribute-definition {
10695 node-name: 'a';
10696 general-entity-reference {
10697 node-name: 'c';
10698 is-expanded: true;
10699 general-entity-reference {
10700 node-name: 'entity';
10701 is-expanded: true;
10702 text-content: 'value';
10703 }
10704 }
10705 }
10706 }
10707 }
10708 element {
10709 attribute {
10710 node-name: 'a';
10711 specified: false;
10712 general-entity-reference {
10713 node-name: 'c';
10714 general-entity-reference {
10715 node-name: 'entity';
10716 text-content: 'value';
10717 }
10718 }
10719 }
10720 }
10721 }
10722 @@XMLTest:
10723 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.2.test
10724 @@@DEnt:
10725 @@@@test:value:
10726 <?xml version="1.0" standalone="yes"?>
10727 <!DOCTYPE p [
10728 <!ENTITY c "&entity;">
10729 <!ATTLIST p a CDATA "&c;">
10730 ]>
10731 <p/>
10732 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10733 @@XMLTest:
10734 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.3.test
10735 @@@DEnt:
10736 @@@@test:value:
10737 <?xml version="1.0" standalone="yes"?>
10738 <!DOCTYPE p [
10739 <!ENTITY % para "<!-- -->">
10740 %para;
10741 <!ENTITY c "&entity;">
10742 <!ATTLIST p a CDATA "&c;">
10743 ]>
10744 <p/>
10745 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10746 @@XMLTest:
10747 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-1.test
10748 @@@DEnt:
10749 @@@@test:value:
10750 <?xml version="1.0" standalone="no"?>
10751 <!DOCTYPE p [
10752 <!ENTITY c "&entity;">
10753 <!ATTLIST p a CDATA "&c;">
10754 <!ENTITY % para "<!-- -->">
10755 %para;
10756 ]>
10757 <p/>
10758 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10759 @@XMLTest:
10760 @@@QName:
10761 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-1.2.test
10762 @@@DEnt:
10763 @@@@test:value:
10764 <?xml version="1.0" standalone="no"?>
10765 <!DOCTYPE p [
10766 <!ENTITY % para "<!-- -->">
10767 %para;
10768 <!ENTITY c "&entity;">
10769 <!ATTLIST p a CDATA "&c;">
10770 ]>
10771 <p g="h"/>
10772 @@@test:domTree:
10773 document {
10774 document-type { }
10775 element {
10776 attribute {
10777 node-name: 'g';
10778 text-content: 'h';
10779 }
10780 }
10781 }
10782 @@XMLTest:
10783 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-2.test
10784 @@@DEnt:
10785 @@@@test:value:
10786 <!DOCTYPE p [
10787 <!ENTITY c "&entity;">
10788 <!ATTLIST p a CDATA "&c;">
10789 <!ENTITY % para "<!-- -->">
10790 %para;
10791 ]>
10792 <p/>
10793 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10794 @@XMLTest:
10795 @@@QName:
10796 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-2.2.test
10797 @@@DEnt:
10798 @@@@test:value:
10799 <!DOCTYPE p [
10800 <!ENTITY % para "<!-- -->">
10801 %para;
10802 <!ENTITY c "&entity;">
10803 <!ATTLIST p a CDATA "&c;">
10804 ]>
10805 <p g="h"/>
10806 @@@test:domTree:
10807 document {
10808 document-type { }
10809 element {
10810 attribute {
10811 node-name: 'g';
10812 text-content: 'h';
10813 }
10814 }
10815 }
10816 @@XMLTest:
10817 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.4.test
10818 @@@DEnt:
10819 @@@@test:value:
10820 <?xml version="1.0" standalone="yes"?>
10821 <!DOCTYPE p [
10822 <!ENTITY % para SYSTEM "para">
10823 %para;
10824 <!ENTITY c "&entity;">
10825 <!ATTLIST p a CDATA "&c;">
10826 ]>
10827 <p/>
10828 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10829 @@XMLTest:
10830 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-3.test
10831 @@@DEnt:
10832 @@@@test:value:
10833 <?xml version="1.0" standalone="no"?>
10834 <!DOCTYPE p [
10835 <!ENTITY c "&entity;">
10836 <!ATTLIST p a CDATA "&c;">
10837 <!ENTITY % para SYSTEM "para">
10838 %para;
10839 ]>
10840 <p/>
10841 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10842 @@XMLTest:
10843 @@@QName:
10844 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-3.2.test
10845 @@@DEnt:
10846 @@@@test:value:
10847 <?xml version="1.0" standalone="no"?>
10848 <!DOCTYPE p [
10849 <!ENTITY % para SYSTEM "para">
10850 %para;
10851 <!ENTITY c "&entity;">
10852 <!ATTLIST p a CDATA "&c;">
10853 ]>
10854 <p g="h"/>
10855 @@@test:domTree:
10856 document {
10857 document-type { }
10858 element {
10859 attribute {
10860 node-name: 'g';
10861 text-content: 'h';
10862 }
10863 }
10864 }
10865 @@XMLTest:
10866 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-4.test
10867 @@@DEnt:
10868 @@@@test:value:
10869 <!DOCTYPE p [
10870 <!ENTITY c "&entity;">
10871 <!ATTLIST p a CDATA "&c;">
10872 <!ENTITY % para SYSTEM "para">
10873 %para;
10874 ]>
10875 <p/>
10876 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10877 @@XMLTest:
10878 @@@QName:
10879 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-4.2.test
10880 @@@DEnt:
10881 @@@@test:value:
10882 <!DOCTYPE p [
10883 <!ENTITY % para SYSTEM "para">
10884 %para;
10885 <!ENTITY c "&entity;">
10886 <!ATTLIST p a CDATA "&c;">
10887 ]>
10888 <p g="h"/>
10889 @@@test:domTree:
10890 document {
10891 document-type { }
10892 element {
10893 attribute {
10894 node-name: 'g';
10895 text-content: 'h';
10896 }
10897 }
10898 }
10899 @@XMLTest:
10900 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.5.test
10901 @@@DEnt:
10902 @@@@test:value:
10903 <?xml version="1.0" standalone="yes"?>
10904 <!DOCTYPE p SYSTEM "dtd" [
10905 <!ENTITY c "&entity;">
10906 <!ATTLIST p a CDATA "&c;">
10907 ]>
10908 <p/>
10909 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10910 @@XMLTest:
10911 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-5.test
10912 @@@DEnt:
10913 @@@@test:value:
10914 <?xml version="1.0" standalone="no"?>
10915 <!DOCTYPE p SYSTEM "dtd" [
10916 <!ENTITY c "&entity;">
10917 <!ATTLIST p a CDATA "&c;">
10918 ]>
10919 <p/>
10920 @@@test:domTree:
10921 document {
10922 document-type { }
10923 element {
10924 attribute {
10925 node-name: 'a';
10926 specified: false;
10927 general-entity-reference {
10928 node-name: 'c';
10929 is-expanded: true;
10930 general-entity-reference {
10931 node-name: 'entity';
10932 is-expanded: false;
10933 }
10934 }
10935 }
10936 }
10937 }
10938 @@XMLTest:
10939 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-6.test
10940 @@@DEnt:
10941 @@@@test:value:
10942 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">
10943 <!ATTLIST p a CDATA "&c;">
10944 ]>
10945 <p/>
10946 @@@test:domTree:
10947 document {
10948 document-type { }
10949 element {
10950 attribute {
10951 node-name: 'a';
10952 specified: false;
10953 general-entity-reference {
10954 node-name: 'c';
10955 is-expanded: true;
10956 general-entity-reference {
10957 node-name: 'entity';
10958 is-expanded: false;
10959 }
10960 }
10961 }
10962 }
10963 }
10964
10965 @@XMLTest:
10966 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.1.test
10967 @@@DEnt:
10968 @@@@test:value:
10969 <!DOCTYPE p [
10970 <!ATTLIST p a CDATA "&entity;">
10971 ]>
10972 <p/>
10973 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
10974 @@XMLTest:
10975 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.2.test
10976 @@@DEnt:
10977 @@@@test:value:
10978 <!DOCTYPE p [
10979 <!ENTITY other "aa">
10980 <!ENTITY % another "aa">
10981 <!ATTLIST p a CDATA "&entity;">
10982 ]>
10983 <p/>
10984 @@@c:erred: <[[xp|wf-entity-declared]]> { (4, 22)..(4, 29); }
10985 @@XMLTest:
10986 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.3.test
10987 @@@DEnt:
10988 @@@@test:value:
10989 <?xml version="1.0" standalone="yes"?>
10990 <!DOCTYPE p [
10991 <!ATTLIST p a CDATA "&entity;">
10992 ]>
10993 <p/>
10994 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
10995 @@XMLTest:
10996 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.4.test
10997 @@@DEnt:
10998 @@@@test:value:
10999 <?xml version="1.0" standalone="no"?>
11000 <!DOCTYPE p [
11001 <!ATTLIST p a CDATA "&entity;">
11002 ]>
11003 <p/>
11004 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11005 @@XMLTest:
11006 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.5.test
11007 @@@DEnt:
11008 @@@@test:value:
11009 <?xml version="1.0" standalone="yes"?>
11010 <!DOCTYPE p [
11011 <!ENTITY other "aa">
11012 <!ENTITY % another "aa">
11013 <!ATTLIST p a CDATA "&entity;">
11014 ]>
11015 <p/>
11016 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
11017 @@XMLTest:
11018 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.6.test
11019 @@@DEnt:
11020 @@@@test:value:
11021 <?xml version="1.0" standalone="no"?>
11022 <!DOCTYPE p [
11023 <!ENTITY other "aa">
11024 <!ENTITY % another "aa">
11025 <!ATTLIST p a CDATA "&entity;">
11026 ]>
11027 <p/>
11028 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
11029 @@XMLTest:
11030 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-1.test
11031 @@@DEnt:
11032 @@@@test:value:
11033 <!DOCTYPE p [
11034 <!ENTITY entity "value">
11035 <!ATTLIST p a CDATA "&entity;">
11036 ]>
11037 <p/>
11038 @@@test:domTree:
11039 document {
11040 document-type {
11041 general-entity {
11042 node-name: 'entity';
11043 text-content: 'value';
11044 }
11045 element-type-definition {
11046 node-name: 'p';
11047 attribute-definition {
11048 node-name: 'a';
11049 general-entity-reference {
11050 node-name: 'entity';
11051 is-expanded: true;
11052 text-content: 'value';
11053 }
11054 }
11055 }
11056 }
11057 element {
11058 attribute {
11059 node-name: 'a';
11060 specified: false;
11061 general-entity-reference {
11062 node-name: 'entity';
11063 is-expanded: true;
11064 text-content: 'value';
11065 }
11066 }
11067 }
11068 }
11069 @@XMLTest:
11070 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-1.2.test
11071 @@@DEnt:
11072 @@@@test:value:
11073 <!DOCTYPE p [
11074 <!ATTLIST p a CDATA "&entity;">
11075 <!ENTITY entity "value">
11076 ]>
11077 <p/>
11078 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
11079 @@XMLTest:
11080 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-2.test
11081 @@@DEnt:
11082 @@@@test:value:
11083 <!DOCTYPE p [
11084 <!ENTITY entity "value">
11085 <!ENTITY another SYSTEM "another">
11086 <!ATTLIST p a CDATA "&entity;">
11087 ]>
11088 <p/>
11089 @@@test:domTree:
11090 document {
11091 document-type {
11092 element-type-definition {
11093 node-name: 'p';
11094 attribute-definition {
11095 node-name: 'a';
11096 general-entity-reference {
11097 node-name: 'entity';
11098 is-expanded: true;
11099 text-content: 'value';
11100 }
11101 }
11102 }
11103 general-entity {
11104 node-name: 'entity';
11105 text-content: 'value';
11106 has-replacement-tree: true;
11107 }
11108 general-entity {
11109 node-name: 'another';
11110 public-id: null;
11111 system-id: 'another';
11112 has-replacement-tree: false;
11113 }
11114 }
11115 element {
11116 attribute {
11117 node-name: 'a';
11118 specified: false;
11119 general-entity-reference {
11120 node-name: 'entity';
11121 is-expanded: true;
11122 text-content: 'value';
11123 }
11124 }
11125 }
11126 }
11127 @@XMLTest:
11128 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-2.2.test
11129 @@@DEnt:
11130 @@@@test:value:
11131 <!DOCTYPE p [
11132 <!ATTLIST p a CDATA "&entity;">
11133 <!ENTITY entity "value">
11134 <!ENTITY another SYSTEM "another">
11135 ]>
11136 <p/>
11137 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
11138 @@XMLTest:
11139 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.2.test
11140 @@@DEnt:
11141 @@@@test:value:
11142 <?xml version="1.0" standalone="yes"?>
11143 <!DOCTYPE p [
11144 <!ATTLIST p a CDATA "&entity;">
11145 ]>
11146 <p/>
11147 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11148 @@XMLTest:
11149 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.3.test
11150 @@@DEnt:
11151 @@@@test:value:
11152 <?xml version="1.0" standalone="yes"?>
11153 <!DOCTYPE p [
11154 <!ATTLIST p a CDATA "&entity;">
11155 <!ENTITY % para "<!-- -->">
11156 %para;
11157 ]>
11158 <p/>
11159 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11160 @@XMLTest:
11161 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.3.2.test
11162 @@@DEnt:
11163 @@@@test:value:
11164 <?xml version="1.0" standalone="yes"?>
11165 <!DOCTYPE p [
11166 <!ENTITY % para "<!-- -->">
11167 %para;
11168 <!ATTLIST p a CDATA "&entity;">
11169 ]>
11170 <p/>
11171 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
11172 @@@enImplNote:
11173 The <XML::ATTLIST> declaration is processed since
11174 it is a <XA::standalone> document.
11175 @@XMLTest:
11176 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-1.test
11177 @@@DEnt:
11178 @@@@test:value:
11179 <?xml version="1.0" standalone="no"?>
11180 <!DOCTYPE p [
11181 <!ATTLIST p a CDATA "&entity;">
11182 <!ENTITY % para "<!-- -->">
11183 %para;
11184 ]>
11185 <p/>
11186 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11187 @@XMLTest:
11188 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-1.2.test
11189 @@@DEnt:
11190 @@@@test:value:
11191 <?xml version="1.0" standalone="no"?>
11192 <!DOCTYPE p [
11193 <!ATTLIST q b CDATA #IMPLIED>
11194 <!ENTITY % para "<!-- -->">
11195 %para;
11196 <!ATTLIST p a CDATA "&entity;">
11197 ]>
11198 <p c="d"/>
11199 @@@test:domTree:
11200 document {
11201 document-type {
11202 element-type-definition {
11203 node-name: 'q';
11204 attribute-definition {
11205 node-name: 'b';
11206 }
11207 }
11208 }
11209 element {
11210 attribute {
11211 node-name: 'c';
11212 text-content: 'd';
11213 }
11214 }
11215 }
11216 @@@enImplNote:
11217 The second <XML::ATTLIST> declaration is read but not processed
11218 and its <XML::&entity;> general entity reference violates
11219 entity declared validty constraint rather than well-formedness
11220 constraint.
11221 @@XMLTest:
11222 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-2.test
11223 @@@DEnt:
11224 @@@@test:value:
11225 <!DOCTYPE p [
11226 <!ATTLIST p a CDATA "&entity;">
11227 <!ENTITY % para "<!-- -->">
11228 %para;
11229 ]>
11230 <p/>
11231 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
11232 @@XMLTest:
11233 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-2.2.test
11234 @@@DEnt:
11235 @@@@test:value:
11236 <!DOCTYPE p [
11237 <!ATTLIST q b CDATA #IMPLIED>
11238 <!ENTITY % para "<!-- -->">
11239 %para;
11240 <!ATTLIST p a CDATA "&entity;">
11241 ]>
11242 <p c="d"/>
11243 @@@test:domTree:
11244 document {
11245 document-type {
11246 element-type-definition {
11247 node-name: 'q';
11248 attribute-definition {
11249 node-name: 'b';
11250 }
11251 }
11252 }
11253 element {
11254 attribute {
11255 node-name: 'c';
11256 text-content: 'd';
11257 }
11258 }
11259 }
11260 @@XMLTest:
11261 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.4.test
11262 @@@DEnt:
11263 @@@@test:value:
11264 <?xml version="1.0" standalone="yes"?>
11265 <!DOCTYPE p [
11266 <!ATTLIST p a CDATA "&entity;">
11267 <!ENTITY % para SYSTEM "p">
11268 %para;
11269 ]>
11270 <p/>
11271 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11272 @@XMLTest:
11273 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.4.2.test
11274 @@@DEnt:
11275 @@@@test:value:
11276 <?xml version="1.0" standalone="yes"?>
11277 <!DOCTYPE p [
11278 <!ENTITY % para SYSTEM "p">
11279 %para;
11280 <!ATTLIST p a CDATA "&entity;">
11281 ]>
11282 <p/>
11283 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
11284 @@@enImplNote:
11285 The <XML::ATTLIST> declaration is processed since
11286 it is a <XA::standalone> document.
11287 @@XMLTest:
11288 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-3.test
11289 @@@DEnt:
11290 @@@@test:value:
11291 <?xml version="1.0" standalone="no"?>
11292 <!DOCTYPE p [
11293 <!ATTLIST p a CDATA "&entity;">
11294 <!ENTITY % para SYSTEM "p">
11295 %para;
11296 ]>
11297 <p/>
11298 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11299 @@@enImplNote:
11300 Is this well-formed? It has a parameter entity reference,
11301 therefore, it does not violates Entity Declared WFC, isn't it?
11302
11303 Note that Firefox 1.5 and Opera 9 TP1 reports that this document has a
11304 fatal error (also note that they does not support unexpanded).
11305
11306 See also:
11307 <URI::http://suika.fam.cx/gate/2005/sw/%E5%B1%9E%E6%80%A7%E5%80%A4%E8%A1%A8%E8%A8%98#anchor-8>
11308 @@XMLTest:
11309 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-3.2.test
11310 @@@DEnt:
11311 @@@@test:value:
11312 <?xml version="1.0" standalone="no"?>
11313 <!DOCTYPE p [
11314 <!ATTLIST q b CDATA #IMPLIED>
11315 <!ENTITY % para SYSTEM "p">
11316 %para;
11317 <!ATTLIST p a CDATA "&entity;">
11318 ]>
11319 <p c="d"/>
11320 @@@test:domTree:
11321 document {
11322 document-type {
11323 element-type-definition {
11324 node-name: 'q';
11325 attribute-definition {
11326 node-name: 'b';
11327 }
11328 }
11329 }
11330 element {
11331 attribute {
11332 node-name: 'c';
11333 text-content: 'd';
11334 }
11335 }
11336 }
11337 @@@enImplNote:
11338 The second <XML::ATTLIST> declaration is read but not processed
11339 and its <XML::&entity;> general entity reference violates
11340 entity declared validty constraint rather than well-formedness
11341 constraint.
11342 @@XMLTest:
11343 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-4.test
11344 @@@DEnt:
11345 @@@@test:value:
11346 <!DOCTYPE p [
11347 <!ATTLIST p a CDATA "&entity;">
11348 <!ENTITY % para SYSTEM "p">
11349 %para;
11350 ]>
11351 <p/>
11352 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
11353 @@XMLTest:
11354 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-4.2.test
11355 @@@DEnt:
11356 @@@@test:value:
11357 <!DOCTYPE p [
11358 <!ATTLIST q b CDATA #IMPLIED>
11359 <!ENTITY % para SYSTEM "p">
11360 %para;
11361 <!ATTLIST p a CDATA "&entity;">
11362 ]>
11363 <p c="d"/>
11364 @@@test:domTree:
11365 document {
11366 document-type {
11367 element-type-definition {
11368 node-name: 'q';
11369 attribute-definition {
11370 node-name: 'b';
11371 }
11372 }
11373 }
11374 element {
11375 attribute {
11376 node-name: 'c';
11377 text-content: 'd';
11378 }
11379 }
11380 }
11381 @@XMLTest:
11382 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.5.test
11383 @@@DEnt:
11384 @@@@test:value:
11385 <?xml version="1.0" standalone="yes"?>
11386 <!DOCTYPE p SYSTEM "dtd" [
11387 <!ATTLIST p a CDATA "&entity;">
11388 ]>
11389 <p/>
11390 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11391 @@@enImplNote:
11392 This document has an error - result is implementation dependent.
11393 @@XMLTest:
11394 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-5.test
11395 @@@DEnt:
11396 @@@@test:value:
11397 <?xml version="1.0" standalone="no"?>
11398 <!DOCTYPE p SYSTEM "dtd" [
11399 <!ATTLIST p a CDATA "&entity;">
11400 ]>
11401 <p/>
11402 @@@test:domTree:
11403 document {
11404 document-type {
11405 element-type-definition {
11406 node-name: 'p';
11407 attribute-definition {
11408 node-name: 'a';
11409 general-entity-reference {
11410 node-name: 'entity';
11411 is-expanded: false;
11412 }
11413 }
11414 }
11415 }
11416 element {
11417 attribute {
11418 node-name: 'a';
11419 specified: false;
11420 general-entity-reference {
11421 node-name: 'entity';
11422 is-expanded: false;
11423 }
11424 }
11425 }
11426 }
11427 @@@enImplNote:
11428 This document has an error - result is implementation dependent.
11429 @@XMLTest:
11430 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-6.test
11431 @@@DEnt:
11432 @@@@test:value:
11433 <!DOCTYPE p SYSTEM "dtd" [
11434 <!ATTLIST p a CDATA "&entity;">
11435 ]>
11436 <p/>
11437 @@@test:domTree:
11438 document {
11439 document-type {
11440 element-type-definition {
11441 node-name: 'p';
11442 attribute-definition {
11443 node-name: 'a';
11444 general-entity-reference {
11445 node-name: 'entity';
11446 is-expanded: false;
11447 }
11448 }
11449 }
11450 }
11451 element {
11452 attribute {
11453 node-name: 'a';
11454 specified: false;
11455 general-entity-reference {
11456 node-name: 'entity';
11457 is-expanded: false;
11458 }
11459 }
11460 }
11461 }
11462 @@@enImplNote:
11463 This document has an error - result is implementation dependent.
11464
11465 @@enImplNote:
11466 {TODO:: Entity declared WFC for
11467
11468 - General entity references in entity value??
11469
11470 }
11471
11472 @@XMLTest:
11473 @@@QName: xp.element.content.parsed.entity.reference.test
11474 @@@DEnt:
11475 @@@@test:value:
11476 <!DOCTYPE p [
11477 <!NOTATION n SYSTEM "notation">
11478 <!ENTITY ext SYSTEM "system" NDATA n>
11479 ]>
11480 <p>&ext;</p>
11481 @@@c:erred: <[[xp|wf-parsed-entity]]> { (5, 4)..(5, 8); }
11482 @@XMLTest:
11483 @@@QName: xp.attval.parsed.entity.reference.test
11484 @@@DEnt:
11485 @@@@test:value:
11486 <!DOCTYPE p [
11487 <!NOTATION n SYSTEM "notation">
11488 <!ENTITY ext SYSTEM "system" NDATA n>
11489 ]>
11490 <p a="&ext;"/>
11491 # @@@c:erred: <[[xp|wf-parsed-entity]]> { (5, 7)..(5, 11); }
11492 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (5, 7)..(5, 11); }
11493 @@XMLTest:
11494 @@@QName: xp.element.content.reptxt.parsed.entity.reference.test
11495 @@@DEnt:
11496 @@@@test:value:
11497 <!DOCTYPE p [
11498 <!NOTATION n SYSTEM "notation">
11499 <!ENTITY ext SYSTEM "system" NDATA n>
11500 <!ENTITY c "&#x26;ext;">
11501 ]>
11502 <p>&c;</p>
11503 @@@c:erred: <[[xp|wf-parsed-entity]]> { (1, 1)..(1, 5); }
11504 @@XMLTest:
11505 @@@QName: xp.attval.reptxt.parsed.entity.reference.test
11506 @@@DEnt:
11507 @@@@test:value:
11508 <!DOCTYPE p [
11509 <!NOTATION n SYSTEM "notation">
11510 <!ENTITY ext SYSTEM "system" NDATA n>
11511 <!ENTITY c "&#x26;ext;">
11512 ]>
11513 <p a="&c;"/>
11514 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 1)..(1, 5); }
11515 @@@c:erred:
11516 @@@@@: <[[xp|wf-parsed-entity]]> { }
11517 @@@@enImplNote: During entity node construction.
11518 @@XMLTest:
11519 @@@QName: xp.element.content.entval.parsed.entity.reference.test
11520 @@@DEnt:
11521 @@@@test:value:
11522 <!DOCTYPE p [
11523 <!NOTATION n SYSTEM "notation">
11524 <!ENTITY ext SYSTEM "system" NDATA n>
11525 <!ENTITY c "&ext;">
11526 ]>
11527 <p>&c;</p>
11528 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
11529 @@XMLTest:
11530 @@@QName: xp.attval.entval.parsed.entity.reference.test
11531 @@@DEnt:
11532 @@@@test:value:
11533 <!DOCTYPE p [
11534 <!NOTATION n SYSTEM "notation">
11535 <!ENTITY ext SYSTEM "system" NDATA n>
11536 <!ENTITY c "&ext;">
11537 ]>
11538 <p a="&c;"/>
11539 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { }
11540 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
11541
11542 @@XMLTest:
11543 @@@QName: xp.element.content.no.recursion.direct.test
11544 @@@DEnt:
11545 @@@@test:value:
11546 <!DOCTYPE p [
11547 <!ENTITY c "&c;">
11548 ]>
11549 <p>&c;</p>
11550 @@@c:erred: <[[xp|wf-no-recursion]]> { (1, 1)..(1, 3); }
11551 @@XMLTest:
11552 @@@QName: xp.element.content.no.recursion.indirect.test
11553 @@@DEnt:
11554 @@@@test:value:
11555 <!DOCTYPE p [
11556 <!ENTITY d "&c;">
11557 <!ENTITY c "&d;">
11558 ]>
11559 <p>&c;</p>
11560 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
11561 @@XMLTest:
11562 @@@QName: xp.attval.no.recursion.direct.test
11563 @@@DEnt:
11564 @@@@test:value:
11565 <!DOCTYPE p [
11566 <!ENTITY c "&c;">
11567 ]>
11568 <p a="&c;"/>
11569 @@@c:erred: <[[xp|wf-no-recursion]]> { (1, 1)..(1, 3); }
11570 @@XMLTest:
11571 @@@QName: xp.attval.no.recursion.indirect.test
11572 @@@DEnt:
11573 @@@@test:value:
11574 <!DOCTYPE p [
11575 <!ENTITY d "&c;">
11576 <!ENTITY c "&d;">
11577 ]>
11578 <p a="&c;"/>
11579 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
11580 @@XMLTest:
11581 @@@QName: xp.reptxt.element.content.no.recursion.direct.test
11582 @@@DEnt:
11583 @@@@test:value:
11584 <!DOCTYPE p [
11585 <!ENTITY c "&c;">
11586 <!ENTITY e "&#x26;c;">
11587 ]>
11588 <p>&e;</p>
11589 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |e| */ (1, 1)..(1, 3); }
11590 @@XMLTest:
11591 @@@QName: xp.reptxt.element.content.no.recursion.indirect.test
11592 @@@DEnt:
11593 @@@@test:value:
11594 <!DOCTYPE p [
11595 <!ENTITY d "&c;">
11596 <!ENTITY c "&d;">
11597 <!ENTITY e "&#x26;c;">
11598 ]>
11599 <p>&e;</p>
11600 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
11601 @@XMLTest:
11602 @@@QName: xp.reptxt.attval.no.recursion.direct.test
11603 @@@DEnt:
11604 @@@@test:value:
11605 <!DOCTYPE p [
11606 <!ENTITY c "&c;">
11607 <!ENTITY e "&#x26;c;">
11608 ]>
11609 <p a="&e;"/>
11610 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |e| */ (1, 1)..(1, 3); }
11611 @@XMLTest:
11612 @@@QName: xp.reptxt.attval.no.recursion.indirect.test
11613 @@@DEnt:
11614 @@@@test:value:
11615 <!DOCTYPE p [
11616 <!ENTITY d "&c;">
11617 <!ENTITY c "&d;">
11618 <!ENTITY e "&#x26;c;">
11619 ]>
11620 <p a="&e;"/>
11621 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
11622
11623 @@XMLTest:
11624 @@@QName: xp.ENTITY.system.ndata.name.test
11625 @@@DEnt:
11626 @@@@test:value:
11627 <!DOCTYPE a [
11628 <!NOTATION n SYSTEM "n">
11629 <!ENTITY % e SYSTEM "sys" NDATA n>
11630 ]><a/>
11631 @@@c:erred: <[[xp|wf-syntax-error]]> { (3, 26)..(3, 30); }
11632 @@XMLTest:
11633 @@@QName: xp.ENTITY.public.ndata.name.test
11634 @@@DEnt:
11635 @@@@test:value:
11636 <!DOCTYPE a [
11637 <!NOTATION n SYSTEM "n">
11638 <!ENTITY % e PUBLIC "pub" "sys" NDATA n>
11639 ]><a/>
11640 @@@c:erred: <[[xp|wf-syntax-error]]> { (3, 33)..(3, 37); }
11641 @@XMLTest:
11642 @@@QName: xp.ENTITY.public.ndata.name.-1.test
11643 @@@DEnt:
11644 @@@@test:value:
11645 <!DOCTYPE a [
11646 <!NOTATION n SYSTEM "n">
11647 <!ENTITY % e PUBLIC "pub" "sys" >
11648 ]><a/>
11649 @@@test:domTree:
11650 document { }
11651
11652 @@XMLTest:
11653 @@@QName: xp.ENTITY.pubid.1.test
11654 @@@DEnt:
11655 @@@@test:value:
11656 <!DOCTYPE a [
11657 <!ENTITY e PUBLIC "p" "s">
11658 ]><a/>
11659 @@@test:domTree:
11660 document {
11661 document-type {
11662 general-entity {
11663 node-name: 'e';
11664 public-id: 'p';
11665 system-id: 's';
11666 }
11667 }
11668 element { }
11669 }
11670 @@XMLTest:
11671 @@@QName: xp.ENTITY.pubid.2.test
11672 @@@DEnt:
11673 @@@@test:value:
11674 <!DOCTYPE a [
11675 <!ENTITY e PUBLIC " p " "s">
11676 ]><a/>
11677 @@@test:domTree:
11678 document {
11679 document-type {
11680 general-entity {
11681 node-name: 'e';
11682 public-id: 'p';
11683 system-id: 's';
11684 }
11685 }
11686 element { }
11687 }
11688 @@XMLTest:
11689 @@@QName: xp.ENTITY.pubid.3.test
11690 @@@DEnt:
11691 @@@@test:value:
11692 <!DOCTYPE a [
11693 <!ENTITY e PUBLIC " p $u000Aq$u000A " "s">
11694 ]><a/>
11695 @@@test:domTree:
11696 document {
11697 document-type {
11698 general-entity {
11699 node-name: 'e';
11700 public-id: 'p q';
11701 system-id: 's';
11702 }
11703 }
11704 element { }
11705 }
11706 @@XMLTest:
11707 @@@QName: xp.ENTITY.pubid.4.test
11708 @@@DEnt:
11709 @@@@test:value:
11710 <!DOCTYPE a [
11711 <!ENTITY e PUBLIC " p $u000D$u000Aq" "s">
11712 ]><a/>
11713 @@@test:domTree:
11714 document {
11715 document-type {
11716 general-entity {
11717 node-name: 'e';
11718 public-id: 'p q';
11719 system-id: 's';
11720 }
11721 }
11722 element { }
11723 }
11724 @@XMLTest:
11725 @@@QName: xp.ENTITY.pubid.5.test
11726 @@@DEnt:
11727 @@@@test:value:
11728 <?xml version="1.1"?>
11729 <!DOCTYPE a [
11730 <!ENTITY e PUBLIC " p $u0085$u000Aq" "s">
11731 ]><a/>
11732 @@@test:domTree:
11733 document {
11734 document-type {
11735 general-entity {
11736 node-name: 'e';
11737 public-id: 'p q';
11738 system-id: 's';
11739 }
11740 }
11741 element { }
11742 }
11743
11744 @@PerlDef:
11745 my $impl = $Message::DOM::ImplementationRegistry->get_implementation ({
11746 'Core' => '3.0',
11747 'XML' => '3.0',
11748 'XMLVersion' => ['1.0', '1.1'],
11749 });
11750 my $parser = <Class::ManakaiXMLParser>->new ($impl);
11751
11752 for my $test_data (@$TestData) {
11753 $test->start_new_test ($test_data->{uri});
11754 my $doc_ent = $test_data->{entity}->{$test_data->{root_uri}};
11755 my $not_ok;
11756
11757 $parser->dom_config->set_parameter ('error-handler' => sub ($$) {
11758 my (undef, $err) = @_;
11759 my $err_type = $err->type;
11760 if ($test_data->{dom_error}->{$err_type}) {
11761 $test->assert_error_equals
11762 (actual_value => $err,
11763 expected_hash => shift @{$test_data->{dom_error}
11764 ->{$err_type}});
11765 } else { # Uncatched error
11766 warn $err;
11767 unless ($err->severity == <C::c|DOMError.SEVERITY_WARNING>) {
11768 $test->failure_comment ('Unexpected error |'.$err->type.'|');
11769 $not_ok = true;
11770 }
11771 }
11772 return true; # continue as far as possible
11773 });
11774
11775 if ($test_data->{dom_tree}) { # Successful test
11776 try {
11777 my $doc = $parser->parse_string ($doc_ent->{<H::test:value>});
11778 $test->assert_dom_tree_equals
11779 (actual_value => $doc,
11780 expected_hash => $test_data->{dom_tree});
11781 for (values %{$test_data->{dom_error}||{}}) {
11782 if (@$_) {
11783 $test->failure_comment
11784 (@$_.' |DOMError|s of type |'.
11785 $_->[0]->{type}->{value}.'| are not reported');
11786 $not_ok = true;
11787 }
11788 }
11789 $not_ok ? $test->not_ok : $test->ok;
11790 } catch Message::Util::IF::DTException with {
11791 #
11792 } catch Message::DOM::IF::LSException with {
11793 # not_ok
11794 } otherwise {
11795 my $err = shift;
11796 warn $err;
11797 $test->not_ok;
11798 };
11799 } else {
11800 try {
11801 my $doc = $parser->parse_string ($doc_ent->{<H::test:value>});
11802 } catch Message::Util::IF::DTException with {
11803 #
11804 } catch Message::DOM::IF::LSException with {
11805 #
11806 } otherwise {
11807 my $err = shift;
11808 warn $err;
11809 $test->not_ok;
11810 };
11811 for (values %{$test_data->{dom_error}||{}}) {
11812 if (@$_) {
11813 $test->failure_comment
11814 (@$_.' |DOMError|s of type |'.
11815 $_->[0]->{type}->{value}.'| are not reported');
11816 $not_ok = true;
11817 }
11818 }
11819 $not_ok ? $test->not_ok : $test->ok;
11820 }
11821 }
11822
11823 @ResourceDef:
11824 @@QName: getEmptyEntityState
11825 @@rdf:type: DISPerl|InlineCode
11826 @@ForCheck: ManakaiDOM|ForClass
11827 @@PerlDef:
11828 {reptxt => \'', line => 1, column => 1, pos => 0,
11829 is_externally_declared => true, name => $name}
11830
11831 @ResourceDef:
11832 @@QName: getCopyOfEntityState
11833 @@rdf:type: DISPerl|InlineCode
11834 @@ForCheck: ManakaiDOM|ForClass
11835 @@PerlDef:
11836 {%{$self->{$entity_type}->{$entity_name}},
11837 line => 1, column => 1, pos => 0}
11838 ##ManakaiXMLParser
11839
11840 ElementTypeBinding:
11841 @Name: XMLTests
11842 @ElementType:
11843 dis:ResourceDef
11844 @ShadowContent:
11845 @@ForCheck: ManakaiDOM|ForClass
11846 @@rdf:type: test|ParserTestSet
11847
11848 ElementTypeBinding:
11849 @Name: XMLTest
11850 @ElementType:
11851 dis:ResourceDef
11852 @ShadowContent:
11853 @@ForCheck: ManakaiDOM|ForClass
11854 @@rdf:type: test|ParserTest
11855
11856 ElementTypeBinding:
11857 @Name: DEnt
11858 @ElementType:
11859 dis:ResourceDef
11860 @ShadowContent:
11861 @@rdf:type: test|RootEntity
11862
11863 ElementTypeBinding:
11864 @Name: Ent
11865 @ElementType:
11866 dis:ResourceDef
11867 @ShadowContent:
11868 @@rdf:type: test|Entity
11869
11870 ResourceDef:
11871 @QName: xp|get-location-from-token
11872 @rdf:type: DISPerl|BlockCode
11873 @enDesc:
11874 Creates a <IF::DOMCore:DOMLocator> object from a token.
11875 @PerlDef:
11876 my $__d = $token->{type} ne '#EOF'
11877 ? $token->{location}->{char_d}
11878 : 0;
11879 $__d -= $token->{location_d} if $token->{location_d};
11880 $result = {
11881 utf32_offset => $token->{location}->{pos} - $__d,
11882 line_number => $token->{location}->{line},
11883 column_number => $token->{location}->{column} - $__d,
11884 };
11885 $result->{utf32_offset} = 0 if $result->{utf32_offset} < 0;
11886 $result->{column_number} = 0 if $result->{column_number} < 0;
11887 ## 0 or 1, which should be?
11888 @For: ManakaiDOM|ManakaiDOM3
11889
11890 ElementTypeBinding:
11891 @Name: RuleDef
11892 @ElementType:
11893 dis:ResourceDef
11894 @ShadowContent:
11895 @@ForCheck: ManakaiDOM|ForClass
11896 @@rdf:type: Muf2003|RuleDefClass
11897
11898 ElementTypeBinding:
11899 @Name: RuleParam
11900 @ElementType:
11901 dis:ResourceDef
11902 @ShadowContent:
11903 @@rdf:type: Muf2003|RuleParameter
11904
11905 ElementTypeBinding:
11906 @Name: enImplNote
11907 @ElementType:
11908 dis:ImplNote
11909 @ShadowContent:
11910 @@lang:en
11911
11912 ElementTypeBinding:
11913 @Name: ErrDef
11914 @ElementType:
11915 dis:ResourceDef
11916 @ShadowContent:
11917 @@rdf:type: DOMCore|DOMErrorType
11918 @@For: ManakaiDOM|DOM3
11919 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
11920
11921 ElementTypeBinding:
11922 @Name: WFErrDef
11923 @ElementType:
11924 dis:ResourceDef
11925 @ShadowContent:
11926 @@rdf:type: DOMCore|DOMErrorType
11927 @@For: ManakaiDOM|DOM3
11928 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
11929
11930 ElementTypeBinding:
11931 @Name: FatalErrDef
11932 @ElementType:
11933 dis:ResourceDef
11934 @ShadowContent:
11935 @@rdf:type: DOMCore|DOMErrorType
11936 @@For: ManakaiDOM|DOM3
11937 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
11938
11939 WFErrDef:
11940 @QName: xp|wf-syntax-error
11941 @enDesc:
11942 The entity does not match to the production rule; it is not
11943 well-formed.
11944 @DOMCore:severity: DOMCore|SEVERITY_FATAL_ERROR
11945 @enMufDef:
11946 |%xp-error-token-type;|%xp-error-token-value
11947 (prefix => { (|}, suffix => {|)}); is not
11948 allowed%xp-error-lines (prefix => { (|}, suffix => {|)});
11949 @ecore:hasParameter:
11950 @@@: xp|error-token
11951 @@enDesc:
11952 The token that is not allowed.
11953
11954 WFErrDef:
11955 @QName: xp|wf-pi-target-is-xml
11956 @enDesc:
11957 A processing instruction has its <CODE::PITarget> of
11958 <XML::xml> (in any case) which is not allowed.
11959 @DOMCore:severity: DOMCore|SEVERITY_ERROR
11960 @enMufDef:
11961 Processing instruction target name cannot be |%p
11962 (name => {<Q::xp|name>});|
11963 @ecore:hasParameter:
11964 @@@: xp|error-token
11965 @@enDesc:
11966 The token that contains the name.
11967 @ecore:hasParameter:
11968 @@@: xp|name
11969 @@enDesc:
11970 A string that is specified as target name of the
11971 processing instruction.
11972 @ecore:hasParameter: xp|parent
11973
11974 WFErrDef:
11975 @QName: xp|wf-no-end-tag
11976 @DOMCore:severity: DOMCore|SEVERITY_ERROR
11977 @enDesc:
11978 An end-tag is not found.
11979 @enMufDef:
11980 End-tag |</%p (name => {<Q::xp|expected-element-type>});>| is required
11981 @ecore:hasParameter: xp|error-token
11982 @ecore:hasParameter:
11983 @@@: xp|node
11984 @@enDesc:
11985 The element node that is not closed.
11986 @ecore:hasParameter:
11987 @@@: xp|expected-element-type
11988 @@enDesc:
11989 The element type name of the element that is not closed.
11990
11991 WFErrDef:
11992 @QName: xp|wf-unsupported-xml-version
11993 @DOMCore:severity: DOMCore|SEVERITY_ERROR
11994 @enDesc:
11995 The XML version specified in the version declaration is not supported.
11996 @enMufDef:
11997 XML version |%p (name => {<Q::infoset|version>});| is not supported
11998 @ecore:hasParameter: xp|bad-token
11999 @ecore:hasParameter:
12000 @@@: xp|parent
12001 @@enDesc:
12002 The document node.
12003 @ecore:hasParameter:
12004 @@@: infoset|version
12005 @@enDesc:
12006 The specified XML version.
12007
12008 WFErrDef:
12009 @QName: xp|wf-malformed-enc-name
12010 @DOMCore:severity: DOMCore|SEVERITY_ERROR
12011 @enDesc:
12012 An <XA::encoding> pseudo-attribute value does not match
12013 to the procduction rule <CODE::EncName>.
12014 @enMufDef:
12015 Encoding name |%p (name => {<Q::xp|name>});| is not allowed
12016 @ecore:hasParameter: xp|error-token
12017 @ecore:hasParameter:
12018 @@@: xp|parent
12019 @@enDesc: The document node.
12020 @ecore:hasParameter:
12021 @@@: xp|name
12022 @@enDesc:
12023 The <XA::encoding> value.
12024
12025 WFErrDef:
12026 @QName: xp|wf-malformed-xml-standalone
12027 @DOMCore:severity: DOMCore|SEVERITY_ERROR
12028 @enDesc:
12029 An <XA::standalone> pseudo-attribute value is neither <XML::yes>
12030 or <XML::no>.
12031 @enMufDef:
12032 |standalone| pseudo-attribute value |%p (name => {<Q::xp|name>});|
12033 is not allowed
12034 @ecore:hasParameter: xp|error-token
12035 @ecore:hasParameter:
12036 @@@: xp|parent
12037 @@enDesc: The document node.
12038 @ecore:hasParameter:
12039 @@@: xp|name
12040 @@enDesc:
12041 The <XA::standalone> value.
12042
12043 WFErrDef:
12044 @QName: xp|wf-legal-literal-character
12045 @DOMCore:severity: DOMCore|SEVERITY_ERROR
12046 @enDesc:
12047 Each character in XML entity must match to the production
12048 rule <CODE::Char - RestrictedChar>.
12049 @enMufDef:
12050 Character %character-code-point
12051 (v => {<Q::xp|character-number>}); is not allowed
12052 @ecore:hasParameter:
12053 @@@: xp|character-number
12054 @@enDesc:
12055 The code position of the character being referred.
12056
12057 WFErrDef:
12058 @QName: xp|wf-element-type-match
12059 @DOMCore:severity: DOMCore|SEVERITY_FATAL_ERROR
12060 @enDesc:
12061 The <CODE::Name> in an element's end-tag must match the element type
12062 in the start-tag.
12063 @enMufDef:
12064 End-tag |</%p (name => {<Q::xp|actual-element-type>});>| does
12065 not match to start-tag |<%p (name => {<Q::xp|expected-element-type>});>|
12066 @ecore:hasParameter: xp|error-token
12067 @ecore:hasParameter:
12068 @@@: xp|node
12069 @@enDesc:
12070 The current opening element node.
12071 @ecore:hasParameter:
12072 @@@: xp|expected-element-type
12073 @@enDesc:
12074 The element type name of the current element.
12075 @ecore:hasParameter:
12076 @@@: xp|actual-element-type
12077 @@enDesc:
12078 The <CODE::Name> occurs in the end-tag.
12079
12080 WFErrDef:
12081 @QName: xp|wf-unique-att-spec
12082 @DOMCore:severity: DOMCore|SEVERITY_ERROR
12083 @enDesc:
12084 An attribute name <kwd:MUST-NOT> appear more than once in
12085 the same start-tag or empty-element tag.
12086 @enMufDef:
12087 Attribute |%p (name => {<Q::xp|name>});| is specified more
12088 than once in the same tag
12089 @ecore:hasParameter: xp|error-token
12090 @ecore:hasParameter:
12091 @@@: xp|name
12092 @@enDesc:
12093 The name of the attribute.
12094
12095 WFErrDef:
12096 @QName: xp|wf-no-external-entity-references
12097 @c:severity: c|SEVERITY_ERROR
12098 @enDesc:
12099 Attribute values <kwd:MUST-NOT> contain direct or indirect
12100 entity references to external entities.
12101 @enMufDef:
12102 External entity |%p (name => {<Q::xp|name>});| is referenced
12103 in an attribute value literal
12104 @ecore:hasParameter: xp|error-token
12105 @ecore:hasParameter:
12106 @@@: xp|name
12107 @@enDesc:
12108 The name of the entity.
12109
12110 WFErrDef:
12111 @QName: xp|wf-no-lt-in-attribute-values
12112 @c:severity: c|SEVERITY_ERROR
12113 @enDesc:
12114 The replacement text of any entity referred to directly or indirectly
12115 in an attribute value literal <kwd:MUST-NOT> contain a
12116 <CHAR::LESS-THAN SIGN>.
12117 @enMufDef:
12118 Entity replacement text cannot contain a
12119 |LESS-THAN SIGN| since it is referenced from an attribute
12120 value literal
12121 @ecore:hasParameter: xp|error-token
12122
12123 WFErrDef:
12124 @QName: xp|wf-legal-character
12125 @DOMCore:severity: DOMCore|SEVERITY_ERROR
12126 @enDesc:
12127 Characters referred to using character references <kwd:MUST>
12128 match the production for <CODE::Char>.
12129 @enMufDef:
12130 Reference to character %character-code-point
12131 (v => {<Q::xp|character-number>}); is not allowed
12132 @ecore:hasParameter: xp|error-token
12133 @ecore:hasParameter:
12134 @@@: xp|character-number
12135 @@enDesc:
12136 The code position of the character being referred.
12137 @ecore:hasParameter:
12138 @@@: xp|parent
12139 @@enDesc:
12140 The parent node in which the character reference has
12141 occurred, if available.
12142
12143 WFErrDef:
12144 @QName: xp|wf-entity-declared
12145 @c:severity: c|SEVERITY_ERROR
12146 @enDesc:
12147 {P:: In a document
12148
12149 - without any DTD,
12150
12151 - with only an internal DTD subset that contains no parameter
12152 entity references, or
12153
12154 - with <XML::standalone="yes">,
12155
12156 for an entity reference that does not occur within the external
12157 subset or a parameter entity, the <CODE::Name> given in the
12158 entity reference <kwd:MUST> match the <CODE::Name> does not
12159 occur within the external subset or a parameter entity,
12160 except that five predefined character entities need not
12161 be declared. The declaration of a general entity <kwd:MUST>
12162 precede any reference to it which appears in a default value
12163 in an attribute list declaration.
12164 @enMufDef:
12165 Entity |%p (name => {<Q::xp|name>});| must be declared
12166 in the internal subset
12167 @ecore:hasParameter: xp|error-token
12168 @ecore:hasParameter:
12169 @@@: xp|name
12170 @@enDesc:
12171 The name of the entity.
12172
12173 WFErrDef:
12174 @QName: xp|wf-parsed-entity
12175 @c:severity: c|SEVERITY_ERROR
12176 @enDesc:
12177 An entity reference <kwd:MUST-NOT> contain the name of an
12178 unparsed entity.
12179 @enMufDef:
12180 Entity |%p (name => {<Q::xp|name>});| is an unparsed entity
12181 @ecore:hasParameter: xp|error-token
12182 @ecore:hasParameter:
12183 @@@: xp|name
12184 @@enDesc:
12185 The name of the entity.
12186
12187 WFErrDef:
12188 @QName: xp|wf-no-recursion
12189 @c:severity: c|SEVERITY_ERROR
12190 @enDesc:
12191 A parsed entity <kwd:MUST-NOT> contain a recursive reference
12192 to itself, either directly or indirectly.
12193 @enMufDef:
12194 Entity |%p (name => {<Q::xp|name>});| is recursively referenced
12195 @ecore:hasParameter: xp|error-token
12196 @ecore:hasParameter:
12197 @@@: xp|name
12198 @@enDesc:
12199 The name of the entity.
12200
12201 FatalErrDef:
12202 @QName: xp|fatal-xml11-end-of-line-in-xml-declaration
12203 @DOMCore:severity: DOMCore|SEVERITY_ERROR
12204 @enDesc:
12205 An end-of-line character <CODE::U+0085> or <CODE::U+2028> is appeared
12206 within an XML declaration or text declaration.
12207 @enMufDef:
12208 End-of-line character %character-code-point
12209 (v => {<Q::xp|character-number>}); cannot be used within the
12210 XML or text declaration
12211 @ecore:hasParameter:
12212 @@@: xp|character-number
12213 @@enDesc:
12214 The code position of the end-of-line character.
12215
12216 XWParam:
12217 @QName: xp|error-token
12218 @enDesc:
12219 The token where the parser found an error.
12220
12221 XWParam:
12222 @QName: xp|name
12223 @enDesc:
12224 A name.
12225
12226 XWParam:
12227 @QName: xp|parent
12228 @enDesc:
12229 The parent node in which the error occurs.
12230
12231 XWParam:
12232 @QName: xp|node
12233 @enDesc:
12234 The current node.
12235
12236 XWParam:
12237 @QName: xp|actual-element-type
12238 @enDesc:
12239 The actual element type name occured in the source.
12240
12241 XWParam:
12242 @QName: xp|expected-element-type
12243 @enDesc:
12244 The element type name expected.
12245
12246 XWParam:
12247 @QName: xp|character-number
12248 @enDesc:
12249 The character code position.
12250
12251 ElementTypeBinding:
12252 @Name: XWParam
12253 @ElementType:
12254 dis:ResourceDef
12255 @ShadowContent:
12256 @@For: =ManakaiDOM|all
12257 @@rdf:type: ecore|Parameter
12258
12259 ElementTypeBinding:
12260 @Name:enMufDef
12261 @ElementType:
12262 ecore:defaultMessage
12263 @ShadowContent:
12264 @@lang:en
12265 @@ContentType:
12266 lang:muf
12267
12268 ResourceDef:
12269 @QName: DOMImpl
12270 @AliasFor: DOMCore|DOMImplementation
12271 @For: ManakaiDOM|DOM
12272
12273 ElementTypeBinding:
12274 @Name: Attr
12275 @ElementType:
12276 dis:ResourceDef
12277 @ShadowContent:
12278 @@rdf:type: DISLang|Attribute
12279 @@ForCheck: !=ManakaiDOM|ManakaiDOM
12280
12281 ElementTypeBinding:
12282 @Name: Get
12283 @ElementType:
12284 dis:ResourceDef
12285 @ShadowContent:
12286 @@rdf:type: DISLang|AttributeGet
12287
12288 ElementTypeBinding:
12289 @Name: Set
12290 @ElementType:
12291 dis:ResourceDef
12292 @ShadowContent:
12293 @@rdf:type: DISLang|AttributeSet
12294
12295 ElementTypeBinding:
12296 @Name: enDesc
12297 @ElementType:
12298 dis:Description
12299 @ShadowContent:
12300 @@lang:en
12301
12302 ElementTypeBinding:
12303 @Name: Method
12304 @ElementType:
12305 dis:ResourceDef
12306 @ShadowContent:
12307 @@rdf:type: DISLang|Method
12308 @@For: !=ManakaiDOM|ManakaiDOM
12309
12310 ElementTypeBinding:
12311 @Name: Return
12312 @ElementType:
12313 dis:ResourceDef
12314 @ShadowContent:
12315 @@rdf:type: DISLang|MethodReturn
12316
12317 ElementTypeBinding:
12318 @Name: Param
12319 @ElementType:
12320 dis:ResourceDef
12321 @ShadowContent:
12322 @@rdf:type: DISLang|MethodParameter
12323
12324 ElementTypeBinding:
12325 @Name: PerlDef
12326 @ElementType:
12327 dis:Def
12328 @ShadowContent:
12329 @@ContentType: lang|Perl
12330
12331 ElementTypeBinding:
12332 @Name: PropDef
12333 @ElementType:
12334 dis:ResourceDef
12335 @ShadowContent:
12336 @@rdf:type: rdf|Property
12337
12338 ClsDef:
12339 @ClsQName: ManakaiXMLParserExceptionFormatter
12340
12341 @ClsISA: ecore|MUErrorFormatter||ManakaiDOM|Perl
12342
12343 @RuleDef:
12344 @@Name: xp-error-token-type
12345 @@enDesc:
12346 The type of the token the parser is encountered.
12347
12348 @@Method:
12349 @@@Name: after
12350 @@@Param:
12351 @@@@Name: name
12352 @@@@Type: DOMString
12353 @@@@enDesc: The name of the method.
12354 @@@Param:
12355 @@@@Name: p
12356 @@@@Type: DISPerl|HASH
12357 @@@@enDesc: The set of the parameters to the method.
12358 @@@Param:
12359 @@@@Name: o
12360 @@@@Type: DISPerl|HASH
12361 @@@@enDesc: The option value.
12362 @@@Return:
12363 @@@@PerlDef:
12364 $p->{-result} = $o->{<H::xp|error-token>}->{type}
12365 if defined $o->{<H::xp|error-token>}->{type};
12366
12367 @RuleDef:
12368 @@Name: xp-error-token-value
12369 @@enDesc:
12370 The value of the token the parser is encountered, if any.
12371
12372 @@Method:
12373 @@@Name: after
12374 @@@Param:
12375 @@@@Name: name
12376 @@@@Type: DOMString
12377 @@@@enDesc: The name of the method.
12378 @@@Param:
12379 @@@@Name: p
12380 @@@@Type: DISPerl|HASH
12381 @@@@enDesc: The set of the parameters to the method.
12382 @@@Param:
12383 @@@@Name: o
12384 @@@@Type: DISPerl|HASH
12385 @@@@enDesc: The option value.
12386 @@@Return:
12387 @@@@PerlDef:
12388 $p->{-result} = $o->{<H::xp|error-token>}->{value}
12389 if defined $o->{<H::xp|error-token>}->{value};
12390
12391 @RuleDef:
12392 @@Name: xp-error-lines
12393 @@enDesc:
12394 A copy of fragment of the source text that contains the line
12395 where the error occurred, if available.
12396
12397 @@Method:
12398 @@@Name: after
12399 @@@Param:
12400 @@@@Name: name
12401 @@@@Type: DOMString
12402 @@@@enDesc: The name of the method.
12403 @@@Param:
12404 @@@@Name: p
12405 @@@@Type: DISPerl|HASH
12406 @@@@enDesc: The set of the parameters to the method.
12407 @@@Param:
12408 @@@@Name: o
12409 @@@@Type: DISPerl|HASH
12410 @@@@enDesc: The option value.
12411 @@@Return:
12412 @@@@PerlDef:
12413 my $pos = $o-><AG::DOMCore|DOMError.location>
12414 -><AG::DOMCore|DOMLocator.utf32Offset>;
12415 if ($pos > -1) {
12416 my $src = $o->{<H::ecore|object>}->{entity}->[-1]->{reptxt};
12417 my $start = $pos;
12418 $start = rindex ($$src, "\x0A", $start - 1) for 0..2;
12419 $start++;
12420 my $end = $pos;
12421 $end = index ($$src, "\x0A", $end + 1) for 0..2;
12422 $end = length $$src if $end < 0;
12423 $p->{-result} = substr $$src, $start, $end - $start;
12424 }
12425
12426 @RuleDef:
12427 @@Name: character-code-point
12428 @@enDesc:
12429 The character code position, in <CODE::U+<VAR::HHHH>> notation.
12430
12431 @@Method:
12432 @@@Name: after
12433 @@@Param:
12434 @@@@Name: name
12435 @@@@Type: DOMString
12436 @@@@enDesc: The name of the method.
12437 @@@Param:
12438 @@@@Name: p
12439 @@@@Type: DISPerl|HASH
12440 @@@@enDesc: The set of the parameters to the method.
12441 @@@Param:
12442 @@@@Name: o
12443 @@@@Type: DISPerl|HASH
12444 @@@@enDesc: The option value.
12445 @@@RuleParam:
12446 @@@@Name: v
12447 @@@@Type: DISPerl|Number
12448 @@@@enDesc:
12449 The name of the error parameter that contains the character code.
12450 @@@Return:
12451 @@@@PerlDef:
12452 $p->{-result} = sprintf 'U+%04X', $o->{$p->{v}};
12453 ##XMLParserExceptionFormatter

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24