/[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.27 - (show annotations) (download)
Fri Feb 17 15:06:33 2006 UTC (18 years, 9 months ago) by wakaba
Branch: MAIN
Changes since 1.26: +938 -172 lines
++ ChangeLog	17 Feb 2006 14:56:57 -0000
2006-02-17  Wakaba  <wakaba@suika.fam.cx>

	* Makefile.PL (PREREQ_PM): The |IO::String| module is added.

++ manakai/lib/Message/DOM/ChangeLog	17 Feb 2006 15:06:17 -0000
	* XMLParser.dis (domConfig): New |targetType| of |xp:ManakaiDOMXMLParser|
	is introduced.
	(async, busy): Implemented.
	(parseString): Removed.
	(parse, parseURI): Implemented.
	(xp:ls-input-to-input-file): New configuration parameter.
	(shiftChar): Gets character from current file handle
	rather than replacement text.  Don't normalize
	line break characters for internal entities.  Don't
	throw |xp:wf-legal-literal-character| error
	for |RestrictedChar| appearing in internal entities.
	(DISPerl:dpgDef): Call |close| for each entity filehandler.
	(_EntityDeclaration): Copy document URI and base URI
	to the entity's |$decl| object.
	(ParseError): New code fragment.
	(getCopyOfEntityState): Creates filehandle from replacement
	text.
	(xp-error-lines): Don't appends text if no replacement
	text is available.
	(error-handler): New configuration parameter application resource.
	(ManakaiDOMLSInputToInputFile): New class.
	(ManakaiDOMInputFile): New class.

	* Tree.dis (getNodeReference): A dereferencing was missing.

	* DOMLS.dis (DOMLS:busy, DOMLS:lsKey): New properties.

2006-02-17  Wakaba  <wakaba@suika.fam.cx>

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/16 20:03:20 $
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 ElementTypeBinding:
191 @Name: TrueCase
192 @ElementType:
193 dis:ResourceDef
194 @ShadowContent:
195 @@rdf:type:
196 ManakaiDOM:InCase
197 @@Value:
198 @@@@: 1
199 @@@ContentType: DISCore|Boolean
200 @@Type: idl|boolean||ManakaiDOM|all
201
202 ElementTypeBinding:
203 @Name: FalseCase
204 @ElementType:
205 dis:ResourceDef
206 @ShadowContent:
207 @@rdf:type:
208 ManakaiDOM:InCase
209 @@Value:
210 @@@@: 0
211 @@@ContentType: DISCore|Boolean
212 @@Type: idl|boolean||ManakaiDOM|all
213
214 ResourceDef:
215 @QName: LSParser
216 @AliasFor: DOMLS|LSParser
217 @For: ManakaiDOM|DOM3
218
219 ClsDef:
220 @ClsQName: ManakaiXMLParser
221
222 @Implement: DOMLS|LSParser
223
224 @f:implements:
225 @@@: DOMLS|LSFeature30
226 @@For: ManakaiDOM|DOM3
227
228 @DISLang:role: gls|ParserRole
229
230 @enDesc:
231 Note that the <Class::ManakaiXMLParser> reports any XML errors
232 (syntax errors and / or well-formedness constraint errors)
233 via the <IF::DOMCore:error-handler> registered to
234 the <A::DOMLS:LSParser.domConfig> object. Each error has
235 its <A::DOMCore:DOMError.severity>, either <C::DOMCore:SEVERITY_ERROR>
236 or <C::DOMCore:SEVERITY_FATAL_ERROR>. However, their semantics
237 are slight different from the ones of <QUOTE::error> and
238 <QUOTE::fatal error> in XML; in this implemenetation,
239 <C::DOMCore:SEVERITY_ERROR> implies that the parsing process
240 can effectively be continued to detect more errors while
241 <C::DOMCore:SEVERITY_FATAL_ERROR> implies that the error
242 is serious so that the result document tree and any errors
243 might be far from the ones obtained when the error would not
244 be found.
245
246 @Test:
247 @@QName: Perl.open.utf8.strref.1.test
248 @@enDesc:
249 Does PerlIO works as intended?
250 @@PerlDef:
251 my $s = qq<\x{3001}\x0A\x{10001}>;
252 #open my $a, '<'.':utf8', \$s;
253 require IO::String;
254 my $a = IO::String->new ($s);
255 $test->assert_num_equals
256 (actual_value => ord getc $a,
257 expected_value => 0x3001);
258 $test->assert_num_equals
259 (actual_value => ord getc $a,
260 expected_value => 0x000A);
261 $test->assert_num_equals
262 (actual_value => ord getc $a,
263 expected_value => 0x10001);
264 $a->ungetc (0x10001);
265 $test->assert_num_equals
266 (actual_value => ord getc $a,
267 expected_value => 0x10001);
268 $test->assert_null (getc $a);
269 close $a;
270 @Test:
271 @@QName: Perl.open.8859.strref.2.test
272 @@enDesc:
273 Does PerlIO works as intended?
274 @@PerlDef:
275 my $s = qq<\x{0080}\x0A\x{00A9}>;
276 #open my $a, '<', \$s;
277 require IO::String;
278 my $a = IO::String->new ($s);
279 $test->assert_num_equals
280 (actual_value => ord getc $a,
281 expected_value => 0x0080);
282 $test->assert_num_equals
283 (actual_value => ord getc $a,
284 expected_value => 0x000A);
285 $test->assert_num_equals
286 (actual_value => ord getc $a,
287 expected_value => 0x00A9);
288 $a->ungetc (0x00A9);
289 $test->assert_num_equals
290 (actual_value => ord getc $a,
291 expected_value => 0x00A9);
292 $test->assert_null (getc $a);
293 close $a;
294
295 @Attr:
296 @@Name: domConfig
297 @@enDesc:
298 The configuration of the parser.
299
300 @@Get:
301 @@@Type: DOMCore|DOMConfiguration
302 @@@enDesc: The DOM configuration object.
303 @@@PerlDef:
304 __CODE{DOMCore|getConfigObject::
305 $target => $self,
306 $targetHash => $self,
307 $targetType => {<ClassName::xp|ManakaiXMLParser>},
308 $result => $r,
309 }__;
310
311 @Attr:
312 @@ForCheck: ManakaiDOM|ForClass
313 @@Name: async
314 @@enDesc:
315 Whether the parser is asynchronous or not.
316 @@Type: idl|boolean||ManakaiDOM|all
317 @@Get:
318 @@@FalseCase:
319 @@@@enDesc:
320 The parser does not in asynchronous mode.
321 @@@PerlDef: \
322 @@Test:
323 @@@QName: XMLParser.async.test
324 @@@PerlDef:
325 my $xp;
326 __CODE{createParserForTest:: $xp => $xp}__;
327
328 $test->assert_false ($xp-><AG::DOMLS|LSParser.async>);
329
330 @Attr:
331 @@ForCheck: ManakaiDOM|ForClass
332 @@Name: busy
333 @@enDesc:
334 Whether the parser is currently busy loading a document or not.
335 @@Type: idl|boolean||ManakaiDOM|all
336 @@Get:
337 @@@TrueCase:
338 @@@@enDesc:
339 The parser is currently busy.
340 @@@FalseCase:
341 @@@@enDesc:
342 The parser is not busy.
343 @@@PerlDef:
344 $r = $self->{<H::DOMLS|busy>};
345
346 @enImplNote:
347 @@ddid: abort
348 @@@:
349 {ISSUE::
350 LSParser.abort:
351
352 Is it required to support even in synchronous mode?
353 }
354
355 {TODO::
356 LSParser.filter
357 }
358
359 @ResourceDef:
360 @@QName: createParserForTest
361 @@ForCheck: ManakaiDOM|ForClass
362 @@rdf:type: DISPerl|BlockCode
363 @@PerlDef:
364 require Message::DOM::GenericLS;
365 $xp = <Class::ManakaiXMLParser>
366 ->new (<Class::gls|ManakaiGLSImplementation>->_new, '');
367
368 @Method:
369 @@ManakaiDOM:isForInternal:1
370 @@ForCheck: ManakaiDOM|ForClass
371 @@Operator: DISPerl|NewMethod
372 @@enDesc:
373 Creates a new instance of the object.
374 @@Param:
375 @@@Name: impl
376 @@@Type: gls|GLSImplementation
377 @@@enDesc:
378 The implementation from which the parser is created.
379 @@Param:
380 @@@Name: features
381 @@@Type: DOMString
382 @@@dis:actualType: f|FeaturesString
383 @@@enDesc:
384 The set of features requested for the parser.
385 @@Return:
386 @@@Type: DOMMain|DOMObject
387 @@@dis:actualType: LSParser
388 @@@enDesc:
389 The newly created parser.
390 @@@PerlDef:
391 $r = bless {
392 <H::DOMCore:implementation> => $impl,
393 }, $self;
394
395 @Method:
396 @@Name: parseURI
397 @@enDesc:
398 Parses an XML document identified by a DOM URI.
399
400 It is equivalent to <M::.parse> method with its <P::input>
401 parameter set to a <IF::LSInput> object whose
402 <A::LSInput.systemId> set to <P::uri>.
403 @@Param:
404 @@@Name: uri
405 @@@Type: DOMString
406 @@@enDesc:
407 The DOM URI of the XML document to be read.
408 @@Return:
409 @@@Type: Document
410 @@@enDesc:
411 The newly created and populated <IF::Document> node.
412 @@@dx:raises:
413 @@@@@: ManakaiDOMLS|MDOMLS_BUSY
414 @@@@enDesc:
415 If <A::LSParser.busy> is <DOM::true>.
416 @@@dx:raises:
417 @@@@@: DOMLS|PARSE_ERR
418 @@@@enDesc:
419 If the <IF::LSParser> was unable to load the document.
420 @@@PerlDef:
421 __DEEP{
422 $r = $self-><M::LSParser.parse> ({system_id => $uri});
423 }__;
424
425 @Method:
426 @@Name: parse
427 @@enDesc:
428 Parses an XML document from a resource identified
429 by a <IF::LSInput>.
430 @@Param:
431 @@@Name: input
432 @@@Type: LSInput
433 @@@enDesc:
434 The <IF::LSInput> from which the source of the document
435 is to be read.
436 @@Return:
437 @@@Type: Document
438 @@@enDesc:
439 The newly created and populated <IF::Document> node.
440 @@@dx:raises:
441 @@@@@: ManakaiDOMLS|MDOMLS_BUSY
442 @@@@enDesc:
443 If the <A::LSParser.busy> is <DOM::true>.
444 @@@dx:raises:
445 @@@@@: DOMLS|PARSE_ERR
446 @@@@enDesc:
447 If the <IF::LSParser> was unable to load the document.
448 @@@PerlDef:
449 if ($self->{<H::DOMLS|busy>}) {
450 __EXCEPTION{ManakaiDOMLS|MDOMLS_BUSY}__;
451 }
452 local $self->{<H::DOMLS|busy>} = true;
453
454 my $in;
455 __DEEP{
456 $self->{parser_cfg} = $self-><AG::LSParser.domConfig>;
457 ## Parser's |domConfig| object.
458 $self->{in_in} = $self->{parser_cfg}
459 -><M::c|DOMConfiguration.getParameter>
460 (<Q::xp|ls-input-to-input-file>);
461 $in = $self->{in_in}-><M::ManakaiDOMLSInputToInputFile.resolveLSInput>
462 ($input,
463 $self->{parser_cfg}
464 -><M::c|DOMConfiguration.getParameter>
465 ('error-handler'));
466 }__;
467 unless (defined $in) {
468 __c|ERROR{DOMLS|no-input-specified::
469 MDOMX:param-name => 'input',
470 }__;
471 __CODE{ParseError}__;
472 }
473
474 require IO::Handle;
475
476 $self->{char} = [];
477 $self->{token} = [];
478 $self->{entity} = [{
479 fh => $in-><AG::ManakaiDOMInputFile.filehandle>,
480 base_uri => $in-><AG::ManakaiDOMInputFile.baseURI>,
481 doc_uri => $in-><AG::ManakaiDOMInputFile.documentURI>,
482 line => 1,
483 column => 1,
484 pos => 0,
485 close_file => sub { $in-><M::ManakaiDOMInputFile.close> },
486 reptxt => \'',
487 is_external_entity => true,
488 }];
489 ## Entity stack.
490 $self->{location} = $self->{entity}->[-1];
491 ## Parsing location object as required by DPG.
492 ## It must always be equal to |{entity}->[-1]|.
493 $self->{entity_char} = [];
494 ## Stack for |{char}| stacks analog to |{entity}| stack.
495 $self->{entity_token} = [];
496 ## Stack for |{token}| stacks analog to |{entity}| stack.
497 $self->{xml_version} = '1.0';
498 ## Document XML version: either |1.0| or |1.1|.
499 $self->{standalone} = false;
500 ## True iff |standalone=yes| is explicitly specified.
501 $self->{has_xref} = false;
502 ## There is an unread external entity.
503 $self->{dont_process} = false;
504 ## So, don't process |ENTITY| and |ATTLIST| declarations.
505 $self->{general_entity} = {
506 lt => {is_predefined => true},
507 gt => {is_predefined => true},
508 amp => {is_predefined => true},
509 quot => {is_predefined => true},
510 apos => {is_predefined => true},
511 };
512 ## Declared general entities.
513 $self->{param_entity} = {};
514 ## Declared parameter entities.
515 $self->{attr} = {};
516 # $self->{attr}->{$element_type_name}->{$attr_name} = $attr_def
517 ## Declared attributes.
518
519 __DEEP{
520 $r = $self->{<H::c|implementation>}-><M::DOMImpl.createDocument>;
521 $self->{doc} = $r;
522 ## |Document| object.
523 CORE::delete $self->{docx};
524 ## |DocumentXDoctype| object (if necessary).
525 $self->{doc_cfg} = $r-><AG::Document.domConfig>;
526 ## |Document|'s configuration.
527 CORE::delete $self->{dtdef};
528 ## |DocumentTypeDefinition| object (if created).
529 CORE::delete $self->{dtdecl};
530 ## |DocumentTypeDeclaration| object (if created).
531
532 $r-><AS::Document.strictErrorChecking> (false);
533 ## NOTE: Any checks such as |Name| validity done by
534 ## methods on DOM nodes are disabled. It might result
535 ## in creating an ill-formed DOM tree when parser
536 ## errors are traped by |error-handler|.
537 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
538 (<Q::cfg|entity-reference-read-only> => false);
539 ## NOTE: Turn this configuration parameter off is required
540 ## because entity reference subtree is created by
541 ## the parser rather than |createEntityReference|'s
542 ## cloning. Parser's |cfg:entity-reference-read-only|
543 ## configuration parameter controls whether generated
544 ## subtree is then marked as read-only or not.
545 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
546 (<Q::cfg|clone-entity-reference-subtree> => true);
547 ## NOTE: Turn this configuration parameter on makes
548 ## entity reference subtrees in attribute default values
549 ## cloned as is into default attribute node subtrees.
550 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
551 (<Q::cfg|dtd-default-attributes> => false);
552 ## NOTE: Don't create DTD default attributes by
553 ## |createElementNS| method.
554 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
555 ('error-handler' => sub {
556 my (undef, $err) = @_;
557 return ($err-><AG::c|DOMError.severity> !=
558 <C::c|DOMError.SEVERITY_FATAL_ERROR>);
559 })
560 unless $Message::DOM::XMLParser::DEBUG;
561 ## NOTE: The default error handler in manakai |wanr|s error
562 ## description.
563
564 ## Document entity -> |Document| node
565 $self->_parse_DocumentEntity;
566
567 for (@{$self->{entity}}) {
568 $_->{close_file}->();
569 ## NOTE: There should be only the document entity.
570 }
571
572 ## Replacement tree for general |Entity| nodes
573 my @ent = values %{$self->{general_entity}};
574 for my $ent (@ent) {
575 if (exists $ent->{has_replacement_text}) {
576 my $ent_name = $ent->{name};
577 $self->{entity} = [<Code::getCopyOfEntityState::
578 $entity_type = 'general_entity',
579 $entity_name = $ent_name>];
580 $self->{location} = $self->{entity}->[-1];
581 $self->{token} = [];
582 $self->{char} = [];
583 local $ent->{is_opened} = true;
584 ## TODO: External entity support
585 $self->_parse_InternalGeneralParsedEntity ($ent->{node});
586 $ent->{node}-><AS::x|Entity.hasReplacementTree> (true);
587 $self->{entity}->[-1]->{close_file}->();
588 ## ISSUE: Should errors detected by this phase result
589 ## in |DOMLS:PARSE_ERR| exception thrown?
590 }
591 ## TODO: Read-only if configuration (for all entities)
592 }
593
594 ## Turns flags to their default value
595 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
596 (<Q::cfg|entity-reference-read-only> => null);
597 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
598 (<Q::cfg|clone-entity-reference-subtree> => null);
599 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
600 (<Q::cfg|dtd-default-attributes> => null);
601 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
602 ('error-handler' => null);
603 $r-><AS::Document.strictErrorChecking> (true);
604 }__;
605
606 @Method:
607 @@Name: shiftChar
608 @@ManakaiDOM:isForInternal:1
609 @@ForCheck: ManakaiDOM|ForClass
610 @@enDesc:
611 Returns the next character.
612 @@Return:
613 @@@Type: idl|long||ManakaiDOM|all
614 @@@enDesc:
615 The code position number of the next character, if any,
616 or <CODE::-1>.
617 @@@PerlDef:
618 if (@{$self->{char}}) {
619 $r = shift @{$self->{char}};
620 } else {
621 GETCHAR: {
622 no warnings 'closed'; # getc() on closed filehandle warning
623 my $ent = $self->{entity}->[-1];
624 my $char = getc $ent->{fh};
625
626 if (defined $char and length $char) {
627 $ent->{pos}++;
628 $r = ord $char;
629 if ($r == 0x000A) {
630 $ent->{line}++;
631 $ent->{column} = 1;
632 } elsif ($r == 0x000D) {
633 my $next_char = getc $ent->{fh};
634 if ($next_char eq "\x0A") {
635 if ($ent->{is_external_entity}) {
636 $ent->{pos}++;
637 $ent->{line}++;
638 $ent->{column} = 1;
639 $r = 0x000A; # ^ U+000D U+000A -> U+000A ^
640 } else { # Internal entity
641 $ent->{column}++;
642 ## Line number will be increased by next |shiftChar|.
643 $ent->{fh}->ungetc (0x000A);
644 #$r = 0x000D; # ^ U+000D U+000A -> U+000D ^ U+000A
645 # no change
646 }
647 } elsif ($next_char eq "\x85") {
648 if ($self->{xml_version} eq '1.1') {
649 if ($ent->{is_external_entity}) {
650 if ($ent->{no_xml11_eol}) {
651 my $location = {
652 utf32_offset => $ent->{pos} - 1,
653 line_number => $ent->{line},
654 column_number => $ent->{column},
655 };
656 my $continue = __c|ERROR{
657 xp|fatal-xml11-end-of-line-in-xml-declaration::
658 c|location => {$location},
659 xp|character-number => {$r},
660 }__;
661 unless ($continue) {
662 __CODE{ParseError}__;
663 }
664 } # no_xml11_eol
665 $ent->{pos}++;
666 $ent->{line}++;
667 $ent->{column} = 1;
668 $r = 0x000A; # ^ U+000D U+0085 -> U+000A ^
669 } else { # internal entity
670 $ent->{column}++;
671 ## Line number will be increased by next |shiftChar|.
672 $ent->{fh}->ungetc (0x0085);
673 #$r = 0x000D; # ^ U+000D U+0085 -> U+000D ^ U+0085
674 # no change
675 }
676 } else { # XML 1.0
677 ## |no_xml11_eol| will be tested later.
678 $ent->{column}++;
679 ## Line number will be increased by next |shiftChar|.
680 $ent->{fh}->ungetc (0x0085);
681 $r = 0x000A if $ent->{is_external_entity};
682 # external: ^ U+000D U+0085 -> U+000A ^ U+0085
683 # internal: ^ U+000D U+0085 -> U+000D ^ U+0085 (as is)
684 }
685 } else { # neither U+000A nor U+0085
686 $ent->{line}++;
687 $ent->{column} = 1;
688 $ent->{fh}->ungetc (ord $next_char);
689 $r = 0x000A if $ent->{is_external_entity};
690 # external: ^ U+000D _ -> U+000A ^ _
691 # internal: ^ U+000D _ -> U+000D ^ _ (as is)
692 }
693 } elsif ($r == 0x0085 or $r == 0x2028) {
694 if ($ent->{no_xml11_eol}) {
695 my $location = {
696 utf32_offset => $ent->{pos} - 1,
697 line_number => $ent->{line},
698 column_number => $ent->{column},
699 };
700 my $continue = __c|ERROR{
701 xp|fatal-xml11-end-of-line-in-xml-declaration::
702 c|location => {$location},
703 xp|character-number => {$r},
704 }__;
705 unless ($continue) {
706 __CODE{ParseError}__;
707 }
708 } # no_xml11_eol
709 $r = 0x000A if $self->{xml_version} eq '1.1' and
710 $ent->{is_external_entity};
711 ## Even in XML 1.0 it increases the line number.
712 $ent->{line}++;
713 $ent->{column} = 1;
714 } elsif (
715 not ((0x0020 <= $r and $r <= 0x007E) or
716 (0x00A0 <= $r and $r <= 0xD7FF) or
717 (0xE000 <= $r and $r <= 0xFFFD) or
718 (0x10000 <= $r and $r <= 0x10FFFF)) and
719 $r != 0x0009 and
720 not (($self->{xml_version} eq '1.0' or
721 not $ent->{is_external_entity}) and
722 (0x007F <= $r and $r <= 0x009F)) and
723 not ($self->{xml_version} eq '1.1' and
724 not $ent->{is_external_entity} and
725 0x0001 <= $r and $r <= 0x001F)
726 ) {
727 my $location = {
728 utf32_offset => $ent->{pos} - 1,
729 line_number => $ent->{line},
730 column_number => $ent->{column},
731 };
732 my $continue = __c|ERROR{xp|wf-legal-literal-character::
733 c|location => {$location},
734 xp|character-number => {$r},
735 }__;
736 unless ($continue) {
737 __CODE{ParseError}__;
738 }
739 $ent->{column}++;
740 } else { # XML |Char|
741 $ent->{column}++;
742 }
743 } else {
744 $r = -1;
745 }
746 } # GETCHAR
747 }
748
749 @Method:
750 @@ManakaiDOM:isForInternal: 1
751 @@Operator: ManakaiDOM|MUErrorHandler
752 @@enDesc:
753 When a <IF::ecore|ErrorInterface||ManakaiDOM|Perl> is <Perl::report>ed,
754 then this method is invoked.
755
756 The method calls the <cfg::DOMCore|error-handler> if the error is of
757 <IF::DOMCore|DOMError>. Otherwise, the error is re-thrown so that
758 corresponding <Perl::catch> clause, if any, can catch the error.
759 @@Param:
760 @@@Name: err
761 @@@Type: ecore|ErrorInterface||ManakaiDOM|Perl
762 @@@enDesc:
763 The reported error object.
764 @@Return:
765 @@@Type: DISPerl|Any
766 @@@enDesc:
767 If the <P::err> is a <IF::DOMCore|DOMError>, then the return value
768 of the error handler.
769
770 {NOTE:: If the error is thrown, the method never returns.
771 }
772 @@@nullCase:
773 @@@@enDesc:
774 No error handler.
775 @@@PerlDef:
776 if ($err->isa (<IFName::DOMCore|DOMError||ManakaiDOM|ManakaiDOM>)) {
777 __DEEP{
778 A: {
779 my $cfg = $self-><AG::LSParser.domConfig>;
780 my $h = $cfg-><M::DOMCore|DOMConfiguration.getParameter>
781 ('error-handler');
782 $r = $h-><M::DOMCore|DOMErrorHandler.handleError> ($err);
783 } # A
784 }__;
785 } else {
786 $err-><M::ecore|ErrorInterface||ManakaiDOM|Perl.throw>;
787 }
788
789 @DISPerl:dpgDef:
790
791 /*
792 XML Document Entity
793
794 document := prolog element *Misc
795 - *Char RestrictedChar *Char ;; [1]
796 */
797 rule DocumentEntity : standalone {
798 /*
799 prolog := XMLDecl? *Misc [doctypedecl *Misc] ;; [22]
800 */
801 ?lexmode DocumentStart;
802
803 my $doc;
804 lang:Perl {
805 $doc = $self->{doc};
806 }
807
808 ~? (XDO) {
809 ?lexmode XMLDeclarationOrPI;
810 lang:Perl {
811 $self->{entity}->[-1]->{no_xml11_eol} = true;
812 }
813 ~ (S) { // XML declaration
814 &_XMLDeclaration_ ($doc => $doc);
815 ~ (PIC2) {
816 ?lexmode DocumentProlog;
817 } else {
818 ?lexmode DocumentProlog;
819 }
820 } (NameChar) { // Processing instruction whose target begins with |xml|
821 my $target_token;
822 lang:Perl ($v => $token.value) {
823 $target_token = $token;
824 $target_token->{value} = 'xml'.$target_token->{value};
825 $self->{entity}->[-1]->{no_xml11_eol} = false;
826 }
827 ?lexmode PINmtoken;
828 ~? (Nmtoken) {
829 lang:Perl ($v => $token.value) {
830 $target_token->{value} .= $v;
831 }
832 ?lexmode PIName;
833 }
834 lang:Perl {
835 $target_token->{type} = 'Name';
836 $target_token->{location_d} += 3; # 'xml'
837 unshift @{$self->{token}}, $token;
838 $token = $target_token;
839 }
840 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
841 ~ (PIC) {
842 ?lexmode DocumentProlog;
843 } else {
844 ?lexmode DocumentProlog;
845 }
846 } else {
847 lang:Perl {
848 $self->{entity}->[-1]->{no_xml11_eol} = false;
849 }
850 }
851 } else {
852 ?lexmode 'DocumentProlog';
853 }
854
855 // *Misc
856 ~* (CDO) {
857 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
858
859 ~ (MDC) {
860 ?lexmode DocumentProlog;
861 } else {
862 ?lexmode DocumentProlog;
863 }
864 } (PIO) {
865 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
866
867 ~ (PIC) {
868 ?lexmode 'DocumentProlog';
869 } else {
870 ?lexmode DocumentProlog;
871 }
872 } (S) {
873 //
874 }
875
876 // doctypedecl
877 ~? (MDO) {
878 &_DocumentTypeDeclaration_ ($doc => $doc);
879
880 ~ (MDC) {
881 ?lexmode DocumentMisc;
882 } else {
883 ?lexmode DocumentMisc;
884 }
885 } else {
886 ?lexmode DocumentMisc;
887 }
888
889 lang:Perl {
890 $self->{doc}-><AS::Document.allDeclarationsProcessed> (true)
891 unless $self->{dont_process};
892 }
893
894 // *Misc
895 ~* (CDO) {
896 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
897
898 ~ (MDC) {
899 ?lexmode DocumentMisc;
900 } else {
901 ?lexmode DocumentMisc;
902 }
903 } (PIO) {
904 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
905
906 ~ (PIC) {
907 ?lexmode 'DocumentMisc';
908 } else {
909 ?lexmode DocumentMisc;
910 }
911 } (S) {
912 //
913 }
914
915 // Document element
916 ~ (STAGO) {
917 &Element_ ($doc => $doc, $parent => $doc)
918 : unshift-current-token;
919 ~ (TAGC) {
920 ?lexmode DocumentEnd;
921 } else {
922 ?lexmode DocumentEnd;
923 }
924 } else {
925 ?lexmode 'DocumentEnd';
926 }
927
928 // *Misc
929 ~* (CDO) {
930 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
931
932 ~ (MDC) {
933 ?lexmode DocumentEnd;
934 } else {
935 ?lexmode DocumentEnd;
936 }
937 } (PIO) {
938 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
939 ~ (PIC) {
940 ?lexmode 'DocumentEnd';
941 } else {
942 ?lexmode DocumentEnd;
943 }
944 } (S) {
945 //
946 }
947
948 ~ (#EOF) { }
949 } // DocumentEntity
950
951 /*
952 Internal General Parsed Entity
953
954 An internal general parsed entity is well-formed if its
955 replacement text matches the production labeled |content|.
956 */
957 rule InternalGeneralParsedEntity ($ent) : standalone {
958 ?lexmode ElementContent;
959
960 my $ns;
961 lang:Perl {
962 $ns = {
963 xml => <Q::xml:>,
964 xmlns => <Q::xmlns:>,
965 };
966 }
967
968 &content ($parent => $ent, $ns => $ns);
969
970 ~ (#EOF) { }
971 } // InternalGeneralParsedEntity
972
973 /*
974 XML Declaration
975
976 XMLDecl := '<?xml' VersionInfo
977 [EncodingDecl]
978 [SDDecl]
979 [S] '?>' ;; [23]
980
981 NOTE: XML declaration is optional in XML 1.0
982 while it is required in XML 1.1.
983 */
984 rule _XMLDeclaration_ {
985 // ~ (XDO) { }
986 ?lexmode XMLDeclaration;
987 //lang:Perl {
988 // $self->{entity}->[-1]->{no_xml11_eol} = true;
989 //}
990 //~ (S) { }
991
992 ~ (Name == 'version') {
993 ~? (S) { }
994 ~ (VI) { }
995 ~? (S) { }
996
997 my $ver;
998 my $bad_token;
999
1000 ~ (LIT) {
1001 ?lexmode AttributeValueLiteral;
1002
1003 ~ (STRING) {
1004 lang:Perl ($version => $token.value) {
1005 $ver = $version;
1006 $bad_token = $token;
1007 }
1008 }
1009
1010 ~ (LIT) {
1011 ?lexmode XMLDeclaration;
1012 }
1013 } (LITA) {
1014 ?lexmode AttributeValueLiteralA;
1015
1016 ~ (STRING) {
1017 lang:Perl ($version => $token.value) {
1018 $ver = $version;
1019 $bad_token = $token;
1020 }
1021 }
1022
1023 ~ (LITA) {
1024 ?lexmode XMLDeclaration;
1025 }
1026 }
1027
1028 lang:Perl : has-error {
1029 unless ($ver eq '1.0' or $ver eq '1.1') {
1030 my $location;
1031 __CODE{xp|get-location-from-token::
1032 $token => {$bad_token},
1033 $result => {$location},
1034 }__;
1035 my $continue = __DOMCore:ERROR{xp|wf-unsupported-xml-version::
1036 DOMCore|location => {$location},
1037 xp|parent => {$self->{doc}},
1038 infoset|version => {$ver},
1039 xp|error-token => {$bad_token},
1040 }__;
1041 unless ($continue) {
1042 __CODE{ParseError}__;
1043 }
1044 }
1045 $self->{doc}-><AS::Document.xmlVersion> ($ver);
1046 $self->{xml_version} = $ver;
1047 }
1048
1049 ~? (S) { }
1050 }
1051
1052 ~? (Name == 'encoding') {
1053 ~? (S) { }
1054 ~ (VI) { }
1055 ~? (S) { }
1056
1057 my $ver;
1058 my $bad_token;
1059
1060 ~ (LIT) {
1061 ?lexmode AttributeValueLiteral;
1062
1063 ~ (STRING) {
1064 lang:Perl ($version => $token.value) {
1065 $ver = $version;
1066 $bad_token = $token;
1067 }
1068 }
1069
1070 ~ (LIT) {
1071 ?lexmode XMLDeclaration;
1072 }
1073 } (LITA) {
1074 ?lexmode AttributeValueLiteralA;
1075
1076 ~ (STRING) {
1077 lang:Perl ($version => $token.value) {
1078 $ver = $version;
1079 $bad_token = $token;
1080 }
1081 }
1082
1083 ~ (LITA) {
1084 ?lexmode XMLDeclaration;
1085 }
1086 }
1087
1088 lang:Perl : has-error {
1089 unless ($ver =~ /\A[A-Za-z][A-Za-z0-9._-]*\z/) {
1090 my $location;
1091 __CODE{xp|get-location-from-token::
1092 $token => {$bad_token},
1093 $result => {$location},
1094 }__;
1095 my $continue = __DOMCore:ERROR{xp|wf-malformed-enc-name::
1096 DOMCore|location => {$location},
1097 xp|parent => {$self->{doc}},
1098 xp|name => {$ver},
1099 xp|error-token => {$bad_token},
1100 }__;
1101 unless ($continue) {
1102 __CODE{ParseError}__;
1103 }
1104 }
1105 $self->{doc}-><AS::Document.xmlEncoding> ($ver);
1106 }
1107
1108 ~? (S) { }
1109 }
1110
1111 ~? (Name == 'standalone') {
1112 ~? (S) { }
1113 ~ (VI) { }
1114 ~? (S) { }
1115
1116 my $ver;
1117 my $bad_token;
1118
1119 ~ (LIT) {
1120 ?lexmode AttributeValueLiteral;
1121
1122 ~ (STRING) {
1123 lang:Perl ($version => $token.value) {
1124 $ver = $version;
1125 $bad_token = $token;
1126 }
1127 }
1128
1129 ~ (LIT) {
1130 ?lexmode XMLDeclaration;
1131 }
1132 } (LITA) {
1133 ?lexmode AttributeValueLiteralA;
1134
1135 ~ (STRING) {
1136 lang:Perl ($version => $token.value) {
1137 $ver = $version;
1138 $bad_token = $token;
1139 }
1140 }
1141
1142 ~ (LITA) {
1143 ?lexmode XMLDeclaration;
1144 }
1145 }
1146
1147 lang:Perl : has-error {
1148 unless ($ver eq 'yes' or $ver eq 'no') {
1149 my $location;
1150 __CODE{xp|get-location-from-token::
1151 $token => {$bad_token},
1152 $result => {$location},
1153 }__;
1154 my $continue = __DOMCore:ERROR{xp|wf-malformed-xml-standalone::
1155 DOMCore|location => {$location},
1156 xp|parent => {$self->{doc}},
1157 xp|name => {$ver},
1158 xp|error-token => {$bad_token},
1159 }__;
1160 unless ($continue) {
1161 __CODE{ParseError}__;
1162 }
1163 }
1164 if ($ver eq 'yes') {
1165 $self->{doc}-><AS::Document.xmlStandalone> (true);
1166 $self->{standalone} = true;
1167 }
1168 }
1169
1170 ~? (S) { }
1171 }
1172
1173 ~ (PIC1) {
1174 lang:Perl {
1175 $self->{entity}->[-1]->{no_xml11_eol} = false;
1176 }
1177 } else {
1178 lang:Perl {
1179 $self->{entity}->[-1]->{no_xml11_eol} = false;
1180 }
1181 }
1182
1183 // ~ (PIC2) { }
1184 } // _XMLDeclaration_
1185
1186 /*
1187 Comment Declaration
1188
1189 Comment := '<!--' *(Char - '-' / '-' (Char - '-'))
1190 '-->' ;; [15]
1191 */
1192 rule _CommentDeclaration_ ($doc, $parent) {
1193 ?lexmode 'CommentDeclaration';
1194
1195 ~? (STRING) {
1196 lang:Perl ($data => $token.value) {
1197 my $com = $doc-><M::Document.createComment> ($data);
1198 $parent-><M::Node.appendChild> ($com);
1199 }
1200 } else {
1201 lang:Perl {
1202 my $com = $doc-><M::Document.createComment> ('');
1203 $parent-><M::Node.appendChild> ($com);
1204 }
1205 }
1206
1207 ~ (COM) {
1208 ?lexmode MarkupDeclaration;
1209 } else {
1210 ?lexmode MarkupDeclaration;
1211 }
1212
1213 // ~ (MDC) { }
1214 } // _CommentDeclaration
1215
1216 rule _CommentDeclarationDTD {
1217 ?lexmode CommentDeclaration;
1218
1219 ~? (STRING) {
1220 //
1221 }
1222
1223 ~ (COM) {
1224 ?lexmode MarkupDeclaration;
1225 } else {
1226 ?lexmode MarkupDeclaration;
1227 }
1228
1229 ~ (MDC) {
1230 ?lexmode DTD;
1231 } else {
1232 ?lexmode DTD;
1233 }
1234 } // _CommentDeclarationDTD
1235
1236 /*
1237 Processing Instruction
1238
1239 PI := '<?' PITarget [S *Char - *Char '?>' *Char]
1240 '?>' ;; [16]
1241 */
1242 rule _ProcessingInstruction_ ($doc, $parent) {
1243 ?lexmode 'PIName';
1244
1245 my $pi;
1246
1247 ~ (Name) {
1248 lang:Perl ($name => $token.value) : has-error {
1249 if (lc $name eq 'xml') {
1250 my $location;
1251 __CODE{xp|get-location-from-token::
1252 $token => {$token},
1253 $result => {$location},
1254 }__;
1255 my $continue = __DOMCore:ERROR{xp|wf-pi-target-is-xml::
1256 xp|name => {$name},
1257 DOMCore|location => {$location},
1258 xp|parent => {$parent},
1259 }__;
1260 unless ($continue) {
1261 __CODE{ParseError}__;
1262 }
1263 }
1264 __CODE{checkNCName:: $name => $name}__;
1265
1266 $pi = $doc-><M::Document.createProcessingInstruction>
1267 ($name);
1268 }
1269 } else {
1270 lang:Perl {
1271 $pi = $doc-><M::Document.createProcessingInstruction> ('#INVALID');
1272 }
1273 }
1274
1275 ~? (S) {
1276 ?lexmode 'PIData';
1277
1278 my $tdata;
1279
1280 ~? (DATA) {
1281 lang:Perl ($data => $token.value) {
1282 $tdata = $data;
1283 }
1284 } else {
1285 lang:Perl {
1286 $tdata = '';
1287 }
1288 }
1289
1290 lang:Perl {
1291 $pi-><AS::Node.nodeValue> ($tdata);
1292 }
1293 }
1294
1295 lang:Perl {
1296 $parent-><M::Node.appendChild> ($pi);
1297 }
1298
1299 // ~ (PIC) { }
1300 } // _ProcessingInstruction_
1301
1302 /*
1303 Processing instruction in DTD
1304 */
1305 rule _ProcessingInstructionDTD ($doc, $doctype) {
1306 ?lexmode 'PIName';
1307
1308 my $pi;
1309
1310 ~ (Name) {
1311 lang:Perl ($name => $token.value) : has-error {
1312 if (lc $name eq 'xml') {
1313 my $location;
1314 __CODE{xp|get-location-from-token::
1315 $token => {$token},
1316 $result => {$location},
1317 }__;
1318 my $continue = __DOMCore:ERROR{xp|wf-pi-target-is-xml::
1319 xp|name => {$name},
1320 DOMCore|location => {$location},
1321 xp|parent => {$doctype},
1322 }__;
1323 unless ($continue) {
1324 __CODE{ParseError}__;
1325 }
1326 }
1327 __CODE{checkNCName:: $name => $name}__;
1328
1329 $pi = $doc-><M::Document.createProcessingInstruction>
1330 ($name);
1331 }
1332 } else {
1333 lang:Perl {
1334 $pi = $doc-><M::Document.createProcessingInstruction> ('#INVALID');
1335 }
1336 }
1337
1338 ~? (S) {
1339 ?lexmode 'PIData';
1340
1341 my $tdata;
1342
1343 ~? (DATA) {
1344 lang:Perl ($data => $token.value) {
1345 $tdata = $data;
1346 }
1347 } else {
1348 lang:Perl {
1349 $tdata = '';
1350 }
1351 }
1352
1353 lang:Perl {
1354 $pi-><AS::Node.nodeValue> ($tdata);
1355 }
1356 }
1357
1358 lang:Perl {
1359 $doctype-><M::Node.appendChild> ($pi);
1360 }
1361
1362 ~ (PIC) {
1363 ?lexmode DTD;
1364 } else {
1365 ?lexmode DTD;
1366 }
1367 } // _ProcessingInstructionDTD
1368
1369 /*
1370 Element content parsing mode
1371
1372 element := EmptyElemTag /
1373 STag content ETag ;; [39]
1374 content := (CharData / element / Reference / CDSect /
1375 PI / Comment) ;; [43]
1376 */
1377 rule Element_ ($doc, $parent, $ns) : standalone {
1378 ?lexmode 'ElementContent';
1379
1380 my $node; // Current "parent" node
1381 my $nodes; // Node stack (w/o $current_node)
1382 my $type; // Current "parent" element type QName
1383 my $types; // Element type stack (w/o $current_type)
1384 //my $ns; // Current in-scope namespace bindings
1385 my $nses; // Namespace binding stack (w/o $current_ns)
1386
1387 lang:Perl {
1388 $node = $parent;
1389 $nodes = [];
1390 $type = '';
1391 $types = [];
1392 $ns ||= {
1393 xml => <Q::xml:>,
1394 xmlns => <Q::xmlns:>,
1395 };
1396 $nses = [];
1397 }
1398
1399 ~* : name => CONTENT
1400 (CharData) {
1401 // Character data
1402 lang:Perl ($data => $token.value) {
1403 $node-><M::Node.appendChild>
1404 ($doc-><M::Document.createTextNode> ($data));
1405 }
1406 } (STAGO) {
1407 // Start tag or empty element tag
1408
1409 ?lexmode 'StartTag';
1410
1411 ~ (Name) {
1412 my $attrs;
1413 lang:Perl ($name => $token.value) : has-error {
1414 __CODE{checkQName:: $name => $name}__;
1415 push @{$types}, $type;
1416 $type = $name;
1417 $attrs = {};
1418 }
1419
1420 ~? (S) {
1421 &AttributeSpecificationList
1422 ($doc => $doc, $attrs => $attrs);
1423 }
1424
1425 my $el;
1426
1427 /*
1428 Note that this implementation does not perform
1429 attribute value tokenization (but does white space
1430 normalization common to attribute types) and
1431 construct the tree as is. DOM Level 3 Core spec
1432 is unclear on this point. With tokenization,
1433 entity references cannot be preserved.
1434
1435 The manakai Node.nodeValue and Attr.value attributes
1436 do tokenization according to attribute types.
1437 */
1438
1439 /*
1440 ISSUE: Should |xml:id| attribute be typed?
1441 */
1442
1443 lang:Perl {
1444 push @{$nses}, $ns;
1445 $ns = {%$ns};
1446
1447 ## Default attributes
1448 DA: for my $atqname (%{$self->{attr}->{$type}}) {
1449 next DA unless $self->{attr}->{$type}->{$atqname};
1450 next DA if exists $attrs->{$atqname}; # specified
1451 my $dtype = $self->{attr}->{$type}->{$atqname}
1452 -><AG::ATDef.defaultType>;
1453 next DA unless $dtype == <C::ATDef.EXPLICIT_DEFAULT> or
1454 $dtype == <C::ATDef.FIXED_DEFAULT>;
1455 $attrs->{$atqname} = {is_default => true, nodes => []};
1456 for (@{$self->{attr}->{$type}->{$atqname}
1457 -><AG::Node.childNodes>}) {
1458 push @{$attrs->{$atqname}->{nodes}},
1459 $_-><M::Node.cloneNode> (true);
1460 }
1461 }
1462
1463 my %gattr;
1464 my %lattr;
1465 for my $atqname (keys %$attrs) {
1466 my ($pfx, $lname) = split /:/, $atqname;
1467 $attrs->{$atqname}->{def} = $self->{attr}->{$type}->{$atqname};
1468 if (defined $lname) { ## Global attribute
1469 if ($pfx eq 'xmlns') {
1470 my $nsuri = $attrs->{$atqname}->{is_default}
1471 ? $attrs->{$atqname}->{def}-><AG::Node.nodeValue>
1472 : $attrs->{$atqname}->{value};
1473 if (not $attrs->{$atqname}->{is_default} and
1474 $attrs->{$atqname}->{def}) {
1475 my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;
1476 if ({
1477 <C::ATDef.ID_ATTR> => true,
1478 <C::ATDef.IDREF_ATTR> => true,
1479 <C::ATDef.IDREFS_ATTR> => true,
1480 <C::ATDef.ENTITY_ATTR> => true,
1481 <C::ATDef.ENTITIES_ATTR> => true,
1482 <C::ATDef.NMTOKEN_ATTR> => true,
1483 <C::ATDef.NMTOKENS_ATTR> => true,
1484 <C::ATDef.NOTATION_ATTR> => true,
1485 <C::ATDef.ENUMERATION_ATTR> => true,
1486 }->{$dt}) {
1487 ## Tokenization (XML 1 3.3.3)
1488 for ($nsuri) {
1489 s/^\x20+//;
1490 s/\x20+\z//;
1491 s/\x20+/ /g;
1492 }
1493 }
1494 }
1495 if ($lname eq 'xml' and
1496 $nsuri ne <Q::xml:>) {
1497 my $location;
1498 __CODE{xp|get-location-from-token::
1499 $token => $token,
1500 $result => $location,
1501 }__;
1502 my $continue = __c|ERROR{xp|nsc-reserved-prefix-xml::
1503 c|location => {$location},
1504 xp|token => {$token},
1505 infoset|prefix => {$lname},
1506 infoset|namespaceName => {$nsuri},
1507 }__;
1508 unless ($continue) {
1509 __CODE{ParseError}__;
1510 }
1511 } elsif ($lname eq 'xmlns') {
1512 my $location;
1513 __CODE{xp|get-location-from-token::
1514 $token => $token,
1515 $result => $location,
1516 }__;
1517 my $continue = __c|ERROR{xp|nsc-reserved-prefix-xmlns::
1518 c|location => {$location},
1519 xp|token => {$token},
1520 infoset|prefix => {$lname},
1521 infoset|namespaceName => {$nsuri},
1522 }__;
1523 unless ($continue) {
1524 __CODE{ParseError}__;
1525 }
1526 }
1527 if ($nsuri eq '') {
1528 if ($self->{xml_version} eq '1.0') {
1529 my $location;
1530 __CODE{xp|get-location-from-token::
1531 $token => $token,
1532 $result => $location,
1533 }__;
1534 my $continue = __c|ERROR{xp|nswf-empty-namespace-name::
1535 c|location => {$location},
1536 xp|token => {$token},
1537 infoset|namespaceName => {$nsuri},
1538 infoset|prefix => {$lname},
1539 }__;
1540 unless ($continue) {
1541 __CODE{ParseError}__;
1542 }
1543 }
1544 } elsif ($nsuri eq <Q::xml:> and
1545 $lname ne 'xml') {
1546 my $location;
1547 __CODE{xp|get-location-from-token::
1548 $token => $token,
1549 $result => $location,
1550 }__;
1551 my $continue = __c|ERROR{
1552 xp|nsc-reserved-namespace-name-xml::
1553 c|location => {$location},
1554 xp|token => {$token},
1555 infoset|prefix => {$lname},
1556 infoset|namespaceName => {$nsuri},
1557 }__;
1558 unless ($continue) {
1559 __CODE{ParseError}__;
1560 }
1561 } elsif ($nsuri eq <Q::xmlns:>) {
1562 my $location;
1563 __CODE{xp|get-location-from-token::
1564 $token => $token,
1565 $result => $location,
1566 }__;
1567 my $continue = __c|ERROR{
1568 xp|nsc-reserved-namespace-name-xmlns::
1569 c|location => {$location},
1570 xp|token => {$token},
1571 infoset|prefix => {$lname},
1572 infoset|namespaceName => {$nsuri},
1573 }__;
1574 unless ($continue) {
1575 __CODE{ParseError}__;
1576 }
1577 }
1578 $ns->{$lname} = $nsuri;
1579 delete $ns->{$lname} unless length $ns->{$lname};
1580 }
1581 $gattr{$pfx}->{$lname} = $attrs->{$atqname};
1582 } else { ## Local attribute
1583 if ($pfx eq 'xmlns') {
1584 $ns->{''} = $attrs->{xmlns}->{is_default}
1585 ? $attrs->{xmlns}->{def}-><AG::Node.nodeValue>
1586 : $attrs->{xmlns}->{value};
1587 if (not $attrs->{$atqname}->{is_default} and
1588 $attrs->{$atqname}->{def}) {
1589 my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;
1590 if ({
1591 <C::ATDef.ID_ATTR> => true,
1592 <C::ATDef.IDREF_ATTR> => true,
1593 <C::ATDef.IDREFS_ATTR> => true,
1594 <C::ATDef.ENTITY_ATTR> => true,
1595 <C::ATDef.ENTITIES_ATTR> => true,
1596 <C::ATDef.NMTOKEN_ATTR> => true,
1597 <C::ATDef.NMTOKENS_ATTR> => true,
1598 <C::ATDef.NOTATION_ATTR> => true,
1599 <C::ATDef.ENUMERATION_ATTR> => true,
1600 }->{$dt}) {
1601 ## Tokenization (XML 1 3.3.3)
1602 for ($ns->{''}) {
1603 s/^\x20+//;
1604 s/\x20+\z//;
1605 s/\x20+/ /g;
1606 }
1607 }
1608 }
1609 unless ($ns->{''}) {
1610 delete $ns->{''};
1611 } elsif ($ns->{''} eq <Q::xml:>) {
1612 my $location;
1613 __CODE{xp|get-location-from-token::
1614 $token => $token,
1615 $result => $location,
1616 }__;
1617 my $continue = __c|ERROR{
1618 xp|nsc-reserved-namespace-name-xml::
1619 c|location => {$location},
1620 xp|token => {$token},
1621 infoset|prefix => {null},
1622 infoset|namespaceName => {<Q::xml:>},
1623 }__;
1624 unless ($continue) {
1625 __CODE{ParseError}__;
1626 }
1627 } elsif ($ns->{''} eq <Q::xmlns:>) {
1628 my $location;
1629 __CODE{xp|get-location-from-token::
1630 $token => $token,
1631 $result => $location,
1632 }__;
1633 my $continue = __c|ERROR{
1634 xp|nsc-reserved-namespace-name-xmlns::
1635 c|location => {$location},
1636 xp|token => {$token},
1637 infoset|prefix => {null},
1638 infoset|namespaceName => {<Q::xmlns:>},
1639 }__;
1640 unless ($continue) {
1641 __CODE{ParseError}__;
1642 }
1643 }
1644 } else {
1645 $lattr{$pfx} = $attrs->{$atqname};
1646 }
1647 }
1648 }
1649
1650 my ($pfx, $lname) = split /:/, $type;
1651 my $nsuri;
1652 if (defined $lname) { ## Prefixed namespace
1653 if (defined $ns->{$pfx}) {
1654 $nsuri = $ns->{$pfx};
1655 } else {
1656 my $location;
1657 __CODE{xp|get-location-from-token::
1658 $token => $token,
1659 $result => $location,
1660 }__;
1661 my $continue = __c|ERROR{xp|nsc-prefix-declared::
1662 c|location => {$location},
1663 xp|token => {$token},
1664 infoset|prefix => {$pfx},
1665 xp|name => {$type},
1666 }__;
1667 unless ($continue) {
1668 __CODE{ParseError}__;
1669 }
1670 }
1671 } else { ## Default namespace
1672 $nsuri = $ns->{''};
1673 }
1674
1675 $el = $doc-><M::Document.createElementNS>
1676 ($nsuri, $type);
1677
1678 if ($attrs->{xmlns}) {
1679 my $attr = $doc-><M::Document.createAttributeNS>
1680 (<Q::xmlns:>, 'xmlns');
1681 for (@{$attrs->{xmlns}->{nodes}}) {
1682 $attr-><M::Node.appendChild> ($_);
1683 }
1684 if ($attrs->{xmlns}->{def}) {
1685 __CODE{t|setAttrType::
1686 $attr => $attr,
1687 $type => {$attrs->{xmlns}->{def}-><AG::ATDef.declaredType>},
1688 }__;
1689 }
1690 $el-><M::Element.setAttributeNodeNS> ($attr);
1691 $attr-><AS::t|Attr.specified> (false)
1692 if $attrs->{xmlns}->{is_default};
1693 }
1694
1695 for my $lname (keys %lattr) {
1696 my $attr = $doc-><M::Document.createAttributeNS>
1697 (null, $lname);
1698 for (@{$lattr{$lname}->{nodes}}) {
1699 $attr-><M::Node.appendChild> ($_);
1700 }
1701 if ($attrs->{$lname}->{def}) {
1702 __CODE{t|setAttrType::
1703 $attr => $attr,
1704 $type => {$attrs->{$lname}->{def}-><AG::ATDef.declaredType>},
1705 }__;
1706 }
1707 $el-><M::Element.setAttributeNodeNS> ($attr);
1708 $attr-><AS::t|Attr.specified> (false)
1709 if $attrs->{$lname}->{is_default};
1710 }
1711
1712 for my $pfx (keys %gattr) {
1713 LN: for my $lname (keys %{$gattr{$pfx}}) {
1714 my $name = $pfx.':'.$lname;
1715 unless (defined $ns->{$pfx}) {
1716 my $location;
1717 __CODE{xp|get-location-from-token::
1718 $token => $token,
1719 $result => $location,
1720 }__;
1721 my $continue = __c|ERROR{xp|nsc-prefix-declared::
1722 c|location => {$location},
1723 xp|token => {$token},
1724 xp|name => {$name},
1725 infoset|prefix => {$pfx},
1726 }__;
1727 unless ($continue) {
1728 __CODE{ParseError}__;
1729 }
1730 }
1731 my $attr = $el-><M::Element.getAttributeNodeNS>
1732 ($ns->{$pfx}, $lname);
1733 if ($attr) {
1734 my $another_name = $attr-><AG::Node.nodeName>;
1735 if ($name ne $another_name) {
1736 my $location;
1737 __CODE{xp|get-location-from-token::
1738 $token => $token,
1739 $result => $location,
1740 }__;
1741 my $continue = __c|ERROR{
1742 xp|nswf-unique-att-spec-expanded-name::
1743 c|location => {$location},
1744 xp|token => {$token},
1745 xp|another-attribute-name => {$another_name},
1746 xp|name => {$name},
1747 infoset|namespaceName => {$ns->{$pfx}},
1748 infoset|localName => {$lname},
1749 }__;
1750 unless ($continue) {
1751 __CODE{ParseError}__;
1752 }
1753 unless ($attr-><AG::t|Attr.specified>) {
1754 ## It is a default attribute
1755 $attr = $doc-><M::Document.createAttributeNS>
1756 ($ns->{$pfx}, $name);
1757 } else {
1758 ## It is a specified attribute
1759 next LN;
1760 }
1761 } else { ## There is default attribute
1762 $attr = $doc-><M::Document.createAttributeNS>
1763 ($ns->{$pfx}, $name);
1764 }
1765 } else {
1766 $attr = $doc-><M::Document.createAttributeNS>
1767 ($ns->{$pfx}, $name);
1768 }
1769 for (@{$gattr{$pfx}->{$lname}->{nodes}}) {
1770 $attr-><M::Node.appendChild> ($_);
1771 }
1772 if ($gattr{$pfx}->{$lname}->{def}) {
1773 __CODE{t|setAttrType::
1774 $attr => $attr,
1775 $type => {$gattr{$pfx}->{$lname}
1776 ->{def}-><AG::ATDef.declaredType>},
1777 }__;
1778 }
1779 $el-><M::Element.setAttributeNodeNS> ($attr);
1780 $attr-><AS::t|Attr.specified> (false)
1781 if $gattr{$pfx}->{$lname}->{is_default};
1782 } # PFX
1783 }
1784
1785 $node-><M::Node.appendChild> ($el);
1786 }
1787
1788 ~ (TAGC) {
1789 lang:Perl {
1790 push @{$nodes}, $node;
1791 $node = $el;
1792 }
1793 ?lexmode ElementContent;
1794 } (NESTC) {
1795 my $is_docel;
1796 lang:Perl {
1797 $ns = pop @{$nses};
1798 $type = pop @{$types};
1799 $is_docel = (@{$types} == 0);
1800 }
1801
1802 if-true ($is_docel) {
1803 return;
1804 }
1805
1806 ~ (TAGC) {
1807 ?lexmode ElementContent;
1808 } else {
1809 ?lexmode ElementContent;
1810 }
1811 } else {
1812 ?lexmode ElementContent;
1813 }
1814 } else {
1815 ?lexmode ElementContent;
1816 }
1817
1818 } (ETAGO) {
1819 // End tag
1820
1821 ?lexmode 'EndTag';
1822
1823 my $is_docel;
1824
1825 ~ (Name) {
1826 // No NCName & QName check (it must match to start-tag)
1827 lang:Perl ($name => $token.value) : has-error {
1828 if ($name eq $type) {
1829 $type = pop @{$types};
1830 if ($type eq '') {
1831 $is_docel = true;
1832 }
1833 $node = pop @{$nodes};
1834 $ns = pop @{$nses};
1835 } else {
1836 my $location;
1837 __CODE{xp|get-location-from-token::
1838 $token => $token,
1839 $result => $location,
1840 }__;
1841 my $continue = __DOMCore:ERROR{xp|wf-element-type-match::
1842 DOMCore:location => {$location},
1843 xp|token => {$token},
1844 xp|expected-element-type => {$type},
1845 xp|actual-element-type => {$name},
1846 xp|node => {$node},
1847 }__;
1848 unless ($continue) {
1849 __CODE{ParseError}__;
1850 }
1851 }
1852 }
1853 }
1854
1855 ~? (S) { }
1856
1857 if-true ($is_docel) {
1858 lang:Perl : has-error {
1859 if (@{$types}) {
1860 my $location;
1861 __CODE{xp|get-location-from-token::
1862 $token => $token,
1863 $result => $location,
1864 }__;
1865 for my $type (reverse @{$types}) {
1866 my $continue = __DOMCore:ERROR{xp|wf-no-end-tag::
1867 DOMCore:location => {$location},
1868 xp|token => {$token},
1869 xp|expected-element-type => {$type},
1870 xp|node => {$node},
1871 }__;
1872 unless ($continue) {
1873 __CODE{ParseError}__;
1874 }
1875 $node = shift @{$nodes};
1876 }
1877 }
1878 }
1879 return;
1880 }
1881
1882 ~ (TAGC) {
1883 ?lexmode ElementContent;
1884 } else {
1885 ?lexmode 'ElementContent';
1886 }
1887
1888 } (HCRO) {
1889 &_HexadecimalCharacterReference_
1890 ($doc => $doc, $parent => $node);
1891
1892 ~ (REFC) {
1893 ?lexmode 'ElementContent';
1894 } else {
1895 ?lexmode ElementContent;
1896 }
1897 } (CRO) {
1898 &_NumericCharacterReference_
1899 ($doc => $doc, $parent => $node);
1900
1901 ~ (REFC) {
1902 ?lexmode 'ElementContent';
1903 } else {
1904 ?lexmode ElementContent;
1905 }
1906 } (ERO) {
1907 &_GeneralEntityReferenceEC
1908 ($doc => $doc, $parent => $node, $ns => $ns);
1909 } (CDO) {
1910 &_CommentDeclaration_ ($doc => $doc, $parent => $node);
1911
1912 ~ (MDC) {
1913 ?lexmode ElementContent;
1914 } else {
1915 ?lexmode ElementContent;
1916 }
1917 } (CDSO) {
1918 &_CDATASection_ ($doc => $doc, $parent => $node);
1919
1920 ~ (MSE) {
1921 ?lexmode 'ElementContent';
1922 } else {
1923 ?lexmode ElementContent;
1924 }
1925 } (PIO) {
1926 &_ProcessingInstruction_ ($doc => $doc, $parent => $node);
1927
1928 ~ (PIC) {
1929 ?lexmode 'ElementContent';
1930 } else {
1931 ?lexmode ElementContent;
1932 }
1933 }
1934
1935 ~ (#NONE) { }
1936 } // Element_
1937
1938 /*
1939 content := [CharData]
1940 *((element / Reference / CDSect / PI / Comment) [CharData])
1941 */
1942 rule content ($parent, $ns) {
1943 // ?lexmode ElementContent;
1944
1945 my $doc;
1946 lang:Perl {
1947 $doc = $self->{doc};
1948 }
1949
1950 ~* (CharData) {
1951 lang:Perl ($data => $token.value) {
1952 $parent-><M::Node.appendChild>
1953 ($self->{doc}-><M::Document.createTextNode> ($data));
1954 }
1955 } (STAGO) {
1956 &Element_ ($doc => $doc, $parent => $parent, $ns => $ns)
1957 : unshift-current-token;
1958 ~ (TAGC) {
1959 ?lexmode ElementContent;
1960 } else {
1961 ?lexmode ElementContent;
1962 }
1963 } (HCRO) {
1964 &_HexadecimalCharacterReference_
1965 ($doc => $doc, $parent => $parent);
1966
1967 ~ (REFC) {
1968 ?lexmode 'ElementContent';
1969 } else {
1970 ?lexmode ElementContent;
1971 }
1972 } (CRO) {
1973 &_NumericCharacterReference_
1974 ($doc => $doc, $parent => $parent);
1975
1976 ~ (REFC) {
1977 ?lexmode 'ElementContent';
1978 } else {
1979 ?lexmode ElementContent;
1980 }
1981 } (ERO) {
1982 &_GeneralEntityReferenceEC
1983 ($doc => $doc, $parent => $parent, $ns => $ns);
1984 } (CDO) {
1985 &_CommentDeclaration_ ($doc => $doc, $parent => $parent);
1986
1987 ~ (MDC) {
1988 ?lexmode ElementContent;
1989 } else {
1990 ?lexmode ElementContent;
1991 }
1992 } (CDSO) {
1993 &_CDATASection_ ($doc => $doc, $parent => $parent);
1994
1995 ~ (MSE) {
1996 ?lexmode 'ElementContent';
1997 } else {
1998 ?lexmode ElementContent;
1999 }
2000 } (PIO) {
2001 &_ProcessingInstruction_ ($doc => $doc, $parent => $parent);
2002
2003 ~ (PIC) {
2004 ?lexmode 'ElementContent';
2005 } else {
2006 ?lexmode ElementContent;
2007 }
2008 }
2009 } // content
2010
2011 rule AttributeSpecificationList ($doc, $attrs)
2012 : standalone
2013 {
2014 ?lexmode 'StartTag';
2015
2016 my $i;
2017 lang:Perl {
2018 $i = 0;
2019 }
2020
2021 ~* (Name) {
2022 my $atqname;
2023 lang:Perl ($name => $token.value) : has-error {
2024 __CODE{checkQName:: $name => $name}__;
2025 $atqname = $name;
2026 }
2027
2028 my $vals;
2029 lang:Perl : has-error {
2030 if ($attrs->{$atqname}) {
2031 my $location;
2032 __CODE{xp|get-location-from-token::
2033 $token => $token,
2034 $result => $location,
2035 }__;
2036 my $continue = __DOMCore:ERROR{xp|wf-unique-att-spec::
2037 DOMCore:location => {$location},
2038 xp|token => {$token},
2039 xp|name => {$atqname},
2040 }__;
2041 unless ($continue) {
2042 __CODE{ParseError}__;
2043 }
2044 }
2045
2046 $vals = $attrs->{$atqname} = {
2047 nodes => [],
2048 value => '',
2049 index => $i++,
2050 };
2051 }
2052
2053 ~? (S) { }
2054 ~ (VI) { }
2055 ~? (S) { }
2056
2057 ~ (LIT) {
2058 &_AttributeValueSpecification_
2059 ($doc => $doc, $vals => $vals);
2060
2061 ~ (LIT) {
2062 ?lexmode StartTag;
2063 } else {
2064 ?lexmode StartTag;
2065 }
2066 } (LITA) {
2067 &_AttributeValueSpecificationA_
2068 ($doc => $doc, $vals => $vals);
2069
2070 ~ (LITA) {
2071 ?lexmode StartTag;
2072 } else {
2073 ?lexmode StartTag;
2074 }
2075 }
2076 } (S) : separator : terminator? { }
2077 } // AttributeSpecificationList
2078
2079 rule _AttributeValueSpecification_ ($doc, $vals) {
2080 // ~ (LIT) { }
2081 ?lexmode 'AttributeValueLiteral';
2082
2083 ~* (STRING) {
2084 lang:Perl ($value => $token.value) {
2085 $value =~ s/[\x09\x0A\x0D]/ /g;
2086 my $text = $doc-><M::Document.createTextNode> ($value);
2087 push @{$vals->{nodes}}, $text;
2088 $vals->{value} .= $value;
2089 }
2090 } (HCRO) {
2091 &_HexadecimalCharacterReferenceV_
2092 ($doc => $doc, $vals => $vals);
2093
2094 ~ (REFC) {
2095 ?lexmode AttributeValueLiteral;
2096 } else {
2097 ?lexmode AttributeValueLiteral;
2098 }
2099 } (CRO) {
2100 &_NumericCharacterReferenceV_
2101 ($doc => $doc, $vals => $vals);
2102
2103 ~ (REFC) {
2104 ?lexmode AttributeValueLiteral;
2105 } else {
2106 ?lexmode AttributeValueLiteral;
2107 }
2108 } (ERO) {
2109 // TODO: Attribute value normalization
2110 &_GeneralEntityReferenceV_
2111 ($doc => $doc, $vals => $vals);
2112
2113 ~ (REFC) {
2114 ?lexmode AttributeValueLiteral;
2115 } else {
2116 ?lexmode AttributeValueLiteral;
2117 }
2118 }
2119
2120 // ~ (LIT) { } (LITA) { }
2121 } // _AttributeValueSpecification_
2122
2123 rule _AttributeValueSpecificationA_ ($doc, $vals) {
2124 // ~ (LITA) { }
2125 ?lexmode 'AttributeValueLiteralA';
2126
2127 ~* (STRING) {
2128 lang:Perl ($value => $token.value) {
2129 $value =~ s/[\x09\x0A\x0D]/ /g;
2130 my $text = $doc-><M::Document.createTextNode> ($value);
2131 push @{$vals->{nodes}}, $text;
2132 $vals->{value} .= $value;
2133 }
2134 } (HCRO) {
2135 &_HexadecimalCharacterReferenceV_
2136 ($doc => $doc, $vals => $vals);
2137
2138 ~ (REFC) {
2139 ?lexmode AttributeValueLiteralA;
2140 } else {
2141 ?lexmode AttributeValueLiteralA;
2142 }
2143 } (CRO) {
2144 &_NumericCharacterReferenceV_
2145 ($doc => $doc, $vals => $vals);
2146
2147 ~ (REFC) {
2148 ?lexmode AttributeValueLiteralA;
2149 } else {
2150 ?lexmode AttributeValueLiteralA;
2151 }
2152 } (ERO) {
2153 // TODO: Attribute value normalization
2154 &_GeneralEntityReferenceV_
2155 ($doc => $doc, $vals => $vals);
2156
2157 ~ (REFC) {
2158 ?lexmode AttributeValueLiteralA;
2159 } else {
2160 ?lexmode AttributeValueLiteralA;
2161 }
2162 }
2163
2164 // ~ (LITA) { }
2165 } // _AttributeValueSpecificationA_
2166
2167 /*
2168 Parsing replacement text of an entity referenced in
2169 an attribute value specification.
2170 */
2171 rule AttributeValueLiteralE_ ($parent, $vals)
2172 : recursive
2173 {
2174 // ?lexmode AttributeValueLiteralE;
2175
2176 ~* (STRING) {
2177 lang:Perl ($value => $token.value) {
2178 $value =~ s/[\x09\x0A\x0D]/ /g;
2179 my $text = $self->{doc}-><M::Document.createTextNode> ($value);
2180 $parent-><M::Node.appendChild> ($text);
2181 $vals->{value} .= $value;
2182 }
2183 } (HCRO) {
2184 &_HexadecimalCharacterReferenceAE_
2185 ($parent => $parent, $vals => $vals);
2186
2187 ~ (REFC) {
2188 ?lexmode AttributeValueLiteralE;
2189 } else {
2190 ?lexmode AttributeValueLiteralE;
2191 }
2192 } (CRO) {
2193 &_NumericCharacterReferenceAE_
2194 ($parent => $parent, $vals => $vals);
2195
2196 ~ (REFC) {
2197 ?lexmode AttributeValueLiteralE;
2198 } else {
2199 ?lexmode AttributeValueLiteralE;
2200 }
2201 } (ERO) {
2202 &_GeneralEntityReferenceAE_ ($parent => $parent, $vals => $vals);
2203
2204 ~ (REFC) {
2205 ?lexmode AttributeValueLiteralE;
2206 } else {
2207 ?lexmode AttributeValueLiteralE;
2208 }
2209 } (#INVALID == '<') {
2210 lang:Perl : has-error {
2211 my $location;
2212 __CODE{xp|get-location-from-token::
2213 $token => $token,
2214 $result => $location,
2215 }__;
2216 my $continue = __DOMCore:ERROR{xp|wf-no-lt-in-attribute-values::
2217 c|location => {$location},
2218 xp|token => {$token},
2219 }__;
2220 unless ($continue) {
2221 __CODE{ParseError}__;
2222 }
2223
2224 my $text = $self->{doc}-><M::Document.createTextNode> ('<');
2225 $parent-><M::Node.appendChild> ($text);
2226 $vals->{value} .= '<';
2227 }
2228 }
2229
2230 // ~ (#EOF) { }
2231 } // AttributeValueLiteralE_
2232
2233 /*
2234 CDATA Section Content Parsing Mode
2235 */
2236 rule _CDATASection_ ($doc, $parent) {
2237 ?lexmode 'CDATASectionContent';
2238
2239 my $cdata;
2240
2241 ~? (CData) {
2242 lang:Perl ($data => $token.value) {
2243 $cdata = $data;
2244 }
2245 } else {
2246 lang:Perl {
2247 $cdata = '';
2248 }
2249 }
2250
2251 lang:Perl {
2252 my $cdsect = $doc-><M::Document.createCDATASection>
2253 ($cdata);
2254 $parent-><M::Node.appendChild> ($cdsect);
2255 }
2256
2257 // ~ (MSE) { }
2258 } // _CDATASection_
2259
2260 rule _NumericCharacterReference_ ($doc, $parent) {
2261 ?lexmode 'NumericCharacterReference';
2262
2263 ~ (NUMBER) {
2264 lang:Perl ($num => $token.value) : has-error {
2265 $num += 0;
2266 unless (
2267 ($self->{xml_version} eq '1.0' and
2268 ((0x0020 <= $num and $num <= 0xD7FF) or
2269 (0xE000 <= $num and $num <= 0xFFFD) or
2270 (0x10000 <= $num and $num <= 0x10FFFF) or
2271 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2272 ($self->{xml_version} eq '1.1' and
2273 ((0x0001 <= $num and $num <= 0xD7FF) or
2274 (0xE000 <= $num and $num <= 0xFFFD) or
2275 (0x10000 <= $num and $num <= 0x10FFFF)))
2276 ) {
2277 my $location;
2278 __CODE{xp|get-location-from-token::
2279 $token => $token,
2280 $result => $location,
2281 }__;
2282 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2283 DOMCore:location => {$location},
2284 xp|token => {$token},
2285 xp|character-number => {$num},
2286 xp|parent => {$parent},
2287 }__;
2288 unless ($continue) {
2289 __CODE{ParseError}__;
2290 }
2291 }
2292 my $ncr = $doc-><M::Document.createTextNode> (chr $num);
2293 $parent-><M::Node.appendChild> ($ncr);
2294 }
2295 }
2296
2297 // ~ (REFC) { }
2298 } // _NumericCharacterReference_
2299
2300 rule _NumericCharacterReferenceV_ ($doc, $vals) {
2301 ?lexmode 'NumericCharacterReference';
2302
2303 ~ (NUMBER) {
2304 lang:Perl ($num => $token.value) : has-error {
2305 $num += 0;
2306 unless (
2307 ($self->{xml_version} eq '1.0' and
2308 ((0x0020 <= $num and $num <= 0xD7FF) or
2309 (0xE000 <= $num and $num <= 0xFFFD) or
2310 (0x10000 <= $num and $num <= 0x10FFFF) or
2311 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2312 ($self->{xml_version} eq '1.1' and
2313 ((0x0001 <= $num and $num <= 0xD7FF) or
2314 (0xE000 <= $num and $num <= 0xFFFD) or
2315 (0x10000 <= $num and $num <= 0x10FFFF)))
2316 ) {
2317 my $location;
2318 __CODE{xp|get-location-from-token::
2319 $token => $token,
2320 $result => $location,
2321 }__;
2322 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2323 DOMCore:location => {$location},
2324 xp|token => {$token},
2325 xp|character-number => {$num},
2326 }__;
2327 unless ($continue) {
2328 __CODE{ParseError}__;
2329 }
2330 }
2331 my $ncr = $doc-><M::Document.createTextNode>
2332 (my $char = chr $num);
2333 push @{$vals->{nodes}}, $ncr;
2334 $vals->{value} .= $char;
2335 }
2336 }
2337
2338 // ~ (REFC) { }
2339 } // _NumericCharacterReferenceV_
2340
2341 /*
2342 Numeric character reference in the replacement text
2343 of the entity referenced in an attribute value specification
2344 */
2345 rule _NumericCharacterReferenceAE_ ($parent, $vals)
2346 {
2347 ?lexmode NumericCharacterReference;
2348
2349 ~ (NUMBER) {
2350 lang:Perl ($num => $token.value) : has-error {
2351 $num += 0;
2352 unless (
2353 ($self->{xml_version} eq '1.0' and
2354 ((0x0020 <= $num and $num <= 0xD7FF) or
2355 (0xE000 <= $num and $num <= 0xFFFD) or
2356 (0x10000 <= $num and $num <= 0x10FFFF) or
2357 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2358 ($self->{xml_version} eq '1.1' and
2359 ((0x0001 <= $num and $num <= 0xD7FF) or
2360 (0xE000 <= $num and $num <= 0xFFFD) or
2361 (0x10000 <= $num and $num <= 0x10FFFF)))
2362 ) {
2363 my $location;
2364 __CODE{xp|get-location-from-token::
2365 $token => $token,
2366 $result => $location,
2367 }__;
2368 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2369 DOMCore:location => {$location},
2370 xp|token => {$token},
2371 xp|character-number => {$num},
2372 }__;
2373 unless ($continue) {
2374 __CODE{ParseError}__;
2375 }
2376 }
2377 my $ncr = $self->{doc}-><M::Document.createTextNode>
2378 (my $char = chr $num);
2379 $parent-><M::Node.appendChild> ($ncr);
2380 $vals->{value} .= $char;
2381 }
2382 }
2383
2384 // ~ (REFC) { }
2385 } // _NumericCharacterReferenceAE_
2386
2387 rule _NumericCharacterReferenceEV_ ($vals)
2388 {
2389 ?lexmode 'NumericCharacterReference';
2390
2391 ~ (NUMBER) {
2392 lang:Perl ($num => $token.value) : has-error {
2393 $num += 0;
2394 unless (
2395 ($self->{xml_version} eq '1.0' and
2396 ((0x0020 <= $num and $num <= 0xD7FF) or
2397 (0xE000 <= $num and $num <= 0xFFFD) or
2398 (0x10000 <= $num and $num <= 0x10FFFF) or
2399 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2400 ($self->{xml_version} eq '1.1' and
2401 ((0x0001 <= $num and $num <= 0xD7FF) or
2402 (0xE000 <= $num and $num <= 0xFFFD) or
2403 (0x10000 <= $num and $num <= 0x10FFFF)))
2404 ) {
2405 my $location;
2406 __CODE{xp|get-location-from-token::
2407 $token => $token,
2408 $result => $location,
2409 }__;
2410 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2411 DOMCore:location => {$location},
2412 xp|token => {$token},
2413 xp|character-number => {$num},
2414 }__;
2415 unless ($continue) {
2416 __CODE{ParseError}__;
2417 }
2418 }
2419 push @{$vals}, chr $num;
2420 }
2421 }
2422
2423 // ~ (REFC) { }
2424 } // _NumericCharacterReferenceEV_
2425
2426 rule _HexadecimalCharacterReference_ ($doc, $parent) {
2427 ?lexmode 'HexadecimalCharacterReference';
2428
2429 ~ (Hex) {
2430 lang:Perl ($v => $token.value) : has-error {
2431 my $num = hex $v;
2432 unless (
2433 ($self->{xml_version} eq '1.0' and
2434 ((0x0020 <= $num and $num <= 0xD7FF) or
2435 (0xE000 <= $num and $num <= 0xFFFD) or
2436 (0x10000 <= $num and $num <= 0x10FFFF) or
2437 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2438 ($self->{xml_version} eq '1.1' and
2439 ((0x0001 <= $num and $num <= 0xD7FF) or
2440 (0xE000 <= $num and $num <= 0xFFFD) or
2441 (0x10000 <= $num and $num <= 0x10FFFF)))
2442 ) {
2443 my $location;
2444 __CODE{xp|get-location-from-token::
2445 $token => $token,
2446 $result => $location,
2447 }__;
2448 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2449 DOMCore:location => {$location},
2450 xp|token => {$token},
2451 xp|character-number => {$num},
2452 xp|parent => {$parent},
2453 }__;
2454 unless ($continue) {
2455 __CODE{ParseError}__;
2456 }
2457 }
2458 my $ncr = $doc-><M::Document.createTextNode>
2459 (chr $num);
2460 $parent-><M::Node.appendChild> ($ncr);
2461 }
2462 }
2463
2464 // ~ (REFC) { }
2465 } // _HexadecimalCharacterReference_
2466
2467 rule _HexadecimalCharacterReferenceV_ ($doc, $vals) {
2468 ?lexmode 'HexadecimalCharacterReference';
2469
2470 ~ (Hex) {
2471 lang:Perl ($v => $token.value) : has-error {
2472 my $num = hex $v;
2473 unless (
2474 ($self->{xml_version} eq '1.0' and
2475 ((0x0020 <= $num and $num <= 0xD7FF) or
2476 (0xE000 <= $num and $num <= 0xFFFD) or
2477 (0x10000 <= $num and $num <= 0x10FFFF) or
2478 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2479 ($self->{xml_version} eq '1.1' and
2480 ((0x0001 <= $num and $num <= 0xD7FF) or
2481 (0xE000 <= $num and $num <= 0xFFFD) or
2482 (0x10000 <= $num and $num <= 0x10FFFF)))
2483 ) {
2484 my $location;
2485 __CODE{xp|get-location-from-token::
2486 $token => $token,
2487 $result => $location,
2488 }__;
2489 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2490 DOMCore:location => {$location},
2491 xp|token => {$token},
2492 xp|character-number => {$num},
2493 }__;
2494 unless ($continue) {
2495 __CODE{ParseError}__;
2496 }
2497 }
2498 my $ncr = $doc-><M::Document.createTextNode>
2499 (my $char = chr $num);
2500 push @{$vals->{nodes}}, $ncr;
2501 $vals->{value} .= $char;
2502 }
2503 }
2504
2505 // ~ (REFC) { }
2506 } // _HexadecimalCharacterReferenceV_
2507
2508 /*
2509 Hexadecimal character reference in the replacement text
2510 of the entity referenced in an attribute value literal
2511 */
2512 rule _HexadecimalCharacterReferenceAE_ ($parent, $vals)
2513 {
2514 ?lexmode HexadecimalCharacterReference;
2515
2516 ~ (Hex) {
2517 lang:Perl ($v => $token.value) : has-error {
2518 my $num = hex $v;
2519 unless (
2520 ($self->{xml_version} eq '1.0' and
2521 ((0x0020 <= $num and $num <= 0xD7FF) or
2522 (0xE000 <= $num and $num <= 0xFFFD) or
2523 (0x10000 <= $num and $num <= 0x10FFFF) or
2524 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2525 ($self->{xml_version} eq '1.1' and
2526 ((0x0001 <= $num and $num <= 0xD7FF) or
2527 (0xE000 <= $num and $num <= 0xFFFD) or
2528 (0x10000 <= $num and $num <= 0x10FFFF)))
2529 ) {
2530 my $location;
2531 __CODE{xp|get-location-from-token::
2532 $token => $token,
2533 $result => $location,
2534 }__;
2535 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2536 DOMCore:location => {$location},
2537 xp|token => {$token},
2538 xp|character-number => {$num},
2539 }__;
2540 unless ($continue) {
2541 __CODE{ParseError}__;
2542 }
2543 }
2544 my $ncr = $self->{doc}-><M::Document.createTextNode>
2545 (my $char = chr $num);
2546 $parent-><M::Node.appendChild> ($ncr);
2547 $vals->{value} .= $char;
2548 }
2549 }
2550
2551 // ~ (REFC) { }
2552 } // _HexadecimalCharacterReferenceAE_
2553
2554 rule _HexadecimalCharacterReferenceEV_ ($vals) {
2555 ?lexmode HexadecimalCharacterReference;
2556
2557 ~ (Hex) {
2558 lang:Perl ($v => $token.value) : has-error {
2559 my $num = hex $v;
2560 unless (
2561 ($self->{xml_version} eq '1.0' and
2562 ((0x0020 <= $num and $num <= 0xD7FF) or
2563 (0xE000 <= $num and $num <= 0xFFFD) or
2564 (0x10000 <= $num and $num <= 0x10FFFF) or
2565 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2566 ($self->{xml_version} eq '1.1' and
2567 ((0x0001 <= $num and $num <= 0xD7FF) or
2568 (0xE000 <= $num and $num <= 0xFFFD) or
2569 (0x10000 <= $num and $num <= 0x10FFFF)))
2570 ) {
2571 my $location;
2572 __CODE{xp|get-location-from-token::
2573 $token => $token,
2574 $result => $location,
2575 }__;
2576 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2577 DOMCore:location => {$location},
2578 xp|token => {$token},
2579 xp|character-number => {$num},
2580 }__;
2581 unless ($continue) {
2582 __CODE{ParseError}__;
2583 }
2584 }
2585 push @{$vals}, chr $num;
2586 }
2587 }
2588
2589 // ~ (REFC) { }
2590 } // _HexadecimalCharacterReferenceEV_
2591
2592 /*
2593 General entity reference in element's content
2594 */
2595 rule _GeneralEntityReferenceEC ($doc, $parent, $ns)
2596 : recursive
2597 {
2598 ?lexmode 'EntityReference';
2599
2600 ~ (Name == 'lt') {
2601 lang:Perl {
2602 $parent-><M::Node.appendChild>
2603 ($self->{doc}-><M::Document.createTextNode> ('<'));
2604 }
2605 } (Name == 'gt') {
2606 lang:Perl {
2607 $parent-><M::Node.appendChild>
2608 ($self->{doc}-><M::Document.createTextNode> ('>'));
2609 }
2610 } (Name == 'amp') {
2611 lang:Perl {
2612 $parent-><M::Node.appendChild>
2613 ($self->{doc}-><M::Document.createTextNode> ('&'));
2614 }
2615 } (Name == 'quot') {
2616 lang:Perl {
2617 $parent-><M::Node.appendChild>
2618 ($self->{doc}-><M::Document.createTextNode> ('"'));
2619 }
2620 } (Name == 'apos') {
2621 lang:Perl {
2622 $parent-><M::Node.appendChild>
2623 ($self->{doc}-><M::Document.createTextNode> ("'"));
2624 }
2625 } (Name) {
2626 my $er;
2627 lang:Perl ($name => $token.value) : has-error {
2628 __CODE{checkNCName:: $name => $name}__;
2629
2630 $er = $doc-><M::Document.createEntityReference>
2631 ($name);
2632 $er-><AS::Node.textContent> ('');
2633 ## NOTE: When document entity (and entities referenced directly
2634 ## or indirectly from it) is parsed, no general entity
2635 ## node have its replacement tree. During general
2636 ## entity node collection construction, however,
2637 ## some entity node has replacement tree.
2638 $parent-><M::Node.appendChild> ($er);
2639
2640 my $ent = $self->{general_entity}->{$name};
2641 if (not $ent) { # no entity declaration
2642 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2643 my $location;
2644 __CODE{xp|get-location-from-token::
2645 $token => {$token},
2646 $result => {$location},
2647 }__;
2648 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2649 xp|error-token => {$token},
2650 c|location => {$location},
2651 xp|name => {$name},
2652 }__;
2653 unless ($continue) {
2654 __CODE{ParseError}__;
2655 }
2656 } # Otherwise VC error
2657 push @{$self->{entity}}, <Code::getEmptyEntityState::
2658 $name = $name>;
2659 $er-><AS::x|EntityReference.isExpanded> (false);
2660
2661 } else { # there IS entity declaration
2662 if (($self->{standalone} or not $self->{has_xref}) and
2663 $ent->{is_externally_declared} and
2664 not $self->{entity}->[-1]->{is_externally_declared}) {
2665 my $location;
2666 __CODE{xp|get-location-from-token::
2667 $token => {$token},
2668 $result => {$location},
2669 }__;
2670 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2671 xp|error-token => {$token},
2672 c|location => {$location},
2673 xp|name => {$name},
2674 }__;
2675 unless ($continue) {
2676 __CODE{ParseError}__;
2677 }
2678 }
2679 $er-><AS::x|EntityReference.isExpanded>
2680 ($ent->{has_replacement_text});
2681 push @{$self->{entity}}, <Code::getCopyOfEntityState::
2682 $entity_type = 'general_entity',
2683 $entity_name = $name>;
2684
2685 if (defined $ent->{notation}) {
2686 my $location;
2687 __CODE{xp|get-location-from-token::
2688 $token => {$token},
2689 $result => {$location},
2690 }__;
2691 my $continue = __c|ERROR{xp|wf-parsed-entity::
2692 xp|error-token => {$token},
2693 c|location => {$location},
2694 xp|name => {$name},
2695 }__;
2696 unless ($continue) {
2697 __CODE{ParseError}__;
2698 }
2699 } # if unparsed entity
2700
2701 if ($ent->{is_opened}) {
2702 my $location;
2703 __CODE{xp|get-location-from-token::
2704 $token => {$token},
2705 $result => {$location},
2706 }__;
2707 my $continue = __c|ERROR{xp|wf-no-recursion::
2708 xp|error-token => {$token},
2709 c|location => {$location},
2710 xp|name => {$name},
2711 }__;
2712 unless ($continue) {
2713 __CODE{ParseError}__;
2714 }
2715 open my $empty, '<', \'';
2716 $self->{entity}->[-1]->{fh} = $empty;
2717 $er-><AS::x|EntityReference.isExpanded> (false);
2718 } # recursive
2719 $ent->{is_opened} = true;
2720 } # entity declared
2721 $self->{location} = $self->{entity}->[-1];
2722 push @{$self->{entity_token}}, $self->{token};
2723 $self->{token} = [];
2724 push @{$self->{entity_char}}, $self->{char};
2725 $self->{char} = [];
2726 }
2727
2728 ?lexmode ElementContent;
2729 &content ($doc => $doc, $parent => $er, $ns => $ns);
2730 ~ (#EOF) { }
2731 lang:Perl {
2732 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2733 ->{is_opened} = false
2734 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2735 $self->{token} = pop @{$self->{entity_token}};
2736 $self->{char} = pop @{$self->{entity_char}};
2737 pop (@{$self->{entity}})->{close_file}->();
2738 $self->{location} = $self->{entity}->[-1];
2739 }
2740
2741 // TODO: Set read-only flag
2742
2743 ?lexmode EntityReference;
2744 ?requires-next-token;
2745 }
2746
2747 ~ (REFC) {
2748 ?lexmode ElementContent;
2749 } else {
2750 ?lexmode ElementContent;
2751 }
2752 } // _GeneralEntityReferenceEC
2753
2754 /*
2755 General entity reference in an attribute value literal
2756 */
2757 rule _GeneralEntityReferenceV_ ($vals) {
2758 ?lexmode EntityReference;
2759
2760 ~ (Name == 'lt') {
2761 lang:Perl {
2762 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2763 ('<');
2764 $vals->{value} .= '<';
2765 }
2766 } (Name == 'gt') {
2767 lang:Perl {
2768 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2769 ('>');
2770 $vals->{value} .= '>';
2771 }
2772 } (Name == 'amp') {
2773 lang:Perl {
2774 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2775 ('&');
2776 $vals->{value} .= '&';
2777 }
2778 } (Name == 'quot') {
2779 lang:Perl {
2780 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2781 ('"');
2782 $vals->{value} .= '"';
2783 }
2784 } (Name == 'apos') {
2785 lang:Perl {
2786 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2787 ("'");
2788 $vals->{value} .= "'";
2789 }
2790 } (Name) {
2791 my $er;
2792 lang:Perl ($name => $token.value) : has-error {
2793 __CODE{checkNCName:: $name => $name}__;
2794
2795 $er = $self->{doc}-><M::Document.createEntityReference> ($name);
2796 $er-><AS::Node.textContent> ('');
2797 ## NOTE: When document entity (and entities referenced directly
2798 ## or indirectly from it) is parsed, no general entity
2799 ## node have its replacement tree. During general
2800 ## entity node collection construction, however,
2801 ## some entity node has replacement tree.
2802 my $ent = $self->{general_entity}->{$name};
2803 if (not $ent) { # no entity declaration
2804 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2805 my $location;
2806 __CODE{xp|get-location-from-token::
2807 $token => {$token},
2808 $result => {$location},
2809 }__;
2810 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2811 xp|error-token => {$token},
2812 c|location => {$location},
2813 xp|name => {$name},
2814 }__;
2815 unless ($continue) {
2816 __CODE{ParseError}__;
2817 }
2818 } # Otherwise VC error
2819 push @{$self->{entity}}, <Code::getEmptyEntityState::
2820 $name = $name>;
2821 $er-><AS::x|EntityReference.isExpanded> (false);
2822
2823 } else { # there IS entity declaration
2824 if (($self->{standalone} or not $self->{has_xref}) and
2825 $ent->{is_externally_declared} and
2826 not $self->{entity}->[-1]->{is_externally_declared}) {
2827 my $location;
2828 __CODE{xp|get-location-from-token::
2829 $token => {$token},
2830 $result => {$location},
2831 }__;
2832 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2833 xp|error-token => {$token},
2834 c|location => {$location},
2835 xp|name => {$name},
2836 }__;
2837 unless ($continue) {
2838 __CODE{ParseError}__;
2839 }
2840 }
2841
2842 if ($ent->{is_external_entity}) {
2843 my $location;
2844 __CODE{xp|get-location-from-token::
2845 $token => {$token},
2846 $result => {$location},
2847 }__;
2848 my $continue = __c|ERROR{xp|wf-no-external-entity-references::
2849 xp|error-token => {$token},
2850 c|location => {$location},
2851 xp|name => {$name},
2852 }__;
2853 unless ($continue) {
2854 __CODE{ParseError}__;
2855 }
2856 ## NOTE: |xp:wf-parsed-entity| is not checked
2857 } # if external entity
2858
2859 $er-><AS::x|EntityReference.isExpanded>
2860 ($ent->{has_replacement_text});
2861 push @{$self->{entity}}, <Code::getCopyOfEntityState::
2862 $entity_type = 'general_entity',
2863 $entity_name = $name>;
2864
2865 if ($ent->{is_opened}) {
2866 my $location;
2867 __CODE{xp|get-location-from-token::
2868 $token => {$token},
2869 $result => {$location},
2870 }__;
2871 my $continue = __c|ERROR{xp|wf-no-recursion::
2872 xp|error-token => {$token},
2873 c|location => {$location},
2874 xp|name => {$name},
2875 }__;
2876 unless ($continue) {
2877 __CODE{ParseError}__;
2878 }
2879 open my $empty, '<', \'';
2880 $self->{entity}->[-1]->{fh} = $empty;
2881 $er-><AS::x|EntityReference.isExpanded> (false);
2882 } # recursive
2883 $ent->{is_opened} = true;
2884 }
2885 push @{$vals->{nodes}}, $er;
2886 $self->{location} = $self->{entity}->[-1];
2887 push @{$self->{entity_token}}, $self->{token};
2888 $self->{token} = [];
2889 push @{$self->{entity_char}}, $self->{char};
2890 $self->{char} = [];
2891 }
2892
2893 ?lexmode AttributeValueLiteralE;
2894 &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);
2895 ~ (#EOF) { }
2896 lang:Perl {
2897 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2898 ->{is_opened} = false
2899 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2900 $self->{token} = pop @{$self->{entity_token}};
2901 $self->{char} = pop @{$self->{entity_char}};
2902 pop (@{$self->{entity}})->{close_file}->();
2903 $self->{location} = $self->{entity}->[-1];
2904 }
2905
2906 // TODO: Set read-only flag
2907
2908 ?lexmode EntityReference;
2909 ?requires-next-token;
2910 }
2911
2912 // ~ (REFC) { }
2913 } // _GeneralEntityReferenceV_
2914
2915 /*
2916 General entity reference in the replacement text
2917 of the entity referenced in an attribute value literal
2918 */
2919 rule _GeneralEntityReferenceAE_ ($parent, $vals)
2920 {
2921 ?lexmode EntityReference;
2922
2923 ~ (Name == 'lt') {
2924 lang:Perl {
2925 $parent-><M::Node.appendChild>
2926 ($self->{doc}-><M::Document.createTextNode> ('<'));
2927 $vals->{value} .= '<';
2928 }
2929 } (Name == 'gt') {
2930 lang:Perl {
2931 $parent-><M::Node.appendChild>
2932 ($self->{doc}-><M::Document.createTextNode> ('>'));
2933 $vals->{value} .= '>';
2934 }
2935 } (Name == 'amp') {
2936 lang:Perl {
2937 $parent-><M::Node.appendChild>
2938 ($self->{doc}-><M::Document.createTextNode> ('&'));
2939 $vals->{value} .= '&';
2940 }
2941 } (Name == 'quot') {
2942 lang:Perl {
2943 $parent-><M::Node.appendChild>
2944 ($self->{doc}-><M::Document.createTextNode> ('"'));
2945 $vals->{value} .= '"';
2946 }
2947 } (Name == 'apos') {
2948 lang:Perl {
2949 $parent-><M::Node.appendChild>
2950 ($self->{doc}-><M::Document.createTextNode> ("'"));
2951 $vals->{value} .= "'";
2952 }
2953 } (Name) {
2954 my $er;
2955 lang:Perl ($name => $token.value) : has-error {
2956 __CODE{checkNCName:: $name => $name}__;
2957
2958 $er = $self->{doc}-><M::Document.createEntityReference> ($name);
2959 $er-><AS::Node.textContent> ('');
2960 ## NOTE: When document entity (and entities referenced directly
2961 ## or indirectly from it) is parsed, no general entity
2962 ## node have its replacement tree. During general
2963 ## entity node collection construction, however,
2964 ## some entity node has replacement tree.
2965 my $ent = $self->{general_entity}->{$name};
2966 if (not $ent) { # no entity declaration
2967 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2968 my $location;
2969 __CODE{xp|get-location-from-token::
2970 $token => {$token},
2971 $result => {$location},
2972 }__;
2973 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2974 xp|error-token => {$token},
2975 c|location => {$location},
2976 xp|name => {$name},
2977 }__;
2978 unless ($continue) {
2979 __CODE{ParseError}__;
2980 }
2981 } # Otherwise VC error
2982 push @{$self->{entity}}, <Code::getEmptyEntityState::
2983 $name = $name>;
2984 $er-><AS::x|EntityReference.isExpanded> (false);
2985
2986 } else { # there IS entity declaration
2987 if (($self->{standalone} or not $self->{has_xref}) and
2988 $ent->{is_externally_declared} and
2989 not $self->{entity}->[-1]->{is_externally_declared}) {
2990 my $location;
2991 __CODE{xp|get-location-from-token::
2992 $token => {$token},
2993 $result => {$location},
2994 }__;
2995 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2996 xp|error-token => {$token},
2997 c|location => {$location},
2998 xp|name => {$name},
2999 }__;
3000 unless ($continue) {
3001 __CODE{ParseError}__;
3002 }
3003 }
3004
3005 if ($ent->{is_external_entity}) {
3006 my $location;
3007 __CODE{xp|get-location-from-token::
3008 $token => {$token},
3009 $result => {$location},
3010 }__;
3011 my $continue = __c|ERROR{xp|wf-no-external-entity-references::
3012 xp|error-token => {$token},
3013 c|location => {$location},
3014 xp|name => {$name},
3015 }__;
3016 unless ($continue) {
3017 __CODE{ParseError}__;
3018 }
3019 ## NOTE: |xp:wf-parsed-entity| is not checked
3020 } # if external entity
3021
3022 $er-><AS::x|EntityReference.isExpanded>
3023 ($ent->{has_replacement_text});
3024 push @{$self->{entity}}, <Code::getCopyOfEntityState::
3025 $entity_type = 'general_entity',
3026 $entity_name = $name>;
3027
3028 if ($ent->{is_opened}) {
3029 my $location;
3030 __CODE{xp|get-location-from-token::
3031 $token => {$token},
3032 $result => {$location},
3033 }__;
3034 my $continue = __c|ERROR{xp|wf-no-recursion::
3035 xp|error-token => {$token},
3036 c|location => {$location},
3037 xp|name => {$name},
3038 }__;
3039 unless ($continue) {
3040 __CODE{ParseError}__;
3041 }
3042 open my $empty, '<', \'';
3043 $self->{entity}->[-1]->{fh} = $empty;
3044 $er-><AS::x|EntityReference.isExpanded> (false);
3045 } # recursive
3046 $ent->{is_opened} = true;
3047 }
3048 $parent-><M::Node.appendChild> ($er);
3049 $self->{location} = $self->{entity}->[-1];
3050 push @{$self->{entity_token}}, $self->{token};
3051 $self->{token} = [];
3052 push @{$self->{entity_char}}, $self->{char};
3053 $self->{char} = [];
3054 }
3055
3056 ?lexmode AttributeValueLiteralE;
3057 &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);
3058 ~ (#EOF) { }
3059 lang:Perl {
3060 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
3061 ->{is_opened} = false
3062 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
3063 $self->{token} = pop @{$self->{entity_token}};
3064 $self->{char} = pop @{$self->{entity_char}};
3065 pop (@{$self->{entity}})->{close_file}->();
3066 $self->{location} = $self->{entity}->[-1];
3067 }
3068
3069 // TODO: Set read-only flag
3070
3071 ?lexmode EntityReference;
3072 ?requires-next-token;
3073 }
3074
3075 // ~ (REFC) { }
3076 } // _GeneralEntityReferenceAE_
3077
3078 /*
3079 General Entity Reference in Literal Entity Value in Entity Declaration
3080 */
3081 rule _GeneralEntityReferenceEV_ ($vals) {
3082 ?lexmode 'EntityReference';
3083
3084 ~ (Name) {
3085 lang:Perl ($name => $token.value) {
3086 __CODE{checkNCName:: $name => $name}__;
3087 push @$vals, $name;
3088 }
3089 /*
3090 WFCs such as Entity Declared are not checked
3091 <http://www.w3.org/TR/xml11/#bypass>
3092
3093 Note that violation to the Parsed Entity WFC is an error
3094 rather than fatal error here.
3095 */
3096 }
3097
3098 // No expansion
3099
3100 // ~ (REFC) { }
3101 } // _GeneralEntityReferenceEV_
3102
3103 /*
3104 Document Type Declaration
3105 */
3106 rule _DocumentTypeDeclaration_ ($doc) {
3107 ?lexmode MarkupDeclaration;
3108
3109 ~ (Name == 'DOCTYPE') { }
3110
3111 ~ (S) { }
3112
3113 // Document type name
3114 my $name;
3115 ~ (Name) {
3116 lang:Perl ($v => $token.value) {
3117 __CODE{checkQName:: $name => $v}__;
3118 $name = $v;
3119 }
3120 }
3121
3122 my $node;
3123 my $decl;
3124 lang:Perl {
3125 $self->{docx} = $self->{doc}
3126 -><M::Node.getFeature> (<Q::fe:XDoctype>, '3.0');
3127 $node = $self->{docx}-><M::DocumentXDoctype.createDocumentTypeDefinition>
3128 ($name);
3129 $decl = $self->{dtdecl} = $node-><M::Node.getFeature>
3130 (<Q::fe:XDoctypeDeclaration>, '3.0');
3131 }
3132
3133 my $has_extid;
3134 ~? (S) {
3135 ~? (Name == 'PUBLIC') {
3136 ~ (S) { }
3137
3138 &PubidLiteral ($decl => $decl);
3139
3140 ~ (S) { }
3141
3142 &SystemLiteral ($decl => $decl);
3143
3144 ~? (S) { }
3145
3146 lang:Perl {
3147 $self->{has_xref} = true;
3148 $has_extid = true;
3149 }
3150 } (Name == 'SYSTEM') {
3151 ~ (S) { }
3152
3153 &SystemLiteral ($decl => $decl);
3154
3155 ~? (S) { }
3156
3157 lang:Perl {
3158 $self->{has_xref} = true;
3159 $has_extid = true;
3160 }
3161 }
3162 }
3163
3164 lang:Perl {
3165 $self->{dtdef} = $node;
3166 $self->{doc}-><M::Node.appendChild> ($node);
3167 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
3168 ('schema-type' => <Q::xml-dtd:>);
3169 ## ISSUE: Should default schema language information be
3170 ## preserved by some other flag?
3171 }
3172
3173 ~? (DSO) {
3174 &InternalSubset ($doc => $doc, $doctype => $node);
3175
3176 ~ (DSC) {
3177 ?lexmode MarkupDeclaration;
3178 } else {
3179 ?lexmode MarkupDeclaration;
3180 }
3181
3182 ~? (S) { }
3183 }
3184
3185 // TODO: Read and process external subset if any.
3186 lang:Perl {
3187 $self->{dont_process} = true if $has_extid;
3188 }
3189
3190 // ~ (MDC) { }
3191 } // _DocumentTypeDeclaration_
3192
3193 /*
3194 Public Identifier Literal
3195 */
3196 rule PubidLiteral ($decl) {
3197 my $pubid;
3198 my $pubid_token;
3199 ~ (LIT) {
3200 ?lexmode SystemLiteral;
3201
3202 ~? (STRING) {
3203 lang:Perl ($v => $token.value) {
3204 $pubid = $v;
3205 $pubid_token = $token;
3206 }
3207 }
3208
3209 ~ (LIT) {
3210 ?lexmode MarkupDeclaration;
3211 } else {
3212 ?lexmode MarkupDeclaration;
3213 }
3214 } (LITA) {
3215 ?lexmode SystemLiteralA;
3216
3217 ~? (STRING) {
3218 lang:Perl ($v => $token.value) {
3219 $pubid = $v;
3220 $pubid_token = $token;
3221 }
3222 }
3223
3224 ~ (LITA) {
3225 ?lexmode MarkupDeclaration;
3226 } else {
3227 ?lexmode MarkupDeclaration;
3228 }
3229 }
3230
3231 if-true ($pubid_token) {
3232 lang:Perl : has-error {
3233 if ($pubid =~ m{[^\x20\x0D\x0Aa-zA-Z0-9'()+,./:=?;!*#\@\$_%-]}s) {
3234 my $location;
3235 __CODE{xp|get-location-from-token::
3236 $token => {$pubid_token},
3237 $result => {$location},
3238 }__;
3239 ## Should this be other (new) error type?
3240 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
3241 xp|error-token => {$token},
3242 c|location => {$location},
3243 }__;
3244 unless ($continue) {
3245 __CODE{ParseError}__;
3246 }
3247 }
3248
3249 ## NOTE: U+0009 is syntactically illegal.
3250 $pubid =~ s/[\x09\x0A\x0D\x20]+/\x20/gs;
3251 $pubid =~ s/\A\x20//s;
3252 $pubid =~ s/\x20\z//s;
3253 ## NOTE: Bare attribute name is written.
3254 $decl->public_id ($pubid);
3255 }
3256 }
3257 } // PubidLiteral
3258
3259 /*
3260 System Identifier Literal
3261 */
3262 rule SystemLiteral ($decl) {
3263 ~ (LIT) {
3264 ?lexmode SystemLiteral;
3265 &_SystemLiteral ($decl => $decl);
3266 } (LITA) {
3267 ?lexmode SystemLiteralA;
3268 &_SystemLiteral ($decl => $decl);
3269 }
3270 } // SystemLiteral
3271
3272 /*
3273 System Identifier Literal Content
3274 */
3275 rule _SystemLiteral ($decl) {
3276 // LIT or LITA
3277
3278 ~? (STRING) {
3279 lang:Perl ($v => $token.value) {
3280 ## NOTE: Bare attribute name is written.
3281 $decl->system_id ($v);
3282 }
3283 }
3284
3285 ~ (LIT) {
3286 ?lexmode MarkupDeclaration;
3287 } (LITA) {
3288 ?lexmode MarkupDeclaration;
3289 } else {
3290 ?lexmode MarkupDeclaration;
3291 }
3292 } // _SystemLiteral
3293
3294 /*
3295 DTD Internal Subset
3296
3297 intSubset := *(markupdecl / DeclSep) ;; [28b]
3298 */
3299 rule InternalSubset ($doc, $doctype) {
3300 ?lexmode DTD;
3301
3302 ~* (MDO) {
3303 ?lexmode MarkupDeclaration;
3304
3305 ~ (Name == 'ELEMENT') {
3306 &_ElementDeclaration ($doc => $doc);
3307 } (Name == 'ATTLIST') {
3308 &_AttlistDeclaration ($doc => $doc, $doctype => $doctype);
3309 } (Name == 'ENTITY') {
3310 &_EntityDeclaration ($doc => $doc);
3311 } (Name == 'NOTATION') {
3312 &_NotationDeclaration ($doc => $doc);
3313 }
3314 } (S) {
3315 //
3316 } (CDO) {
3317 &_CommentDeclarationDTD ($doc => $doc);
3318 } (PIO) {
3319 &_ProcessingInstructionDTD ($doc => $doc, $doctype => $doctype);
3320 } (PERO) {
3321 ?lexmode EntityReference;
3322
3323 lang:Perl {
3324 $self->{has_xref} = true;
3325 $self->{dont_process} = true;
3326 }
3327
3328 ~ (Name) {
3329 // TODO: __CODE{checkNCName:: $name => $name}__;
3330
3331 }
3332
3333 ~ (REFC) {
3334 ?lexmode DTD;
3335 } else {
3336 ?lexmode DTD;
3337 }
3338 }
3339 } // InternalSubset
3340
3341 rule _ElementDeclaration ($doc) {
3342 // ~ (MDO) { }
3343 // ?lexmode MarkupDeclaration
3344 // ~ (Name == 'Element') { }
3345
3346 ~ (S) { }
3347
3348 ~ (Name) {
3349 // TODO: __CODE{checkQName:: $name => $name}__;
3350
3351 }
3352
3353 ?lexmode ElementDeclaration;
3354
3355 ~ (S) { }
3356
3357 // contentspec
3358 ~ (MGO) {
3359 &_ContentModel ($doc => $doc);
3360 } (Name == 'EMPTY') {
3361
3362 } (Name == 'ANY') {
3363
3364 }
3365
3366 ~? (S) { }
3367
3368 ~ (MDC) {
3369 ?lexmode DTD;
3370 } else {
3371 ?lexmode DTD;
3372 }
3373 } // _ElementDeclaration
3374
3375 rule _ContentModel ($doc) {
3376 // ~ (MGO) { }
3377
3378 ~? (S) { }
3379
3380 ~ (Name) {
3381 // Element content model
3382 &_ModelGroup ($doc => $doc)
3383 : unshift-current-token;
3384
3385 ~? (OPT) {
3386
3387 } (REP) {
3388
3389 } (PLUS) {
3390
3391 }
3392
3393 } (MDO) {
3394 &_ModelGroup ($doc => $doc)
3395 : unshift-current-token;
3396
3397 ~? (OPT) {
3398
3399 } (REP) {
3400
3401 } (PLUS) {
3402
3403 }
3404
3405 } (PCDATA) {
3406 // Mixed content declaration
3407 ~? (S) { }
3408
3409 ~* (OR) {
3410 ~? (S) { }
3411
3412 ~ (Name) {
3413 // TODO: Name & QName check
3414
3415 }
3416
3417 ~? (S) { }
3418 }
3419
3420 ~ (MGC) { }
3421
3422 ~? (REP) {
3423
3424 } else {
3425 // TODO: error if |Name|
3426 }
3427
3428
3429 }
3430 } // _ContentModel
3431
3432 rule _ModelGroup ($doc)
3433 : standalone
3434 : recursive
3435 {
3436 // ~ (MGO) { }
3437 // ~? (S) { }
3438
3439 &ContentParticle ($doc => $doc);
3440
3441 ~? (S) { }
3442
3443 ~? (OR) {
3444 ~? (S) { }
3445
3446 &ContentParticle ($doc => $doc);
3447
3448 ~? (S) { }
3449
3450 ~* (OR) {
3451 ~? (S) { }
3452
3453 &ContentParticle ($doc => $doc);
3454
3455 ~? (S) { }
3456 }
3457
3458 } (SEQ) {
3459 ~? (S) { }
3460
3461 &ContentParticle ($doc => $doc);
3462
3463 ~? (S) { }
3464
3465 ~* (SEQ) {
3466 ~? (S) { }
3467
3468 &ContentParticle ($doc => $doc);
3469
3470 ~? (S) { }
3471 }
3472
3473 }
3474
3475 ~ (MGC) { }
3476 } // _ModelGroup
3477
3478 rule ContentParticle ($doc) {
3479 ~ (Name) {
3480 // TODO: Name & QName check
3481
3482 } (MGO) {
3483 ~? (S) { }
3484
3485 &_ModelGroup ($doc => $doc);
3486 }
3487
3488 ~? (OPT) {
3489
3490 } (REP) {
3491
3492 } (PLUS) {
3493
3494 }
3495 } // ContentParticle
3496
3497 /*
3498 Attribute list declaration
3499 */
3500 rule _AttlistDeclaration ($doc, $doctype) {
3501 // ~ (MDO) { }
3502 // ~ (Name == 'ATTLIST') { }
3503
3504 ?lexmode AttlistDeclaration;
3505
3506 ~ (S) { }
3507
3508 my $name;
3509 ~ (Name) {
3510 lang:Perl ($v => $token.value) {
3511 __CODE{checkQName:: $name => $v}__;
3512 $name = $v;
3513 }
3514 } else {
3515 lang:Perl { $name = '#ILLEGAL' }
3516 }
3517
3518 my $docxd;
3519 my $et;
3520 lang:Perl {
3521 $et = $doctype-><M::DTDef.getElementTypeDefinitionNode> ($name);
3522 unless ($et) {
3523 $docxd = $doc-><M::Node.getFeature> (<Q::fe:XDoctype>, '3.0');
3524 $et = $docxd-><M::DocumentXDoctype.createElementTypeDefinition>
3525 ($name);
3526 $doctype-><M::DTDef.setElementTypeDefinitionNode> ($et)
3527 unless $name eq '#ILLEGAL';
3528 }
3529 }
3530
3531 ~? (S) { }
3532
3533 ~* (Name) {
3534 my $at;
3535 lang:Perl ($v => $token.value) : has-error {
3536 __CODE{checkQName:: $name => $v}__;
3537 $docxd ||= $doc-><M::Node.getFeature>
3538 (<Q::fe:XDoctype>, '3.0');
3539 $at = $docxd-><M::DocumentXDoctype.createAttributeDefinition> ($v);
3540 if (exists $et-><AG::ETDef.attributeDefinitions>->{$v}) {
3541 my $location;
3542 __CODE{xp|get-location-from-token::
3543 $token => {$token},
3544 $result => {$location},
3545 }__;
3546 my $continue = __c|ERROR{xp|warning-attribute-definition-ignored::
3547 xp|error-token => {$token},
3548 c|location => {$location},
3549 xp|name => {$v},
3550 }__;
3551 unless ($continue) {
3552 __CODE{ParseError}__;
3553 }
3554 } elsif ($self->{dont_process} and not $self->{standalone}) {
3555 my $location;
3556 __CODE{xp|get-location-from-token::
3557 $token => {$token},
3558 $result => {$location},
3559 }__;
3560 my $continue = __c|ERROR{
3561 xp|warning-attribute-definition-not-processed::
3562 xp|error-token => {$token},
3563 c|location => {$location},
3564 xp|name => {$v},
3565 }__;
3566 unless ($continue) {
3567 __CODE{ParseError}__;
3568 }
3569 } else {
3570 $et-><M::ETDef.setAttributeDefinitionNode> ($at);
3571 $self->{attr}->{$name}->{$v} = $at;
3572 }
3573 }
3574
3575 ~ (S) { }
3576
3577 // AttType
3578 ~ (Name == 'NOTATION') {
3579 ~ (S) { }
3580
3581 my $kwd;
3582 lang:Perl {
3583 $at-><AS::ATDef.declaredType> (<C::ATDef.NOTATION_ATTR>);
3584 $kwd = $at-><AG::ATDef.allowedTokens>;
3585 }
3586
3587 ~ (EGO) {
3588 ~? (S) { }
3589
3590 ~+ (Name) {
3591 lang:Perl ($v => $token.value) : has-error {
3592 __CODE{checkNCName:: $name => $v}__;
3593 push @$kwd, $v;
3594 }
3595
3596 ~? (S) { }
3597 } (OR) : separator {
3598 ~? (S) { }
3599 }
3600
3601 ~ (EGC) { }
3602 }
3603
3604 } (Name) {
3605 my $type;
3606 lang:Perl ($v => $token.value) : has-error {
3607 my $map = {
3608 CDATA => <C::ATDef.CDATA_ATTR>,
3609 ID => <C::ATDef.ID_ATTR>,
3610 IDREF => <C::ATDef.IDREF_ATTR>,
3611 IDREFS => <C::ATDef.IDREFS_ATTR>,
3612 ENTITY => <C::ATDef.ENTITY_ATTR>,
3613 ENTITIES => <C::ATDef.ENTITIES_ATTR>,
3614 NMTOKEN => <C::ATDef.NMTOKEN_ATTR>,
3615 NMTOKENS => <C::ATDef.NMTOKENS_ATTR>,
3616 };
3617 if ($map->{$v}) {
3618 $at-><AS::ATDef.declaredType> ($map->{$v});
3619 } else {
3620 ## TODO: Exception
3621 }
3622 }
3623
3624 } (EGO) {
3625 ?lexmode Enumeration;
3626
3627 ~? (S) { }
3628
3629 my $kwd;
3630 lang:Perl {
3631 $at-><AS::ATDef.declaredType> (<C::ATDef.ENUMERATION_ATTR>);
3632 $kwd = $at-><AG::ATDef.allowedTokens>;
3633 }
3634
3635 ~+ (Nmtoken) {
3636 lang:Perl ($v => $token.value) {
3637 push @$kwd, $v;
3638 }
3639
3640 ~? (S) { }
3641 } (OR) : separator {
3642 ~? (S) { }
3643 }
3644
3645 ~ (EGC) {
3646 ?lexmode AttlistDeclaration;
3647 } else {
3648 ?lexmode AttlistDeclaration;
3649 }
3650
3651 }
3652
3653 ~ (S) { }
3654
3655 // DefaultDecl
3656 ~ (RNI) {
3657 ~ (Name == 'REQUIRED') {
3658 lang:Perl {
3659 $at-><AS::ATDef.defaultType> (<C::ATDef.REQUIRED_DEFAULT>);
3660 }
3661 } (Name == 'IMPLIED') {
3662 lang:Perl {
3663 $at-><AS::ATDef.defaultType> (<C::ATDef.IMPLIED_DEFAULT>);
3664 }
3665 } (Name == 'FIXED') {
3666 ~ (S) { }
3667
3668 lang:Perl {
3669 $at-><AS::ATDef.defaultType> (<C::ATDef.FIXED_DEFAULT>);
3670 }
3671
3672 ~ (LIT) {
3673 my $vals;
3674 lang:Perl {
3675 $vals = {nodes => [], value => ''};
3676 }
3677
3678 &_AttributeValueSpecification_ ($doc => $doc, $vals => $vals);
3679
3680 lang:Perl {
3681 for (@{$vals->{nodes}}) {
3682 $at-><M::Node.appendChild> ($_);
3683 }
3684 }
3685
3686 ~ (LIT) {
3687 ?lexmode AttlistDeclaration;
3688 } else {
3689 ?lexmode AttlistDeclaration;
3690 }
3691 } (LITA) {
3692 my $vals;
3693 lang:Perl {
3694 $vals = {nodes => [], value => ''};
3695 }
3696
3697 &_AttributeValueSpecificationA_ ($doc => $doc, $vals => $vals);
3698
3699 lang:Perl {
3700 for (@{$vals->{nodes}}) {
3701 $at-><M::Node.appendChild> ($_);
3702 }
3703 }
3704
3705 ~ (LITA) {
3706 ?lexmode AttlistDeclaration;
3707 } else {
3708 ?lexmode AttlistDeclaration;
3709 }
3710 }
3711 }
3712
3713 } (LIT) {
3714 my $vals;
3715 lang:Perl {
3716 $at-><AS::ATDef.defaultType> (<C::ATDef.EXPLICIT_DEFAULT>);
3717 $vals = {nodes => [], value => ''};
3718 }
3719
3720 &_AttributeValueSpecification_ ($doc => $doc, $vals => $vals);
3721
3722 lang:Perl {
3723 for (@{$vals->{nodes}}) {
3724 $at-><M::Node.appendChild> ($_);
3725 }
3726 }
3727
3728 ~ (LIT) {
3729 ?lexmode AttlistDeclaration;
3730 } else {
3731 ?lexmode AttlistDeclaration;
3732 }
3733 } (LITA) {
3734 my $vals;
3735 lang:Perl {
3736 $at-><AS::ATDef.defaultType> (<C::ATDef.EXPLICIT_DEFAULT>);
3737 $vals = {nodes => [], value => ''};
3738 }
3739
3740 &_AttributeValueSpecificationA_ ($doc => $doc, $vals => $vals);
3741
3742 lang:Perl {
3743 for (@{$vals->{nodes}}) {
3744 $at-><M::Node.appendChild> ($_);
3745 }
3746 }
3747
3748 ~ (LITA) {
3749 ?lexmode AttlistDeclaration;
3750 } else {
3751 ?lexmode AttlistDeclaration;
3752 }
3753 }
3754
3755 } (S) : separator : terminator? {
3756 //
3757 }
3758
3759 ~ (MDC) {
3760 ?lexmode DTD;
3761 } else {
3762 ?lexmode DTD;
3763 }
3764 } // _AttlistDeclaration
3765
3766 /*
3767 Entity Declaration
3768 */
3769 rule _EntityDeclaration ($doc) {
3770 // ~ (MDO) { }
3771 // ~ (Name == ENTITY) { }
3772
3773 ~ (S) { }
3774
3775 my $is_param_entity;
3776 my $decl;
3777 lang:Perl {
3778 $decl = {
3779 name => '#ILLEGAL',
3780 reptxt => \'',
3781 is_external_entity => false,
3782 document_uri => $self->{location}->{document_uri},
3783 base_uri => $self->{location}->{base_uri},
3784 };
3785 }
3786
3787 ~? (PERO) {
3788 ~ (S) { }
3789 lang:Perl {
3790 $is_param_entity = $decl->{is_param_entity} = true;
3791 }
3792 }
3793
3794 /*
3795 TODO: Set |$decl->{is_externally_declared}| flag
3796 and |Entity.isExternallyDeclared| attribute
3797 for entity declarations in external subset or
3798 in parameter entity.
3799 */
3800
3801 ~ (Name) {
3802 lang:Perl ($v => $token.value) {
3803 __CODE{checkNCName:: $name => $v}__;
3804 $decl->{name} = $v;
3805 }
3806 }
3807
3808 my $node;
3809 lang:Perl {
3810 $node =
3811 $decl->{node} = $self->{docx}-><M::DocumentXDoctype.createGeneralEntity>
3812 ($decl->{name});
3813 ## TODO: Parameter entity...
3814 }
3815
3816 ~ (S) { }
3817
3818 ~ (LIT) {
3819 &_EntityValue ($doc => $doc, $decl => $decl);
3820 } (LITA) {
3821 &_EntityValueA ($doc => $doc, $decl => $decl);
3822 } (Name == 'PUBLIC') {
3823 ~ (S) { }
3824
3825 &PubidLiteral ($decl => $node);
3826
3827 ~ (S) { }
3828
3829 &SystemLiteral ($decl => $node);
3830
3831 lang:Perl {
3832 $decl->{is_external_entity} = true;
3833 }
3834 } (Name == 'SYSTEM') {
3835 ~ (S) { }
3836
3837 &SystemLiteral ($decl => $node);
3838
3839 lang:Perl {
3840 $decl->{is_external_entity} = true;
3841 }
3842 }
3843
3844 ~? (S) {
3845 ~? (Name == 'NDATA') {
3846 if-true ($is_param_entity) {
3847 lang:Perl : has-error {
3848 my $location;
3849 __CODE{xp|get-location-from-token::
3850 $token => {$token},
3851 $result => {$location},
3852 }__;
3853 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
3854 xp|error-token => {$token},
3855 c|location => {$location},
3856 }__;
3857 unless ($continue) {
3858 __CODE{ParseError}__;
3859 }
3860 }
3861 }
3862
3863 ~ (S) { }
3864
3865 ~ (Name) {
3866 lang:Perl ($v => $token.value) : has-error {
3867 __CODE{checkNCName:: $name => $v}__;
3868 $decl->{notation} = $v;
3869 $decl->{node}-><AG::x|Entity.notationName> ($v);
3870 }
3871 }
3872
3873 ~? (S) { }
3874 }
3875 }
3876
3877 lang:Perl : has-error {
3878 if ($self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}
3879 ->{$decl->{name}}) {
3880 ## Predefined entity
3881 if (not $decl->{is_param_entity} and
3882 {lt => true, gt => true, amp => true,
3883 quot => true, apos => true}->{$decl->{name}}) {
3884 if ($decl->{is_external_entity}) {
3885 my $location;
3886 __CODE{xp|get-location-from-token::
3887 $token => {$token},
3888 $result => {$location},
3889 }__;
3890 my $continue = __c|ERROR{xp|error-internal-predefined-entity::
3891 xp|error-token => {$token},
3892 c|location => {$location},
3893 xp|name => {$decl->{name}},
3894 }__;
3895 unless ($continue) {
3896 __CODE{ParseError}__;
3897 }
3898 } elsif (
3899 not ({gt => true, apos => true, quot => true}->{$decl->{name}} and
3900 ${$decl->{reptxt}} eq {
3901 gt => '>', apos => "'", quot => '"',
3902 }->{$decl->{name}}) and
3903 not (${$decl->{reptxt}} =~ /\A&#0*@{[{
3904 lt => '60', gt => '62', amp => '38',
3905 apos => '39', quot => '34',
3906 }->{$decl->{name}}]};\z/) and
3907 not (${$decl->{reptxt}} =~ /\A&#x0*(?:(?i)@{[{
3908 lt => '3C', gt => '3E', amp => '26',
3909 apos => '27', quot => '22',
3910 }->{$decl->{name}}]});\z/)
3911 ) {
3912 ## NOTE: See "SuikaWiki - Predefined Entities"
3913 ## "http://suika.fam.cx/gate/2005/sw/%E5%AE%9A%E7%BE%A9%E6%B8%88%E5%AE%9F%E4%BD%93".
3914 my $location;
3915 __CODE{xp|get-location-from-token::
3916 $token => {$token},
3917 $result => {$location},
3918 }__;
3919 my $continue = __c|ERROR{xp|error-malformed-predefined-entity::
3920 xp|error-token => {$token},
3921 c|location => {$location},
3922 xp|name => {$decl->{name}},
3923 xp|replacement-text => {${$decl->{reptxt}}},
3924 }__;
3925 unless ($continue) {
3926 __CODE{ParseError}__;
3927 }
3928 }
3929 $self->{dtdecl}->{<H::mn:node>}->{{
3930 lt => <H::d|hasLtDeclaration>,
3931 gt => <H::d|hasGtDeclaration>,
3932 amp => <H::d|hasAmpDeclaration>,
3933 apos => <H::d|hasAposDeclaration>,
3934 quot => <H::d|hasQuotDeclaration>,
3935 }->{$decl->{name}}} = true;
3936 } else { ## Dupulicating declaration
3937 my $location;
3938 __CODE{xp|get-location-from-token::
3939 $token => {$token},
3940 $result => {$location},
3941 }__;
3942 my $continue = __c|ERROR{xp|warning-entity-declaration-ignored::
3943 xp|error-token => {$token},
3944 c|location => {$location},
3945 xp|name => {$decl->{name}},
3946 }__;
3947 unless ($continue) {
3948 __CODE{ParseError}__;
3949 }
3950 }
3951 } elsif ($self->{dont_process} and not $self->{standalone}) {
3952 ## TODO: |standalone| and parameter entities??
3953 my $location;
3954 __CODE{xp|get-location-from-token::
3955 $token => {$token},
3956 $result => {$location},
3957 }__;
3958 my $continue = __c|ERROR{xp|warning-entity-declaration-not-processed::
3959 xp|error-token => {$token},
3960 c|location => {$location},
3961 xp|name => {$decl->{name}},
3962 }__;
3963 unless ($continue) {
3964 __CODE{ParseError}__;
3965 }
3966 } else {
3967 $self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}
3968 ->{$decl->{name}} = $decl;
3969 $self->{dtdef}-><M::DTDef.setGeneralEntityNode> ($decl->{node})
3970 unless $decl->{is_param_entity};
3971 }
3972 }
3973
3974 ~ (MDC) {
3975 ?lexmode DTD;
3976 } else {
3977 ?lexmode DTD;
3978 }
3979 } // _EntityDeclaration
3980
3981 /*
3982 Notation Declaration
3983 */
3984 rule _NotationDeclaration {
3985 // ~ (MDO) { }
3986 // ~ (Name == NOTATION) { }
3987
3988 ~ (S) { }
3989
3990 my $name;
3991 ~ (Name) {
3992 lang:Perl ($v => $token.value) : has-error {
3993 __CODE{checkNCName:: $name => $v}__;
3994 $name = $v;
3995 }
3996 } else {
3997 lang:Perl {
3998 $name = '#INVALID';
3999 }
4000 }
4001
4002 ~ (S) { }
4003
4004 lang:Perl {
4005 $decl = $self->{docx}-><M::DocumentXDoctype.createNotation> ($name);
4006 }
4007
4008 ~ (Name == 'PUBLIC') {
4009 ~ (S) { }
4010
4011 &PubidLiteral ($decl => $decl);
4012
4013 ~? (S) {
4014 ~? (LIT) {
4015 ?lexmode SystemLiteral;
4016 &_SystemLiteral ($decl => $decl);
4017
4018 ~? (S) { }
4019 } (LITA) {
4020 ?lexmode SystemLiteralA;
4021 &_SystemLiteral ($decl => $decl);
4022
4023 ~? (S) { }
4024 }
4025 }
4026 } (Name == 'SYSTEM') {
4027 ~ (S) { }
4028
4029 &SystemLiteral ($decl => $decl);
4030
4031 ~? (S) { }
4032 }
4033
4034 lang:Perl : has-error {
4035 if ($self->{dtdef}-><M::DTDef.getNotationNode> ($name)) {
4036 ## Dupulication
4037 my $location;
4038 __CODE{xp|get-location-from-token::
4039 $token => {$token},
4040 $result => {$location},
4041 }__;
4042 my $continue = __c|ERROR{xp|vc-unique-notation-name::
4043 xp|error-token => {$token},
4044 c|location => {$location},
4045 xp|name => {$name},
4046 }__;
4047 unless ($continue) {
4048 __CODE{ParseError}__;
4049 }
4050 } else {
4051 $self->{dtdef}-><M::DTDef.setNotationNode> ($decl);
4052 }
4053 }
4054
4055 ~ (MDC) {
4056 ?lexmode DTD;
4057 } else {
4058 ?lexmode DTD;
4059 }
4060 } // _NotationDeclaration
4061
4062 rule _EntityValue ($decl) {
4063 ?lexmode EntityValue;
4064
4065 my $vals;
4066 my $reptxt;
4067 lang:Perl {
4068 $vals = [];
4069 $reptxt = '';
4070 }
4071
4072 ~* (STRING) {
4073 lang:Perl ($v => $token.value) {
4074 $reptxt .= $v;
4075 }
4076 } (PERO) {
4077 ?lexmode EntityReference;
4078
4079 lang:Perl {
4080 $self->{has_xref} = true;
4081 $self->{dont_process} = true;
4082 }
4083
4084 // TODO: Expand or wferror if internal subset
4085
4086 ~ (Name) {
4087
4088 // Note that external subset and parameter entities are not supported
4089 lang:Perl ($name => $token.value) : has-error {
4090 __CODE{checkNCName:: $name => $name}__;
4091 my $location;
4092 __CODE{xp|get-location-from-token::
4093 $token => {$token},
4094 $result => {$location},
4095 }__;
4096 my $continue = __c|ERROR{xp|wf-pes-in-internal-subset::
4097 xp|error-token => {$token},
4098 c|location => {$location},
4099 xp|name => {$name},
4100 }__;
4101 unless ($continue) {
4102 __CODE{ParseError}__;
4103 }
4104 }
4105 }
4106
4107 ~ (REFC) {
4108 ?lexmode EntityValue;
4109 } else {
4110 ?lexmode EntityValue;
4111 }
4112 } (HCRO) {
4113 &_HexadecimalCharacterReferenceEV_ ($vals => $vals);
4114
4115 lang:Perl {
4116 $reptxt .= $vals->[-1];
4117 }
4118
4119 ~ (REFC) {
4120 ?lexmode EntityValue;
4121 } else {
4122 ?lexmode EntityValue;
4123 }
4124 } (CRO) {
4125 &_NumericCharacterReferenceEV_ ($vals => $vals);
4126
4127 lang:Perl {
4128 $reptxt .= $vals->[-1];
4129 }
4130
4131 ~ (REFC) {
4132 ?lexmode EntityValue;
4133 } else {
4134 ?lexmode EntityValue;
4135 }
4136 } (ERO) {
4137 &_GeneralEntityReferenceEV_ ($vals => $vals);
4138
4139 lang:Perl {
4140 $reptxt .= '&' . $vals->[-1] . ';';
4141 }
4142
4143 ~ (REFC) {
4144 ?lexmode EntityValue;
4145 } else {
4146 ?lexmode EntityValue;
4147 }
4148 }
4149
4150 ~ (LIT) {
4151 ?lexmode MarkupDeclaration;
4152 } (LITA) {
4153 ?lexmode MarkupDeclaration;
4154 } else {
4155 ?lexmode MarkupDeclaration;
4156 }
4157
4158 lang:Perl {
4159 $decl->{reptxt} = \$reptxt;
4160 $decl->{has_replacement_text} = true;
4161 }
4162 } // _EntityValue
4163
4164 rule _EntityValueA ($decl) {
4165 ?lexmode EntityValueA;
4166
4167 my $vals;
4168 my $reptxt;
4169 lang:Perl {
4170 $vals = [];
4171 $reptxt = '';
4172 }
4173
4174 ~* (STRING) {
4175 lang:Perl ($v => $token.value) {
4176 $reptxt .= $v;
4177 }
4178 } (PERO) {
4179 ?lexmode EntityReference;
4180
4181 lang:Perl {
4182 $self->{has_xref} = true;
4183 $self->{dont_process} = true;
4184 }
4185
4186 // TODO: implement this
4187 ~ (Name) {
4188
4189 // Note that external subset and parameter entities are not supported
4190 lang:Perl ($name => $token.value) : has-error {
4191 __CODE{checkNCName:: $name => $name}__;
4192 my $location;
4193 __CODE{xp|get-location-from-token::
4194 $token => {$token},
4195 $result => {$location},
4196 }__;
4197 my $continue = __c|ERROR{xp|wf-pes-in-internal-subset::
4198 xp|error-token => {$token},
4199 c|location => {$location},
4200 xp|name => {$name},
4201 }__;
4202 unless ($continue) {
4203 __CODE{ParseError}__;
4204 }
4205 }
4206 }
4207
4208 ~ (REFC) {
4209 ?lexmode EntityValueA;
4210 } else {
4211 ?lexmode EntityValueA;
4212 }
4213 } (HCRO) {
4214 &_HexadecimalCharacterReferenceEV_ ($vals => $vals);
4215
4216 lang:Perl {
4217 $reptxt .= $vals->[-1];
4218 }
4219
4220
4221 ~ (REFC) {
4222 ?lexmode EntityValueA;
4223 } else {
4224 ?lexmode EntityValueA;
4225 }
4226 } (CRO) {
4227 &_NumericCharacterReferenceEV_ ($vals => $vals);
4228
4229 lang:Perl {
4230 $reptxt .= $vals->[-1];
4231 }
4232
4233 ~ (REFC) {
4234 ?lexmode EntityValueA;
4235 } else {
4236 ?lexmode EntityValueA;
4237 }
4238 } (ERO) {
4239 &_GeneralEntityReferenceEV_ ($vals => $vals);
4240
4241 lang:Perl {
4242 $reptxt .= '&' . $vals->[-1] . ';';
4243 }
4244
4245 ~ (REFC) {
4246 ?lexmode EntityValueA;
4247 } else {
4248 ?lexmode EntityValueA;
4249 }
4250 }
4251
4252 ~ (LITA) {
4253 ?lexmode MarkupDeclaration;
4254 } else {
4255 ?lexmode MarkupDeclaration;
4256 }
4257
4258 lang:Perl {
4259 $decl->{reptxt} = \$reptxt;
4260 $decl->{has_replacement_text} = true;
4261 }
4262 } // _EntityValueA
4263
4264
4265 /*
4266 XML Name
4267 */
4268 lexmode NameChar {
4269 $NameStartChar10 := [
4270 '_' ':'
4271 // Letter
4272 // BaseChar
4273 U+0041..U+005A U+0061..U+007A U+00C0..U+00D6
4274 U+00D8..U+00F6 U+00F8..U+00FF U+0100..U+0131
4275 U+0134..U+013E U+0141..U+0148 U+014A..U+017E
4276 U+0180..U+01C3 U+01CD..U+01F0 U+01F4..U+01F5
4277 U+01FA..U+0217 U+0250..U+02A8 U+02BB..U+02C1
4278 U+0386 U+0388..U+038A U+038C U+038E..U+03A1
4279 U+03A3..U+03CE U+03D0..U+03D6 U+03DA U+03DC
4280 U+03DE U+03E0 U+03E2..U+03F3 U+0401..U+040C
4281 U+040E..U+044F U+0451..U+045C U+045E..U+0481
4282 U+0490..U+04C4 U+04C7..U+04C8 U+04CB..U+04CC
4283 U+04D0..U+04EB U+04EE..U+04F5 U+04F8..U+04F9
4284 U+0531..U+0556 U+0559 U+0561..U+0586
4285 U+05D0..U+05EA U+05F0..U+05F2 U+0621..U+063A
4286 U+0641..U+064A U+0671..U+06B7 U+06BA..U+06BE
4287 U+06C0..U+06CE U+06D0..U+06D3 U+06D5
4288 U+06E5..U+06E6 U+0905..U+0939 U+093D
4289 U+0958..U+0961 U+0985..U+098C U+098F..U+0990
4290 U+0993..U+09A8 U+09AA..U+09B0 U+09B2
4291 U+09B6..U+09B9 U+09DC..U+09DD U+09DF..U+09E1
4292 U+09F0..U+09F1 U+0A05..U+0A0A U+0A0F..U+0A10
4293 U+0A13..U+0A28 U+0A2A..U+0A30 U+0A32..U+0A33
4294 U+0A35..U+0A36 U+0A38..U+0A39 U+0A59..U+0A5C
4295 U+0A5E U+0A72..U+0A74 U+0A85..U+0A8B U+0A8D
4296 U+0A8F..U+0A91 U+0A93..U+0AA8 U+0AAA..U+0AB0
4297 U+0AB2..U+0AB3 U+0AB5..U+0AB9 U+0ABD U+0AE0
4298 U+0B05..U+0B0C U+0B0F..U+0B10 U+0B13..U+0B28
4299 U+0B2A..U+0B30 U+0B32..U+0B33 U+0B36..U+0B39
4300 U+0B3D U+0B5C..U+0B5D U+0B5F..U+0B61
4301 U+0B85..U+0B8A U+0B8E..U+0B90 U+0B92..U+0B95
4302 U+0B99..U+0B9A U+0B9C U+0B9E..U+0B9F
4303 U+0BA3..U+0BA4 U+0BA8..U+0BAA U+0BAE..U+0BB5
4304 U+0BB7..U+0BB9 U+0C05..U+0C0C U+0C0E..U+0C10
4305 U+0C12..U+0C28 U+0C2A..U+0C33 U+0C35..U+0C39
4306 U+0C60..U+0C61 U+0C85..U+0C8C U+0C8E..U+0C90
4307 U+0C92..U+0CA8 U+0CAA..U+0CB3 U+0CB5..U+0CB9
4308 U+0CDE U+0CE0..U+0CE1 U+0D05..U+0D0C
4309 U+0D0E..U+0D10 U+0D12..U+0D28 U+0D2A..U+0D39
4310 U+0D60..U+0D61 U+0E01..U+0E2E U+0E30
4311 U+0E32..U+0E33 U+0E40..U+0E45 U+0E81..U+0E82
4312 U+0E84 U+0E87..U+0E88 U+0E8A U+0E8D
4313 U+0E94..U+0E97 U+0E99..U+0E9F U+0EA1..U+0EA3
4314 U+0EA5 U+0EA7 U+0EAA..U+0EAB U+0EAD..U+0EAE
4315 U+0EB0 U+0EB2..U+0EB3 U+0EBD U+0EC0..U+0EC4
4316 U+0F40..U+0F47 U+0F49..U+0F69 U+10A0..U+10C5
4317 U+10D0..U+10F6 U+1100 U+1102..U+1103
4318 U+1105..U+1107 U+1109 U+110B..U+110C
4319 U+110E..U+1112 U+113C U+113E U+1140 U+114C
4320 U+114E U+1150 U+1154..U+1155 U+1159
4321 U+115F..U+1161 U+1163 U+1165 U+1167 U+1169
4322 U+116D..U+116E U+1172..U+1173 U+1175 U+119E
4323 U+11A8 U+11AB U+11AE..U+11AF U+11B7..U+11B8
4324 U+11BA U+11BC..U+11C2 U+11EB U+11F0 U+11F9
4325 U+1E00..U+1E9B U+1EA0..U+1EF9 U+1F00..U+1F15
4326 U+1F18..U+1F1D U+1F20..U+1F45 U+1F48..U+1F4D
4327 U+1F50..U+1F57 U+1F59 U+1F5B U+1F5D
4328 U+1F5F..U+1F7D U+1F80..U+1FB4 U+1FB6..U+1FBC
4329 U+1FBE U+1FC2..U+1FC4 U+1FC6..U+1FCC
4330 U+1FD0..U+1FD3 U+1FD6..U+1FDB U+1FE0..U+1FEC
4331 U+1FF2..U+1FF4 U+1FF6..U+1FFC U+2126
4332 U+212A..U+212B U+212E U+2180..U+2182
4333 U+3041..U+3094 U+30A1..U+30FA U+3105..U+312C
4334 U+AC00..U+D7A3
4335 // Ideographic
4336 U+4E00..U+9FA5 U+3007 U+3021..U+3029
4337 ];
4338 $NameChar10 := [
4339 '.' '-' '_' ':'
4340 // Letter
4341 // BaseChar
4342 U+0041..U+005A U+0061..U+007A U+00C0..U+00D6
4343 U+00D8..U+00F6 U+00F8..U+00FF U+0100..U+0131
4344 U+0134..U+013E U+0141..U+0148 U+014A..U+017E
4345 U+0180..U+01C3 U+01CD..U+01F0 U+01F4..U+01F5
4346 U+01FA..U+0217 U+0250..U+02A8 U+02BB..U+02C1
4347 U+0386 U+0388..U+038A U+038C U+038E..U+03A1
4348 U+03A3..U+03CE U+03D0..U+03D6 U+03DA U+03DC
4349 U+03DE U+03E0 U+03E2..U+03F3 U+0401..U+040C
4350 U+040E..U+044F U+0451..U+045C U+045E..U+0481
4351 U+0490..U+04C4 U+04C7..U+04C8 U+04CB..U+04CC
4352 U+04D0..U+04EB U+04EE..U+04F5 U+04F8..U+04F9
4353 U+0531..U+0556 U+0559 U+0561..U+0586
4354 U+05D0..U+05EA U+05F0..U+05F2 U+0621..U+063A
4355 U+0641..U+064A U+0671..U+06B7 U+06BA..U+06BE
4356 U+06C0..U+06CE U+06D0..U+06D3 U+06D5
4357 U+06E5..U+06E6 U+0905..U+0939 U+093D
4358 U+0958..U+0961 U+0985..U+098C U+098F..U+0990
4359 U+0993..U+09A8 U+09AA..U+09B0 U+09B2
4360 U+09B6..U+09B9 U+09DC..U+09DD U+09DF..U+09E1
4361 U+09F0..U+09F1 U+0A05..U+0A0A U+0A0F..U+0A10
4362 U+0A13..U+0A28 U+0A2A..U+0A30 U+0A32..U+0A33
4363 U+0A35..U+0A36 U+0A38..U+0A39 U+0A59..U+0A5C
4364 U+0A5E U+0A72..U+0A74 U+0A85..U+0A8B U+0A8D
4365 U+0A8F..U+0A91 U+0A93..U+0AA8 U+0AAA..U+0AB0
4366 U+0AB2..U+0AB3 U+0AB5..U+0AB9 U+0ABD U+0AE0
4367 U+0B05..U+0B0C U+0B0F..U+0B10 U+0B13..U+0B28
4368 U+0B2A..U+0B30 U+0B32..U+0B33 U+0B36..U+0B39
4369 U+0B3D U+0B5C..U+0B5D U+0B5F..U+0B61
4370 U+0B85..U+0B8A U+0B8E..U+0B90 U+0B92..U+0B95
4371 U+0B99..U+0B9A U+0B9C U+0B9E..U+0B9F
4372 U+0BA3..U+0BA4 U+0BA8..U+0BAA U+0BAE..U+0BB5
4373 U+0BB7..U+0BB9 U+0C05..U+0C0C U+0C0E..U+0C10
4374 U+0C12..U+0C28 U+0C2A..U+0C33 U+0C35..U+0C39
4375 U+0C60..U+0C61 U+0C85..U+0C8C U+0C8E..U+0C90
4376 U+0C92..U+0CA8 U+0CAA..U+0CB3 U+0CB5..U+0CB9
4377 U+0CDE U+0CE0..U+0CE1 U+0D05..U+0D0C
4378 U+0D0E..U+0D10 U+0D12..U+0D28 U+0D2A..U+0D39
4379 U+0D60..U+0D61 U+0E01..U+0E2E U+0E30
4380 U+0E32..U+0E33 U+0E40..U+0E45 U+0E81..U+0E82
4381 U+0E84 U+0E87..U+0E88 U+0E8A U+0E8D
4382 U+0E94..U+0E97 U+0E99..U+0E9F U+0EA1..U+0EA3
4383 U+0EA5 U+0EA7 U+0EAA..U+0EAB U+0EAD..U+0EAE
4384 U+0EB0 U+0EB2..U+0EB3 U+0EBD U+0EC0..U+0EC4
4385 U+0F40..U+0F47 U+0F49..U+0F69 U+10A0..U+10C5
4386 U+10D0..U+10F6 U+1100 U+1102..U+1103
4387 U+1105..U+1107 U+1109 U+110B..U+110C
4388 U+110E..U+1112 U+113C U+113E U+1140 U+114C
4389 U+114E U+1150 U+1154..U+1155 U+1159
4390 U+115F..U+1161 U+1163 U+1165 U+1167 U+1169
4391 U+116D..U+116E U+1172..U+1173 U+1175 U+119E
4392 U+11A8 U+11AB U+11AE..U+11AF U+11B7..U+11B8
4393 U+11BA U+11BC..U+11C2 U+11EB U+11F0 U+11F9
4394 U+1E00..U+1E9B U+1EA0..U+1EF9 U+1F00..U+1F15
4395 U+1F18..U+1F1D U+1F20..U+1F45 U+1F48..U+1F4D
4396 U+1F50..U+1F57 U+1F59 U+1F5B U+1F5D
4397 U+1F5F..U+1F7D U+1F80..U+1FB4 U+1FB6..U+1FBC
4398 U+1FBE U+1FC2..U+1FC4 U+1FC6..U+1FCC
4399 U+1FD0..U+1FD3 U+1FD6..U+1FDB U+1FE0..U+1FEC
4400 U+1FF2..U+1FF4 U+1FF6..U+1FFC U+2126
4401 U+212A..U+212B U+212E U+2180..U+2182
4402 U+3041..U+3094 U+30A1..U+30FA U+3105..U+312C
4403 U+AC00..U+D7A3
4404 // Ideographic
4405 U+4E00..U+9FA5 U+3007 U+3021..U+3029
4406 // Digit
4407 U+0030..U+0039 U+0660..U+0669 U+06F0..U+06F9
4408 U+0966..U+096F U+09E6..U+09EF U+0A66..U+0A6F
4409 U+0AE6..U+0AEF U+0B66..U+0B6F U+0BE7..U+0BEF
4410 U+0C66..U+0C6F U+0CE6..U+0CEF U+0D66..U+0D6F
4411 U+0E50..U+0E59 U+0ED0..U+0ED9 U+0F20..U+0F29
4412 // CombiningChar
4413 U+0300..U+0345 U+0360..U+0361 U+0483..U+0486
4414 U+0591..U+05A1 U+05A3..U+05B9 U+05BB..U+05BD
4415 U+05BF U+05C1..U+05C2 U+05C4 U+064B..U+0652
4416 U+0670 U+06D6..U+06DC U+06DD..U+06DF
4417 U+06E0..U+06E4 U+06E7..U+06E8 U+06EA..U+06ED
4418 U+0901..U+0903 U+093C U+093E..U+094C U+094D
4419 U+0951..U+0954 U+0962..U+0963 U+0981..U+0983
4420 U+09BC U+09BE U+09BF U+09C0..U+09C4
4421 U+09C7..U+09C8 U+09CB..U+09CD U+09D7
4422 U+09E2..U+09E3 U+0A02 U+0A3C U+0A3E U+0A3F
4423 U+0A40..U+0A42 U+0A47..U+0A48 U+0A4B..U+0A4D
4424 U+0A70..U+0A71 U+0A81..U+0A83 U+0ABC
4425 U+0ABE..U+0AC5 U+0AC7..U+0AC9 U+0ACB..U+0ACD
4426 U+0B01..U+0B03 U+0B3C U+0B3E..U+0B43
4427 U+0B47..U+0B48 U+0B4B..U+0B4D U+0B56..U+0B57
4428 U+0B82..U+0B83 U+0BBE..U+0BC2 U+0BC6..U+0BC8
4429 U+0BCA..U+0BCD U+0BD7 U+0C01..U+0C03
4430 U+0C3E..U+0C44 U+0C46..U+0C48 U+0C4A..U+0C4D
4431 U+0C55..U+0C56 U+0C82..U+0C83 U+0CBE..U+0CC4
4432 U+0CC6..U+0CC8 U+0CCA..U+0CCD U+0CD5..U+0CD6
4433 U+0D02..U+0D03 U+0D3E..U+0D43 U+0D46..U+0D48
4434 U+0D4A..U+0D4D U+0D57 U+0E31 U+0E34..U+0E3A
4435 U+0E47..U+0E4E U+0EB1 U+0EB4..U+0EB9
4436 U+0EBB..U+0EBC U+0EC8..U+0ECD U+0F18..U+0F19
4437 U+0F35 U+0F37 U+0F39 U+0F3E U+0F3F
4438 U+0F71..U+0F84 U+0F86..U+0F8B U+0F90..U+0F95
4439 U+0F97 U+0F99..U+0FAD U+0FB1..U+0FB7 U+0FB9
4440 U+20D0..U+20DC U+20E1 U+302A..U+302F U+3099
4441 U+309A
4442 // Extender
4443 U+00B7 U+02D0 U+02D1 U+0387 U+0640 U+0E46
4444 U+0EC6 U+3005 U+3031..U+3035 U+309D..U+309E
4445 U+30FC..U+30FE
4446 ];
4447
4448 $NameStartChar11 := [
4449 ':' '_'
4450 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M'
4451 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'
4452 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm'
4453 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z'
4454 U+00C0..U+00D6 U+00D8..U+00F6 U+00F8..U+02FF
4455 U+0370..U+037D U+037F..U+1FFF U+200C..U+200D
4456 U+2070..U+218F U+2C00..U+2FEF U+3001..U+D7FF
4457 U+F900..U+FDCF U+FDF0..U+FFFD U+10000..U+EFFFF
4458 ];
4459 $NameChar11 := [
4460 '-' '.' '0' '1' '2' '3' '4' '5' '6' '7' '8' '9'
4461 U+00B7 U+0300..U+036F U+203F..U+2040
4462 // NameStartChar
4463 ':' '_'
4464 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M'
4465 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'
4466 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm'
4467 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z'
4468 U+00C0..U+00D6 U+00D8..U+00F6 U+00F8..U+02FF
4469 U+0370..U+037D U+037F..U+1FFF U+200C..U+200D
4470 U+2070..U+218F U+2C00..U+2FEF U+3001..U+D7FF
4471 U+F900..U+FDCF U+FDF0..U+FFFD U+10000..U+EFFFF
4472 ];
4473 } // NameChar
4474
4475 lexmode Name
4476 : extends => 'NameChar'
4477 {
4478 Name : value := $NameStartChar11 $NameChar11*;
4479 } // Name
4480
4481 lexmode Nmtoken
4482 : extends => 'NameChar'
4483 {
4484 Nmtoken : value := $NameChar11*;
4485 } // Nmtoken
4486
4487 /*
4488 S
4489 */
4490 lexmode S {
4491 $s := [U+0009 U+000A U+000D U+0020];
4492 S := $s+;
4493 } // S
4494
4495 /*
4496 Document end scanning mode
4497 */
4498 lexmode DocumentEnd
4499 : standalone
4500 : extends => 'S'
4501 {
4502 /*
4503 Processing instruction
4504 */
4505 PIO := ['<'] ['?'];
4506
4507 /*
4508 Comment declaration
4509 */
4510 CDO := ['<'] ['!'] ['-'] ['-'];
4511 } // DocumentEnd
4512
4513 /*
4514 Document misc scanning mode
4515
4516 This mode scans |Misc| constructions as well
4517 as document element's start tag.
4518 */
4519 lexmode DocumentMisc
4520 : standalone
4521 : extends => 'DocumentEnd'
4522 {
4523 /*
4524 Document element start tag
4525 */
4526 STAGO := ['<'];
4527 } // DocumentMisc
4528
4529 /*
4530 Document prolog scanning mode
4531 */
4532 lexmode DocumentProlog
4533 : standalone
4534 : extends => 'DocumentMisc'
4535 {
4536 /*
4537 |DOCTYPE| declaration
4538 */
4539 MDO := ['<'] ['!'];
4540 } // DocumentProlog
4541
4542 /*
4543 Document Start Scanning Mode
4544 */
4545 lexmode DocumentStart
4546 : standalone
4547 : extends => 'DocumentProlog'
4548 {
4549 /*
4550 XML declaration
4551 */
4552 XDO := ['<'] ['?'] ['x'] ['m'] ['l'];
4553 } // DocumentStart
4554
4555 /*
4556 Comment declaration scanning mode
4557 */
4558 lexmode CommentDeclaration
4559 : standalone
4560 {
4561 /*
4562 Comment close
4563 */
4564 COM := ['-'] ['-'];
4565
4566 /*
4567 Comment data
4568 */
4569 ?default-token STRING : value;
4570 } // CommentDeclaration
4571
4572 /*
4573 Processing instruction name and |S| scanning mode
4574 */
4575 lexmode PIName
4576 : standalone
4577 : extends => 'Name'
4578 : extends => 'S'
4579 {
4580 /*
4581 Processing instruction close
4582 */
4583 PIC := ['?'] ['>'];
4584 } // PIName
4585
4586 /*
4587 Processing instruction name and |S| scanning mode
4588 */
4589 lexmode PINmtoken
4590 : standalone
4591 : extends => 'Nmtoken'
4592 : extends => 'S'
4593 {
4594 /*
4595 Processing instruction close
4596 */
4597 PIC := ['?'] ['>'];
4598 } // PINmtoken
4599
4600 /*
4601 Processing instruction data scanning mode
4602 */
4603 lexmode PIData
4604 : standalone
4605 {
4606 /*
4607 Processing instruction close
4608 */
4609 PIC := ['?'] ['>'];
4610
4611 /*
4612 Processing instruction target data
4613 */
4614 ?default-token DATA : value;
4615 } // PIData
4616
4617 /*
4618 Content of element scanning mode
4619 */
4620 lexmode ElementContent
4621 : standalone
4622 {
4623 /*
4624 Start tag open
4625 */
4626 STAGO := ['<'];
4627
4628 /*
4629 End tag open
4630 */
4631 ETAGO := ['<'] ['/'];
4632
4633 /*
4634 Hexadecimal character reference open
4635 */
4636 HCRO := ['&'] ['#'] ['x'];
4637
4638 /*
4639 Numeric character reference open
4640 */
4641 CRO := ['&'] ['#'];
4642
4643 /*
4644 General entity reference open
4645 */
4646 ERO := ['&'];
4647
4648 /*
4649 Comment declaration open
4650 */
4651 CDO := ['<'] ['!'] ['-'] ['-'];
4652
4653 /*
4654 CDATA section open
4655 */
4656 CDSO := ['<'] ['!'] ['[']
4657 ['C'] ['D'] ['A'] ['T'] ['A'] ['['];
4658
4659 /*
4660 Processing instruction open
4661 */
4662 PIO := ['<'] ['?'];
4663
4664 /*
4665 Markup section end
4666 */
4667 MSE := [']'] [']'] ['>'];
4668
4669 /*
4670 Character data
4671 */
4672 /*
4673 Character data and/or |MSE|
4674 */
4675 ?default-token CharData : value;
4676 } // ElementContent
4677
4678 /*
4679 CDATA section content scanning mode
4680 */
4681 lexmode CDATASectionContent
4682 : standalone
4683 {
4684 /*
4685 Markup section end
4686 */
4687 MSE := [']'] [']'] ['>'];
4688
4689 /*
4690 Character data
4691 */
4692 ?default-token CData : value;
4693 } // CDATASectionContent
4694
4695 lexmode EntityReference
4696 : standalone
4697 : extends => 'Name'
4698 {
4699 /*
4700 Reference close
4701 */
4702 REFC := [';'];
4703 } // EntityReference
4704
4705 lexmode NumericCharacterReference
4706 : standalone
4707 {
4708 /*
4709 Decimal number
4710 */
4711 $digit := ['0' '1' '2' '3' '4' '5' '6' '7' '8' '9'];
4712 NUMBER : value := $digit+;
4713
4714 /*
4715 Reference close
4716 */
4717 REFC := [';'];
4718 } // NumericCharacterReference
4719
4720 lexmode HexadecimalCharacterReference
4721 : standalone
4722 {
4723 /*
4724 Hexadecimal number
4725 */
4726 $hexdigit := ['0' '1' '2' '3' '4' '5' '6' '7' '8' '9'
4727 'A' 'B' 'C' 'D' 'E' 'F'
4728 'a' 'b' 'c' 'd' 'e' 'f'];
4729 Hex : value := $hexdigit+;
4730
4731 /*
4732 Reference close
4733 */
4734 REFC := [';'];
4735 } // HexadecimalCharacterReference
4736
4737 /*
4738 The XML Declaration and Text Declaration Scanning Mode
4739 */
4740 lexmode XMLDeclaration
4741 : standalone
4742 : extends => 'Name'
4743 : extends => 'S'
4744 {
4745
4746 /*
4747 Value indicator
4748 */
4749 VI := ['='];
4750
4751 /*
4752 Literal open
4753 */
4754 LIT := ['"'];
4755 LITA := [U+0027];
4756
4757 /*
4758 Processing instruction close
4759
4760 The |PIC|, i.e. |?>|, is split into two tokens |PIC1| and |PIC2|
4761 in this scanning mode to set |no_xml11_eol| flag in the
4762 |_XMLDeclaration_| |rule|.
4763 */
4764 PIC1 := ['?'];
4765 PIC2 := ['>'];
4766 } // XMLDeclaration
4767
4768 /*
4769 The XML Declaration or Processing Instruction Scanning Mode
4770
4771 '<?xml' S ...
4772 (DocumentStart) (XMLDeclarationOrPI) (XMLDeclaration)
4773 '<?xml' '1' S ...
4774 (DocumentStart) (XMLDeclarationOrPI) (PINmtoken)(PIName) (PITarget)
4775 '<?xml' '-' 'stylesheet' S ...
4776 (DocumentStart) (XMLDeclarationOrPI) (PINmtoken) (PIName) (PITarget)
4777 */
4778 lexmode XMLDeclarationOrPI
4779 : standalone
4780 : extends => 'NameChar'
4781 : extends => 'S'
4782 {
4783 NameChar : value := $NameChar11;
4784 } // XMLDeclarationOrPI
4785
4786 lexmode StartTag
4787 : standalone
4788 : extends => 'Name'
4789 : extends => 'S'
4790 {
4791
4792 /*
4793 Value indicator
4794 */
4795 VI := ['='];
4796
4797 /*
4798 Literal open
4799 */
4800 LIT := ['"'];
4801 LITA := [U+0027];
4802
4803 /*
4804 Tag close
4805 */
4806 TAGC := ['>'];
4807
4808 /*
4809 Null end-tag enabled start-tag close
4810 */
4811 NESTC := ['/'];
4812 } // StartTag
4813
4814 lexmode EndTag
4815 : standalone
4816 : extends => 'Name'
4817 : extends => 'S'
4818 {
4819 /*
4820 Tag close
4821 */
4822 TAGC := ['>'];
4823 } // EndTag
4824
4825 lexmode AttributeValueLiteral_ {
4826 ERO := ['&'];
4827 CRO := ['&'] ['#'];
4828 HCRO := ['&'] ['#'] ['x'];
4829 } // AttributeValueLiteral_
4830
4831 lexmode AttributeValueLiteral
4832 : standalone
4833 : extends => 'AttributeValueLiteral_'
4834 {
4835 LIT := ['"'];
4836 STRING : value := [^'"' '&' '<']+;
4837 } // AttributeValueLiteral
4838
4839 lexmode AttributeValueLiteralA
4840 : standalone
4841 : extends => 'AttributeValueLiteral_'
4842 {
4843 LITA := [U+0027];
4844 STRING : value := [^U+0027 '&' '<']+;
4845 } // AttributeValueLiteralA
4846
4847 lexmode AttributeValueLiteralE
4848 : standalone
4849 : extends => 'AttributeValueLiteral_'
4850 {
4851 STRING : value := [^'&' '<']+;
4852 } // AttributeValueLiteralE
4853
4854 lexmode EntityValue_ {
4855 PERO := ['%'];
4856 ERO := ['&'];
4857 CRO := ['&'] ['#'];
4858 HCRO := ['&'] ['#'] ['x'];
4859 } // EntityValue_
4860
4861 lexmode EntityValue
4862 : standalone
4863 : extends => 'EntityValue_'
4864 {
4865 LIT := ['"'];
4866 STRING : value := [^'"' '&' '%']+;
4867 } // EntityValue
4868
4869 lexmode EntityValueA
4870 : standalone
4871 : extends => 'EntityValue_'
4872 {
4873 LITA := [U+0027];
4874 STRING : value := [^U+0027 '&' '%']+;
4875 } // EntityValueA
4876
4877 lexmode SystemLiteral
4878 : standalone
4879 {
4880 LIT := ['"'];
4881 ?default-token STRING : value;
4882 } // SystemLiteral
4883
4884 lexmode SystemLiteralA
4885 : standalone
4886 {
4887 LITA := [U+0027];
4888 ?default-token STRING : value;
4889 } // SystemLiteralA
4890
4891 lexmode DTD
4892 : standalone
4893 : extends => 'S'
4894 {
4895 /*
4896 Markup declaration open
4897 */
4898 MDO := ['<'] ['!'];
4899
4900 /*
4901 Comment declaration open
4902 */
4903 CDO := ['<'] ['!'] ['-'] ['-'];
4904
4905 /*
4906 Processing instruction open
4907 */
4908 PIO := ['<'] ['?'];
4909
4910 /*
4911 Parameter entity reference open
4912 */
4913 PERO := ['%'];
4914
4915 /*
4916 Declaration subset close
4917 */
4918 DSC := [']'];
4919
4920 /*
4921 Contition section open
4922 */
4923 CSO := ['<'] ['!'] ['['];
4924 } // DTD
4925
4926 /*
4927 Markup declaration scanning mode
4928
4929 This mode is used to recognize |MDC| that terminates
4930 a comment declaration as well as the base |lexmode|
4931 for e.g. document type declaration scanning mode.
4932 */
4933 lexmode MarkupDeclaration
4934 : standalone
4935 : extends => 'Name'
4936 : extends => 'S'
4937 {
4938 /*
4939 Markup declaration close
4940 */
4941 MDC := ['>'];
4942
4943 /*
4944 Literal open
4945 */
4946 LIT := ['"'];
4947
4948 /*
4949 Alternative literal open
4950 */
4951 LITA := [U+0027];
4952
4953 /*
4954 Parameter entity reference open
4955 */
4956 PERO := ['%'];
4957
4958 /*
4959 Declaration subset open
4960 */
4961 DSO := ['['];
4962 } // MarkupDeclaration
4963
4964 lexmode ElementDeclaration
4965 : standalone
4966 : extends => 'MarkupDeclaration'
4967 {
4968 /*
4969 Model group open
4970 */
4971 MGO := ['('];
4972
4973 /*
4974 Model group close
4975 */
4976 MGC := [')'];
4977
4978 /*
4979 Reserved name indicator
4980 */
4981 RNI := ['#'];
4982
4983 /*
4984 Occurence indicators
4985 */
4986 OPT := ['?'];
4987 REP := ['*'];
4988 PLUS := ['+'];
4989
4990 /*
4991 Connectors
4992 */
4993 OR := ['|'];
4994 SEQ := [','];
4995 } // ElementDeclaration
4996
4997 lexmode AttlistDeclaration
4998 : standalone
4999 : extends => 'MarkupDeclaration'
5000 {
5001 /*
5002 Enumeration group open
5003 */
5004 EGO := ['('];
5005
5006 /*
5007 Enumeration group close
5008 */
5009 EGC := [')'];
5010
5011 /*
5012 Enumeration choice delimiter
5013 */
5014 OR := ['|'];
5015
5016 /*
5017 Reserved name indicator
5018 */
5019 RNI := ['#'];
5020 } // AttlistDeclaration
5021
5022 lexmode Enumeration
5023 : standalone
5024 : extends => 'Nmtoken'
5025 : extends => 'S'
5026 {
5027 /*
5028 Enumeration group close
5029 */
5030 EGC := [')'];
5031
5032 /*
5033 Enumeration choice delimiter
5034 */
5035 OR := ['|'];
5036 } // Enumeration
5037
5038
5039 token-error default : default {
5040 lang:Perl {
5041 my $location;
5042 __CODE{xp|get-location-from-token::
5043 $token => {$token},
5044 $result => {$location},
5045 }__;
5046 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
5047 xp|error-token => {$token},
5048 DOMCore|location => {$location},
5049 }__;
5050 unless ($continue) {
5051 __CODE{ParseError}__;
5052 }
5053 }
5054 } // default
5055
5056 @ResourceDef:
5057 @@ForCheck: ManakaiDOM|ForClass
5058 @@QName: ParseError
5059 @@rdf:type: DISPerl|BlockCode
5060 @@PerlDef:
5061 __DEEP{
5062 for (@{$self->{entity}}) {
5063 $_->{close_file}->();
5064 }
5065 }__;
5066 __EXCEPTION{DOMLS|PARSE_ERR}__;
5067
5068 @ResourceDef:
5069 @@ForCheck: ManakaiDOM|ForClass
5070 @@QName: checkNCName
5071 @@rdf:type: DISPerl|BlockCode
5072 @@PerlDef:
5073 if (($self->{xml_version} eq '1.0' and
5074 not <Code::DOMMain|testXML10Name:: $INPUT = $name>) or
5075 ($self->{xml_version} eq '1.1' and
5076 not <Code::DOMMain|testXML11Name:: $INPUT = $name>)) {
5077 my $__location;
5078 __CODE{xp|get-location-from-token::
5079 $token => {$token},
5080 $result => {$__location},
5081 }__;
5082 my $__continue = __c|ERROR{xp|wf-invalid-character-in-node-name::
5083 xp|error-token => {$token},
5084 c|location => {$__location},
5085 xp|name => {$name},
5086 infoset|version => {$self->{xml_version}},
5087 }__;
5088 unless ($__continue) {
5089 __CODE{ParseError}__;
5090 }
5091 } elsif (index ($name, ':') > -1) {
5092 my $__location;
5093 __CODE{xp|get-location-from-token::
5094 $token => {$token},
5095 $result => {$__location},
5096 }__;
5097 my $__continue = __c|ERROR{xp|nswf-legal-ncname::
5098 xp|error-token => {$token},
5099 c|location => {$__location},
5100 xp|name => {$name},
5101 infoset|version => {$self->{xml_version}},
5102 }__;
5103 unless ($__continue) {
5104 __CODE{ParseError}__;
5105 }
5106 }
5107
5108 @ResourceDef:
5109 @@ForCheck: ManakaiDOM|ForClass
5110 @@QName: checkQName
5111 @@rdf:type: DISPerl|BlockCode
5112 @@PerlDef:
5113 if (($self->{xml_version} eq '1.0' and
5114 not <Code::DOMMain|testXML10Name:: $INPUT = $name>) or
5115 ($self->{xml_version} eq '1.1' and
5116 not <Code::DOMMain|testXML11Name:: $INPUT = $name>)) {
5117 my $__location;
5118 __CODE{xp|get-location-from-token::
5119 $token => {$token},
5120 $result => {$__location},
5121 }__;
5122 my $__continue = __c|ERROR{xp|wf-invalid-character-in-node-name::
5123 xp|error-token => {$token},
5124 c|location => {$__location},
5125 xp|name => {$name},
5126 infoset|version => {$self->{xml_version}},
5127 }__;
5128 unless ($__continue) {
5129 __CODE{ParseError}__;
5130 }
5131 } elsif (($self->{xml_version} eq '1.0' and
5132 not <Code::DOMMain|testXML10QName:: $INPUT = $name>) or
5133 ($self->{xml_version} eq '1.1' and
5134 not <Code::DOMMain|testXML11QName:: $INPUT = $name>)) {
5135 my $__location;
5136 __CODE{xp|get-location-from-token::
5137 $token => {$token},
5138 $result => {$__location},
5139 }__;
5140 my $__continue = __c|ERROR{xp|nswf-legal-qname::
5141 xp|error-token => {$token},
5142 c|location => {$__location},
5143 xp|name => {$name},
5144 infoset|version => {$self->{xml_version}},
5145 }__;
5146 unless ($__continue) {
5147 __CODE{ParseError}__;
5148 }
5149 }
5150
5151
5152 @XMLTests:
5153 @@XMLTest:
5154 @@@QName: xp.char.xml10.test
5155 @@@DEnt:
5156 @@@@test:value:
5157 <?xml version="1.0"?>
5158 <p>$u0009$u000A$u000D$u0020$uD7FF$uE000$uFFFD$U00010000$U0010FFFF</p>
5159 @@@test:domTree:
5160 document {
5161 xml-version: '1.0';
5162 element {
5163 text-content: U+0009 U+000A U+000A U+0020 U+D7FF
5164 U+E000 U+FFFD U+10000 U+10FFFF;
5165 }
5166 }
5167 @@XMLTest:
5168 @@@QName: xp.char.xml11.test
5169 @@@DEnt:
5170 @@@@test:value:
5171 <?xml version="1.1"?>
5172 <p>$u0009$u000A$u000D$u0020$uD7FF$uE000$uFFFD$U00010000$U0010FFFF</p>
5173 @@@test:domTree:
5174 document {
5175 xml-version: '1.1';
5176 element {
5177 text-content: U+0009 U+000A U+000A U+0020 U+D7FF
5178 U+E000 U+FFFD U+10000 U+10FFFF;
5179 }
5180 }
5181 @@XMLTest:
5182 @@@QName: xp.char.xml10.c0.test
5183 @@@DEnt:
5184 @@@@test:value:
5185 <?xml version="1.0"?>
5186 <p>$u0000$u0001$u0002$u0003$u0004$u0005$u0006$u0007$u0008$u000B$
5187 $u000C$u000E$u000F$u0010$u0011$u0012$u0013$u0014$u0015$u0016$
5188 $u0017$u0018$u0019$u001A$u001B$u001C$u001D$u001E$u001F</p>
5189 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+0000 */
5190 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0001 */
5191 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0002 */
5192 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0003 */
5193 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0004 */
5194 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0005 */
5195 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0006 */
5196 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0007 */
5197 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0008 */
5198 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+000B */
5199 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+000C */
5200 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+000E */
5201 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+000F */
5202 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+0010 */
5203 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+0011 */
5204 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+0012 */
5205 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0013 */
5206 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0014 */
5207 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0015 */
5208 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0016 */
5209 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0017 */
5210 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0018 */
5211 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0019 */
5212 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+001A */
5213 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+001B */
5214 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+001C */
5215 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+001D */
5216 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+001E */
5217 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+001F */
5218 @@XMLTest:
5219 @@@QName: xp.char.xml11.c0.test
5220 @@@DEnt:
5221 @@@@test:value:
5222 <?xml version="1.1"?>
5223 <p>$u0000$u0001$u0002$u0003$u0004$u0005$u0006$u0007$u0008$u000B$
5224 $u000C$u000E$u000F$u0010$u0011$u0012$u0013$u0014$u0015$u0016$
5225 $u0017$u0018$u0019$u001A$u001B$u001C$u001D$u001E$u001F</p>
5226 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+0000 */
5227 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0001 */
5228 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0002 */
5229 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0003 */
5230 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0004 */
5231 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0005 */
5232 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0006 */
5233 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0007 */
5234 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0008 */
5235 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+000B */
5236 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+000C */
5237 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+000E */
5238 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+000F */
5239 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+0010 */
5240 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+0011 */
5241 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+0012 */
5242 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0013 */
5243 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0014 */
5244 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0015 */
5245 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0016 */
5246 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0017 */
5247 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0018 */
5248 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0019 */
5249 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+001A */
5250 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+001B */
5251 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+001C */
5252 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+001D */
5253 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+001E */
5254 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+001F */
5255 @@XMLTest:
5256 @@@QName: xp.char.xml10.c1.test
5257 @@@DEnt:
5258 @@@@test:value:
5259 <?xml version="1.0"?>
5260 <p>$u007F$u0080$u0081$u0082$u0083$u0084$u0086$u0087$u0088$
5261 $u0089$u008A$u008B$u008C$
5262 $u008D$u008E$u008F$u0090$u0091$u0092$u0093$u0094$u0095$u0096$
5263 $u0097$u0098$u0099$u009A$u009B$u009C$u009D$u009E$u009F$u0085</p>
5264 @@@test:domTree:
5265 document {
5266 xml-version: '1.0';
5267 element {
5268 text-content: U+007F U+0080 U+0081 U+0082 U+0083 U+0084 U+0086
5269 U+0087 U+0088 U+0089 U+008A U+008B U+008C U+008D
5270 U+008E U+008F U+0090 U+0091 U+0092 U+0093 U+0094
5271 U+0095 U+0096 U+0097 U+0098 U+0099 U+009A U+009B
5272 U+009C U+009D U+009E U+009F U+0085;
5273 }
5274 }
5275 @@XMLTest:
5276 @@@QName: xp.char.xml11.c1.test
5277 @@@DEnt:
5278 @@@@test:value:
5279 <?xml version="1.1"?>
5280 <p>$u007F$u0080$u0081$u0082$u0083$u0084$u0086$u0087$u0088$
5281 $u0089$u008A$u008B$u008C$
5282 $u008D$u008E$u008F$u0090$u0091$u0092$u0093$u0094$u0095$u0096$
5283 $u0097$u0098$u0099$u009A$u009B$u009C$u009D$u009E$u009F$u0085</p>
5284 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+007F */
5285 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0080 */
5286 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0081 */
5287 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0082 */
5288 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0083 */
5289 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0084 */
5290 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0086 */
5291 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0087 */
5292 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0088 */
5293 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+0089 */
5294 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+008A */
5295 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+008B */
5296 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+008C */
5297 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+008D */
5298 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+008E */
5299 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+008F */
5300 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0090 */
5301 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0091 */
5302 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0092 */
5303 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0093 */
5304 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0094 */
5305 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0095 */
5306 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0096 */
5307 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+0097 */
5308 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+0098 */
5309 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+0099 */
5310 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+009A */
5311 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+009B */
5312 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+009C */
5313 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 33); } /* U+009D */
5314 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 34); } /* U+009E */
5315 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 35); } /* U+009F */
5316
5317 @@XMLTest:
5318 @@@QName: xp.c0.internal.entity.xml11.1.test
5319 @@@DEnt:
5320 @@@@test:value:
5321 <?xml version="1.1"?>
5322 <!DOCTYPE a [
5323 <!ENTITY e "&#x01;&#x02;&#x03;&#x04;&#x05;&#x06;&#x07;$
5324 &#x08;&#x09;&#x0A;&#x0B;&#x0C;&#x0D;&#x0E;&#x0F;$
5325 &#x10;&#x11;&#x12;&#x13;&#x14;&#x15;&#x16;&#x17;$
5326 &#x18;&#x19;&#x1A;&#x1B;&#x1C;&#x1D;&#x1E;&#x1F;">
5327 ]><a/>
5328 @@@test:domTree:
5329 document {
5330 document-type {
5331 general-entity {
5332 node-name: 'e';
5333 text-content: U+0001 U+0002 U+0003 U+0004 U+0005
5334 U+0006 U+0007 U+0008 U+0009 U+000A U+000B
5335 U+000C U+000D U+000E U+000F
5336 U+0010 U+0011 U+0012 U+0013 U+0014 U+0015
5337 U+0016 U+0017 U+0018 U+0019 U+001A U+001B
5338 U+001C U+001D U+001E U+001F;
5339 }
5340 }
5341 element { }
5342 }
5343 @@XMLTest:
5344 @@@QName: xp.c1.internal.entity.xml11.1.test
5345 @@@DEnt:
5346 @@@@test:value:
5347 <?xml version="1.1"?>
5348 <!DOCTYPE a [
5349 <!ENTITY e "&#x80;&#x81;&#x82;&#x83;&#x84;&#x85;&#x86;&#x87;$
5350 &#x88;&#x89;&#x8A;&#x8B;&#x8C;&#x8D;&#x8E;&#x8F;$
5351 &#x90;&#x91;&#x92;&#x93;&#x94;&#x95;&#x96;&#x97;$
5352 &#x98;&#x99;&#x9A;&#x9B;&#x9C;&#x9D;&#x9E;&#x9F;&#x7F;">
5353 ]><a/>
5354 @@@test:domTree:
5355 document {
5356 document-type {
5357 general-entity {
5358 node-name: 'e';
5359 text-content: U+0080 U+0081 U+0082 U+0083 U+0084 U+0085
5360 U+0086 U+0087 U+0088 U+0089 U+008A U+008B
5361 U+008C U+008D U+008E U+008F
5362 U+0090 U+0091 U+0092 U+0093 U+0094 U+0095
5363 U+0096 U+0097 U+0098 U+0099 U+009A U+009B
5364 U+009C U+009D U+009E U+009F U+007F;
5365 }
5366 }
5367 element { }
5368 }
5369
5370 @@XMLTest:
5371 @@@QName: xp.syntax.empty.test
5372 @@@DEnt:
5373 @@@@test:value: \
5374 @@@c:erred:
5375 <[[xp:wf-syntax-error]]> { (1, 1); }
5376 @@XMLTest:
5377 @@@QName: xp.syntax.space.test
5378 @@@DEnt:
5379 @@@@test:value: \
5380 @@@c:erred:
5381 <[[xp:wf-syntax-error]]> { (1, 4); }
5382 @@XMLTest:
5383 @@@QName: xp.syntax.newlines.test
5384 @@@DEnt:
5385 @@@@test:value:
5386 \
5387 \
5388 \
5389 @@@c:erred:
5390 <[[xp:wf-syntax-error]]> { (3, 1); }
5391
5392 @@XMLTest:
5393 @@@QName: xp.only.docel.test
5394 @@@DEnt:
5395 @@@@test:value:
5396 <p></p>
5397 @@@test:domTree:
5398 document {
5399 xml-version: '1.0';
5400 xml-encoding: null;
5401 xml-standalone: false;
5402 element {
5403 namespace-uri: null;
5404 prefix: null;
5405 local-name: 'p';
5406 text-content: '';
5407 }
5408 }
5409 @@XMLTest:
5410 @@@QName: xp.only.docel.emptyelemtag.test
5411 @@@DEnt:
5412 @@@@test:value:
5413 <p/>
5414 @@@test:domTree:
5415 document {
5416 xml-version: '1.0';
5417 xml-encoding: null;
5418 xml-standalone: false;
5419 element {
5420 namespace-uri: null;
5421 prefix: null;
5422 local-name: 'p';
5423 text-content: '';
5424 }
5425 }
5426 @@XMLTest:
5427 @@@QName: xp.root.s.1.test
5428 @@@DEnt:
5429 @@@@test:value:
5430 <?xml version="1.0"?>$u0020$u000D$u000A$u0009
5431 <p></p>
5432 @@@test:domTree:
5433 document {
5434 element { }
5435 }
5436
5437 @@XMLTest:
5438 @@@QName: xp.Name.1.test
5439 @@@DEnt:
5440 @@@@test:value: <name/>
5441 @@@test:domTree:
5442 document {
5443 element {
5444 node-name: 'name';
5445 }
5446 }
5447 @@XMLTest:
5448 @@@QName: xp.Name.2.test
5449 @@@DEnt:
5450 @@@@test:value: <name0/>
5451 @@@test:domTree:
5452 document {
5453 element {
5454 node-name: 'name0';
5455 }
5456 }
5457 @@enImplNote:
5458 @@@ddid: xml11name
5459 @@@@:
5460 {TODO:: XML 1.1 Name tests required
5461 }
5462
5463 @@XMLTest:
5464 @@@QName: xp.content.mse.1.test
5465 @@@DEnt:
5466 @@@@test:value:
5467 <p>]]></p>
5468 @@@c:erred:
5469 <[[xp|wf-syntax-error]]> { (1, 4)..(1, 6); }
5470 @@XMLTest:
5471 @@@QName: xp.content.mse.2.test
5472 @@@DEnt:
5473 @@@@test:value:
5474 <p>aaa]]>bbb</p>
5475 @@@c:erred:
5476 <[[xp|wf-syntax-error]]> { (1, 7)..(1, 9); }
5477
5478 @@XMLTest:
5479 @@@QName: xp.root.comment.1.test
5480 @@@DEnt:
5481 @@@@test:value:
5482 <!--comment data-->
5483 <p/>
5484 @@@test:domTree:
5485 document {
5486 comment {
5487 data: 'comment data';
5488 }
5489 element { }
5490 }
5491 @@XMLTest:
5492 @@@QName: xp.root.comment.2.test
5493 @@@DEnt:
5494 @@@@test:value:
5495 <!---->
5496 <p/>
5497 @@@test:domTree:
5498 document {
5499 comment {
5500 data: '';
5501 }
5502 element { }
5503 }
5504 @@XMLTest:
5505 @@@QName: xp.root.after.pi.comment.1.test
5506 @@@DEnt:
5507 @@@@test:value:
5508 <?pi?>
5509 <!--comment data-->
5510 <p/>
5511 @@@test:domTree:
5512 document {
5513 pi { }
5514 comment {
5515 data: 'comment data';
5516 }
5517 element { }
5518 }
5519 @@XMLTest:
5520 @@@QName: xp.root.after.pi.comment.2.test
5521 @@@DEnt:
5522 @@@@test:value:
5523 <?pi?>
5524 <!---->
5525 <p/>
5526 @@@test:domTree:
5527 document {
5528 pi { }
5529 comment {
5530 data: '';
5531 }
5532 element { }
5533 }
5534 @@XMLTest:
5535 @@@QName: xp.root.after.element.comment.1.test
5536 @@@DEnt:
5537 @@@@test:value:
5538 <p/>
5539 <!--comment data-->
5540 @@@test:domTree:
5541 document {
5542 element { }
5543 comment {
5544 data: 'comment data';
5545 }
5546 }
5547 @@XMLTest:
5548 @@@QName: xp.root.after.element.comment.2.test
5549 @@@DEnt:
5550 @@@@test:value:
5551 <p/>
5552 <!---->
5553 @@@test:domTree:
5554 document {
5555 element { }
5556 comment {
5557 data: '';
5558 }
5559 }
5560 @@XMLTest:
5561 @@@QName: xp.doctype.intsubset.comment.1.test
5562 @@@DEnt:
5563 @@@@test:value:
5564 <!DOCTYPE a [
5565 <!--comment data-->
5566 ]>
5567 <p/>
5568 @@@test:domTree:
5569 document {
5570 document-type { }
5571 element { }
5572 }
5573 @@XMLTest:
5574 @@@QName: xp.doctype.intsubset.comment.2.test
5575 @@@DEnt:
5576 @@@@test:value:
5577 <!DOCTYPE a [
5578 <!---->
5579 ]>
5580 <p/>
5581 @@@test:domTree:
5582 document {
5583 document-type { }
5584 element { }
5585 }
5586 @@XMLTest:
5587 @@@QName: xp.doctype.intsubset.comment.3.test
5588 @@@DEnt:
5589 @@@@test:value:
5590 <!DOCTYPE a [
5591 <?pi?>
5592 <!---->
5593 ]>
5594 <p/>
5595 @@@test:domTree:
5596 document {
5597 document-type {
5598 pi { }
5599 }
5600 element { }
5601 }
5602 @@XMLTest:
5603 @@@QName: xp.content.comment.1.test
5604 @@@DEnt:
5605 @@@@test:value:
5606 <p><!--comment data--></p>
5607 @@@test:domTree:
5608 document {
5609 element {
5610 comment {
5611 data: 'comment data';
5612 }
5613 }
5614 }
5615 @@XMLTest:
5616 @@@QName: xp.content.comment.2.test
5617 @@@DEnt:
5618 @@@@test:value:
5619 <p><!----></p>
5620 @@@test:domTree:
5621 document {
5622 element {
5623 comment {
5624 data: '';
5625 }
5626 }
5627 }
5628 @@XMLTest:
5629 @@@QName: xp.content.comment.3.test
5630 @@@DEnt:
5631 @@@@test:value:
5632 <p>aaaaa<!---->bbbbb</p>
5633 @@@test:domTree:
5634 document {
5635 element {
5636 text {
5637 data: 'aaaaa';
5638 }
5639 comment {
5640 data: '';
5641 }
5642 text {
5643 data: 'bbbbb';
5644 }
5645 }
5646 }
5647 @@XMLTest:
5648 @@@QName: xp.content.comment.--.1.test
5649 @@@DEnt:
5650 @@@@test:value:
5651 <p><!--data--data--></p>
5652 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 12)..(1, 17); }
5653 @@XMLTest:
5654 @@@QName: xp.content.comment.---gt.test
5655 @@@DEnt:
5656 @@@@test:value:
5657 <p><!--data---></p>
5658 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 12)..(1, 15); }
5659
5660 @@XMLTest:
5661 @@@QName: xp.xmldecl.version.1.0.test
5662 @@@DEnt:
5663 @@@@test:value:
5664 <?xml version="1.0"?>
5665 <p></p>
5666 @@@test:domTree:
5667 document {
5668 xml-version: '1.0';
5669 xml-encoding: null;
5670 xml-standalone: false;
5671 element { }
5672 }
5673 @@XMLTest:
5674 @@@QName: xp.xmldecl.version.1.0.lita.test
5675 @@@DEnt:
5676 @@@@test:value:
5677 <?xml version='1.0'?>
5678 <p></p>
5679 @@@test:domTree:
5680 document {
5681 xml-version: '1.0';
5682 xml-encoding: null;
5683 xml-standalone: false;
5684 element { }
5685 }
5686 @@XMLTest:
5687 @@@QName: xp.xmldecl.version.1.0.s.test
5688 @@@DEnt:
5689 @@@@test:value:
5690 <?xml version = "1.0" ?>
5691 <p></p>
5692 @@@test:domTree:
5693 document {
5694 xml-version: '1.0';
5695 xml-encoding: null;
5696 xml-standalone: false;
5697 element { }
5698 }
5699 @@XMLTest:
5700 @@@QName: xp.xmldecl.version.1.1.test
5701 @@@DEnt:
5702 @@@@test:value:
5703 <?xml version="1.1"?>
5704 <p></p>
5705 @@@test:domTree:
5706 document {
5707 xml-version: '1.1';
5708 xml-encoding: null;
5709 xml-standalone: false;
5710 element { }
5711 }
5712
5713 @@XMLTest:
5714 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.test
5715 @@@DEnt:
5716 @@@@test:value:
5717 <?xml version="1.0" encoding="US-ascii"?>
5718 <p></p>
5719 @@@test:domTree:
5720 document {
5721 xml-version: '1.0';
5722 xml-encoding: 'US-ascii';
5723 xml-standalone: false;
5724 element { }
5725 }
5726 @@XMLTest:
5727 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.lita.test
5728 @@@DEnt:
5729 @@@@test:value:
5730 <?xml version="1.0" encoding='US-ascii'?>
5731 <p></p>
5732 @@@test:domTree:
5733 document {
5734 xml-version: '1.0';
5735 xml-encoding: 'US-ascii';
5736 xml-standalone: false;
5737 element { }
5738 }
5739 @@XMLTest:
5740 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.s.test
5741 @@@DEnt:
5742 @@@@test:value:
5743 <?xml version="1.0" encoding = "US-ascii" ?>
5744 <p></p>
5745 @@@test:domTree:
5746 document {
5747 xml-version: '1.0';
5748 xml-encoding: 'US-ascii';
5749 xml-standalone: false;
5750 element { }
5751 }
5752
5753 @@XMLTest:
5754 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.test
5755 @@@DEnt:
5756 @@@@test:value:
5757 <?xml version="1.0" encoding="us-ascii" standalone="yes"?>
5758 <p></p>
5759 @@@test:domTree:
5760 document {
5761 xml-version: '1.0';
5762 xml-encoding: 'us-ascii';
5763 xml-standalone: true;
5764 element { }
5765 }
5766 @@XMLTest:
5767 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.no.test
5768 @@@DEnt:
5769 @@@@test:value:
5770 <?xml version="1.0" encoding="us-ascii" standalone="no"?>
5771 <p></p>
5772 @@@test:domTree:
5773 document {
5774 xml-version: '1.0';
5775 xml-encoding: 'us-ascii';
5776 xml-standalone: false;
5777 element { }
5778 }
5779 @@XMLTest:
5780 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.lita.test
5781 @@@DEnt:
5782 @@@@test:value:
5783 <?xml version="1.0" encoding="us-ascii" standalone='yes'?>
5784 <p></p>
5785 @@@test:domTree:
5786 document {
5787 xml-version: '1.0';
5788 xml-encoding: 'us-ascii';
5789 xml-standalone: true;
5790 element { }
5791 }
5792 @@XMLTest:
5793 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.s.test
5794 @@@DEnt:
5795 @@@@test:value:
5796 <?xml version="1.0" encoding="us-ascii" standalone = "yes" ?>
5797 <p></p>
5798 @@@test:domTree:
5799 document {
5800 xml-version: '1.0';
5801 xml-encoding: 'us-ascii';
5802 xml-standalone: true;
5803 element { }
5804 }
5805 @@XMLTest:
5806 @@@QName: xp.xmldecl.no.encoding.but.standalone.attr.test
5807 @@@DEnt:
5808 @@@@test:value:
5809 <?xml version="1.0" standalone="yes"?>
5810 <p></p>
5811 @@@test:domTree:
5812 document {
5813 xml-version: '1.0';
5814 xml-encoding: null;
5815 xml-standalone: true;
5816 element { }
5817 }
5818 @@XMLTest:
5819 @@@QName: xp.xmldecl.encoding.encname.test
5820 @@@DEnt:
5821 @@@@test:value:
5822 <?xml version="1.0" encoding="a-._01-"?>
5823 <p></p>
5824 @@@test:domTree:
5825 document {
5826 xml-version: '1.0';
5827 xml-encoding: 'a-._01-';
5828 xml-standalone: false;
5829 element { }
5830 }
5831
5832 @@XMLTest:
5833 @@@QName: xp.xmldecl.no.s.no.attr.test
5834 @@@DEnt:
5835 @@@@test:value:
5836 <?xml?>
5837 <p></p>
5838 @@@c:erred:
5839 <[[xp:wf-syntax-error]]> { (1, 1)..(1, 7); }
5840 @@XMLTest:
5841 @@@QName: xp.xmldecl.s.no.attr.test
5842 @@@DEnt:
5843 @@@@test:value:
5844 <?xml ?>
5845 <p></p>
5846 @@@c:erred:
5847 <[[xp:wf-syntax-error]]> { (1, 8)..(1, 9); }
5848 @@XMLTest:
5849 @@@QName: xp.xmldecl.unknown.attr.test
5850 @@@DEnt:
5851 @@@@test:value:
5852 <?xml unknown="value"?>
5853 <p></p>
5854 @@@c:erred:
5855 <[[xp:wf-syntax-error]]> { (1, 8)..(1, 22); }
5856 @@XMLTest:
5857 @@@QName: xp.xmldecl.version.unknown.attr.test
5858 @@@DEnt:
5859 @@@@test:value:
5860 <?xml version="1.0" unknown="value"?>
5861 <p></p>
5862 @@@c:erred:
5863 <[[xp:wf-syntax-error]]> { (1, 21)..(1, 35); }
5864 @@XMLTest:
5865 @@@QName: xp.xmldecl.version.encoding.unknown.attr.test
5866 @@@DEnt:
5867 @@@@test:value:
5868 <?xml version="1.0" encoding="us-ascii" unknown="value"?>
5869 <p></p>
5870 @@@c:erred:
5871 <[[xp:wf-syntax-error]]> { (1, 41)..(1, 55); }
5872 @@XMLTest:
5873 @@@QName: xp.xmldecl.version.encoding.standalone.unknown.attr.test
5874 @@@DEnt:
5875 @@@@test:value:
5876 <?xml version="1.0" encoding="us-ascii" standalone="yes"
5877 unknown="value"?>
5878 <p></p>
5879 @@@c:erred:
5880 <[[xp:wf-syntax-error]]> { (2, 1)..(2, 15); }
5881 @@XMLTest:
5882 @@@QName: xp.xmldecl.no.version.but.encoding.attr.test
5883 @@@DEnt:
5884 @@@@test:value:
5885 <?xml encoding="us-ascii"?>
5886 <p></p>
5887 @@@c:erred:
5888 <[[xp:wf-syntax-error]]> { (1, 7)..(1, 25); }
5889 @@XMLTest:
5890 @@@QName: xp.xmldecl.no.version.but.standalone.attr.test
5891 @@@DEnt:
5892 @@@@test:value:
5893 <?xml standalone="yes"?>
5894 <p></p>
5895 @@@c:erred:
5896 <[[xp:wf-syntax-error]]> { (1, 7)..(1, 24); }
5897 @@XMLTest:
5898 @@@QName: xp.xmldecl.version.unsupported.test
5899 @@@DEnt:
5900 @@@@test:value:
5901 <?xml version="1.2"?>
5902 <p></p>
5903 @@@c:erred:
5904 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 19); }
5905 @@XMLTest:
5906 @@@QName: xp.xmldecl.version.unsupported.2.test
5907 @@@DEnt:
5908 @@@@test:value:
5909 <?xml version=" 1.0 "?>
5910 <p></p>
5911 @@@c:erred:
5912 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 21); }
5913 @@XMLTest:
5914 @@@QName: xp.xmldecl.version.unsupported.3.test
5915 @@@DEnt:
5916 @@@@test:value:
5917 <?xml version="01.00"?>
5918 <p></p>
5919 @@@c:erred:
5920 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 21); }
5921 @@XMLTest:
5922 @@@QName: xp.xmldecl.encoding.malformed.1.test
5923 @@@DEnt:
5924 @@@@test:value:
5925 <?xml version="1.0" encoding="0088"?>
5926 <p></p>
5927 @@@c:erred:
5928 <[[xp:wf-malformed-enc-name]]> { (1, 21)..(1, 35); }
5929 @@XMLTest:
5930 @@@QName: xp.xmldecl.encoding.malformed.2.test
5931 @@@DEnt:
5932 @@@@test:value:
5933 <?xml version="1.0" encoding="D.V.D!"?>
5934 <p></p>
5935 @@@c:erred:
5936 <[[xp:wf-malformed-enc-name]]> { (1, 21)..(1, 38); }
5937 @@XMLTest:
5938 @@@QName: xp.xmldecl.standalone.malformed.1.test
5939 @@@DEnt:
5940 @@@@test:value:
5941 <?xml version="1.0" standalone="true"?>
5942 <p></p>
5943 @@@c:erred:
5944 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 38); }
5945 @@XMLTest:
5946 @@@QName: xp.xmldecl.standalone.malformed.2.test
5947 @@@DEnt:
5948 @@@@test:value:
5949 <?xml version="1.0" standalone="YES"?>
5950 <p></p>
5951 @@@c:erred:
5952 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 37); }
5953 @@XMLTest:
5954 @@@QName: xp.xmldecl.standalone.malformed.3.test
5955 @@@DEnt:
5956 @@@@test:value:
5957 <?xml version="1.0" standalone="no "?>
5958 <p></p>
5959 @@@c:erred:
5960 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 38); }
5961
5962 @@XMLTest:
5963 @@@QName: xp.no-xmldecl.xml...-pi.test
5964 @@@DEnt:
5965 @@@@test:value:
5966 <?xmldeclaration?>
5967 <a></a>
5968 @@@test:domTree:
5969 document {
5970 pi {
5971 node-name: 'xmldeclaration';
5972 node-value: '';
5973 }
5974 element { }
5975 }
5976 @@XMLTest:
5977 @@@QName: xp.no-xmldecl.xml...-pi.after.document.element.test
5978 @@@DEnt:
5979 @@@@test:value:
5980 <a></a>
5981 <?xmldeclaration?>
5982 @@@test:domTree:
5983 document {
5984 element { }
5985 pi {
5986 node-name: 'xmldeclaration';
5987 node-value: '';
5988 }
5989 }
5990 @@XMLTest:
5991 @@@QName: xp.no-xmldecl.xml...-pi.in.document.element.test
5992 @@@DEnt:
5993 @@@@test:value:
5994 <a>
5995 <?xmldeclaration?>
5996 </a>
5997 @@@test:domTree:
5998 document {
5999 element {
6000 text { }
6001 pi {
6002 node-name: 'xmldeclaration';
6003 node-value: '';
6004 }
6005 text { }
6006 }
6007 }
6008 @@XMLTest:
6009 @@@QName: xp.no-xmldecl.xml...-pi.in.doctype.test
6010 @@@DEnt:
6011 @@@@test:value:
6012 <!DOCTYPE a [
6013 <?xmldeclaration?>
6014 ]>
6015 <a></a>
6016 @@@test:domTree:
6017 document {
6018 document-type {
6019 pi {
6020 node-name: 'xmldeclaration';
6021 node-value: '';
6022 }
6023 }
6024 element { }
6025 }
6026
6027 @@XMLTest:
6028 @@@QName: xp.XMLdecl.test
6029 @@@DEnt:
6030 @@@@test:value:
6031 <?XML version="1.0"?>
6032 <p></p>
6033 @@@c:erred:
6034 <[[xp:wf-pi-target-is-xml]]> { (1, 1)..(1, 5); }
6035 @@XMLTest:
6036 @@@QName: xp.Xmldecl.test
6037 @@@DEnt:
6038 @@@@test:value:
6039 <?Xml version="1.0"?>
6040 <p></p>
6041 @@@c:erred:
6042 <[[xp:wf-pi-target-is-xml]]> { (1, 1)..(1, 5); }
6043 @@XMLTest:
6044 @@@QName: xp.xmldecl.after.document.element.empty.test
6045 @@@DEnt:
6046 @@@@test:value:
6047 <p></p>
6048 <?xml?>
6049 @@@c:erred:
6050 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6051 @@XMLTest:
6052 @@@QName: xp.xmldecl.after.document.element.test
6053 @@@DEnt:
6054 @@@@test:value:
6055 <p></p>
6056 <?xml version="1.0"?>
6057 @@@c:erred:
6058 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6059 @@XMLTest:
6060 @@@QName: xp.xmldecl.in.element.empty.test
6061 @@@DEnt:
6062 @@@@test:value:
6063 <p>
6064 <?xml?>
6065 </p>
6066 @@@c:erred:
6067 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6068 @@XMLTest:
6069 @@@QName: xp.xmldecl.in.element.test
6070 @@@DEnt:
6071 @@@@test:value:
6072 <p>
6073 <?xml version="1.0"?>
6074 </p>
6075 @@@c:erred:
6076 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6077 @@XMLTest:
6078 @@@QName: xp.xmldecl.after.comment.test
6079 @@@DEnt:
6080 @@@@test:value:
6081 <!---->
6082 <?xml version="1.0"?>
6083 <p></p>
6084 @@@c:erred:
6085 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6086 @@XMLTest:
6087 @@@QName: xp.xmldecl.after.comment.empty.test
6088 @@@DEnt:
6089 @@@@test:value:
6090 <!---->
6091 <?xml?>
6092 <p></p>
6093 @@@c:erred:
6094 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6095 @@XMLTest:
6096 @@@QName: xp.xmldecl.after.pi.test
6097 @@@DEnt:
6098 @@@@test:value:
6099 <?xml-declaration?>
6100 <?xml version="1.0"?>
6101 <p></p>
6102 @@@c:erred:
6103 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6104 @@XMLTest:
6105 @@@QName: xp.xmldecl.after.pi.empty.test
6106 @@@DEnt:
6107 @@@@test:value:
6108 <?xml-declaration?>
6109 <?xml?>
6110 <p></p>
6111 @@@c:erred:
6112 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6113 @@XMLTest:
6114 @@@QName: xp.xmldecl.after.pi.2.test
6115 @@@DEnt:
6116 @@@@test:value:
6117 <?declaration?>
6118 <?xml version="1.0"?>
6119 <p></p>
6120 @@@c:erred:
6121 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6122 @@XMLTest:
6123 @@@QName: xp.xmldecl.after.pi.empty.2.test
6124 @@@DEnt:
6125 @@@@test:value:
6126 <?declaration?>
6127 <?xml?>
6128 <p></p>
6129 @@@c:erred:
6130 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6131 @@XMLTest:
6132 @@@QName: xp.xmldecl.after.doctype.test
6133 @@@DEnt:
6134 @@@@test:value:
6135 <!DOCTYPE a>
6136 <?xml version="1.0"?>
6137 <p></p>
6138 @@@c:erred:
6139 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6140 @@XMLTest:
6141 @@@QName: xp.xmldecl.after.doctype.empty.test
6142 @@@DEnt:
6143 @@@@test:value:
6144 <!DOCTYPE a>
6145 <?xml?>
6146 <p></p>
6147 @@@c:erred:
6148 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6149 @@XMLTest:
6150 @@@QName: xp.xmldecl.in.doctype.test
6151 @@@DEnt:
6152 @@@@test:value:
6153 <!DOCTYPE a [
6154 <?xml version="1.0"?>
6155 ]>
6156 <p></p>
6157 @@@c:erred:
6158 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6159 @@XMLTest:
6160 @@@QName: xp.xmldecl.in.doctype.empty.test
6161 @@@DEnt:
6162 @@@@test:value:
6163 <!DOCTYPE a [
6164 <?xml?>
6165 ]>
6166 <p></p>
6167 @@@c:erred:
6168 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6169
6170 @@XMLTest:
6171 @@@QName: xp.pi.before.element.empty.test
6172 @@@DEnt:
6173 @@@@test:value:
6174 <?target?>
6175 <a></a>
6176 @@@test:domTree:
6177 document {
6178 pi {
6179 node-name: 'target';
6180 node-value: '';
6181 }
6182 element { }
6183 }
6184 @@XMLTest:
6185 @@@QName: xp.pi.before.element.s.test
6186 @@@DEnt:
6187 @@@@test:value:
6188 <?target ?>
6189 <a></a>
6190 @@@test:domTree:
6191 document {
6192 pi {
6193 node-name: 'target';
6194 node-value: '';
6195 }
6196 element { }
6197 }
6198 @@XMLTest:
6199 @@@QName: xp.pi.before.element.string.test
6200 @@@DEnt:
6201 @@@@test:value:
6202 <?target string?>
6203 <a></a>
6204 @@@test:domTree:
6205 document {
6206 pi {
6207 node-name: 'target';
6208 node-value: 'string';
6209 }
6210 element { }
6211 }
6212 @@XMLTest:
6213 @@@QName: xp.pi.before.element.string.s.test
6214 @@@DEnt:
6215 @@@@test:value:
6216 <?target string ?>
6217 <a></a>
6218 @@@test:domTree:
6219 document {
6220 pi {
6221 node-name: 'target';
6222 node-value: 'string ';
6223 }
6224 element { }
6225 }
6226 @@XMLTest:
6227 @@@QName: xp.pi.before.element.gt.test
6228 @@@DEnt:
6229 @@@@test:value:
6230 <?target string>string?>
6231 <a></a>
6232 @@@test:domTree:
6233 document {
6234 pi {
6235 node-name: 'target';
6236 node-value: 'string>string';
6237 }
6238 element { }
6239 }
6240 @@XMLTest:
6241 @@@QName: xp.pi.doctype.empty.test
6242 @@@DEnt:
6243 @@@@test:value:
6244 <!DOCTYPE a [
6245 <?target?>
6246 ]>
6247 <a></a>
6248 @@@test:domTree:
6249 document {
6250 document-type {
6251 pi {
6252 node-name: 'target';
6253 node-value: '';
6254 }
6255 }
6256 element { }
6257 }
6258
6259 @@XMLTest:
6260 @@@QName: xp.pi.no.target.test
6261 @@@DEnt:
6262 @@@@test:value:
6263 <??>
6264 <p></p>
6265 @@@c:erred:
6266 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 4); }
6267 @@XMLTest:
6268 @@@QName: xp.pi.no.target.2.test
6269 @@@DEnt:
6270 @@@@test:value:
6271 <? ?>
6272 <p></p>
6273 @@@c:erred:
6274 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 4); }
6275 @@XMLTest:
6276 @@@QName: xp.pi.bad.target.1.test
6277 @@@DEnt:
6278 @@@@test:value:
6279 <?target! ?>
6280 <p></p>
6281 @@@c:erred:
6282 <[[xp:wf-syntax-error]]> { (1, 9)..(1, 9); }
6283 @@XMLTest:
6284 @@@QName: xp.pi.bad.target.2.test
6285 @@@DEnt:
6286 @@@@test:value:
6287 <?0target ?>
6288 <p></p>
6289 @@@c:erred:
6290 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 3); }
6291
6292 @@XMLTest:
6293 @@@QName: xp.cdatasection.empty.1.test
6294 @@@DEnt:
6295 @@@@test:value:
6296 <p><![CDATA[]]></p>
6297 @@@test:domTree:
6298 document {
6299 element {
6300 cdata-section {
6301 data: '';
6302 }
6303 }
6304 }
6305 @@XMLTest:
6306 @@@QName: xp.cdatasection.empty.2.test
6307 @@@DEnt:
6308 @@@@test:value:
6309 <p>aa<![CDATA[]]>bb</p>
6310 @@@test:domTree:
6311 document {
6312 element {
6313 text { data: 'aa'; }
6314 cdata-section {
6315 data: '';
6316 }
6317 text { data: 'bb'; }
6318 }
6319 }
6320 @@XMLTest:
6321 @@@QName: xp.cdatasection.1.test
6322 @@@DEnt:
6323 @@@@test:value:
6324 <p><![CDATA[abcdefg]]></p>
6325 @@@test:domTree:
6326 document {
6327 element {
6328 cdata-section {
6329 data: 'abcdefg';
6330 }
6331 }
6332 }
6333 @@XMLTest:
6334 @@@QName: xp.cdatasection.2.test
6335 @@@DEnt:
6336 @@@@test:value:
6337 <p>aa<![CDATA[abcdefg]]>bb</p>
6338 @@@test:domTree:
6339 document {
6340 element {
6341 text { data: 'aa'; }
6342 cdata-section {
6343 data: 'abcdefg';
6344 }
6345 text { data: 'bb'; }
6346 }
6347 }
6348 @@XMLTest:
6349 @@@QName: xp.cdatasection.ref.1.test
6350 @@@DEnt:
6351 @@@@test:value:
6352 <p><![CDATA[a&amp;&#x32;&#32;%abc;&def;]]&gt;b]]></p>
6353 @@@test:domTree:
6354 document {
6355 element {
6356 cdata-section {
6357 data: 'a&amp;&#x32;&#32;%abc;&def;]]&gt;b';
6358 }
6359 }
6360 }
6361 @@XMLTest:
6362 @@@QName: xp.cdatasection.in.general.entity.test
6363 @@@DEnt:
6364 @@@@test:value:
6365 <!DOCTYPE p [
6366 <!ENTITY cdata "<![CDATA[text]]>">
6367 ]>
6368 <p>&cdata;</p>
6369 @@@test:domTree:
6370 document {
6371 document-type {
6372 general-entity {
6373 node-name: 'cdata';
6374 cdata-section {
6375 data: 'text';
6376 }
6377 }
6378 }
6379 element {
6380 general-entity-reference {
6381 node-name: 'cdata';
6382 is-expanded: true;
6383 cdata-section {
6384 data: 'text';
6385 }
6386 }
6387 }
6388 }
6389 @@XMLTest:
6390 @@@QName: xp.cdatasection.no.mse.test
6391 @@@DEnt:
6392 @@@@test:value:
6393 <p><![CDATA[text</p>
6394 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 21); }
6395 @@XMLTest:
6396 @@@QName: xp.cdatasection.nest.test
6397 @@@DEnt:
6398 @@@@test:value:
6399 <p><![CDATA[text01<![CDATA[txt2]]>text3]]></p>
6400 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 40)..(1, 42); }
6401
6402 @@XMLTest:
6403 @@@QName: xp.doctype.empty.test
6404 @@@DEnt:
6405 @@@@test:value:
6406 <!DOCTYPE a>
6407 <a></a>
6408 @@@test:domTree:
6409 document {
6410 xml-version: '1.0';
6411 xml-encoding: null;
6412 xml-standalone: false;
6413 document-type {
6414 node-name: 'a';
6415 public-id: null;
6416 system-id: null;
6417 }
6418 element {
6419 namespace-uri: null;
6420 prefix: null;
6421 local-name: 'a';
6422 text-content: '';
6423 }
6424 }
6425 @@XMLTest:
6426 @@@QName: xp.doctype.empty.after.document.element.test
6427 @@@DEnt:
6428 @@@@test:value:
6429 <a></a>
6430 <!DOCTYPE a>
6431 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6432 @@XMLTest:
6433 @@@QName: xp.doctype.empty.in.element.test
6434 @@@DEnt:
6435 @@@@test:value:
6436 <a>
6437 <!DOCTYPE a>
6438 </a>
6439 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6440 @@XMLTest:
6441 @@@QName: xp.doctype.empty.dup.test
6442 @@@DEnt:
6443 @@@@test:value:
6444 <!DOCTYPE a>
6445 <!DOCTYPE a>
6446 <a></a>
6447 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6448 @@XMLTest:
6449 @@@QName: xp.doctype.empty.in.intsubset.test
6450 @@@DEnt:
6451 @@@@test:value:
6452 <!DOCTYPE a [
6453 <!DOCTYPE a>
6454 ]>
6455 <a></a>
6456 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6457 @@XMLTest:
6458 @@@QName: xp.doctype.no.s.no.name.test
6459 @@@DEnt:
6460 @@@@test:value:
6461 <!DOCTYPE>
6462 <a></a>
6463 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 10); }
6464 @@XMLTest:
6465 @@@QName: xp.doctype.no.name.test
6466 @@@DEnt:
6467 @@@@test:value:
6468 <!DOCTYPE >
6469 <a></a>
6470 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 11); }
6471 @@XMLTest:
6472 @@@QName: xp.doctype.name.s.test
6473 @@@DEnt:
6474 @@@@test:value:
6475 <!DOCTYPE aa >
6476 <aa></aa>
6477 @@@test:domTree:
6478 document {
6479 document-type {
6480 node-name: 'aa';
6481 public-id: null;
6482 system-id: null;
6483 }
6484 element { }
6485 }
6486 @@XMLTest:
6487 @@@QName: xp.doctype.no.mdc.test
6488 @@@DEnt:
6489 @@@@test:value:
6490 <!DOCTYPE aa
6491 <aa></aa>
6492 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6493
6494 @@XMLTest:
6495 @@@QName: xp.doctype.intsubset.empty.1.test
6496 @@@DEnt:
6497 @@@@test:value:
6498 <!DOCTYPE a []>
6499 <a></a>
6500 @@@test:domTree:
6501 document {
6502 xml-version: '1.0';
6503 xml-encoding: null;
6504 xml-standalone: false;
6505 document-type {
6506 node-name: 'a';
6507 public-id: null;
6508 system-id: null;
6509 }
6510 element {
6511 namespace-uri: null;
6512 prefix: null;
6513 local-name: 'a';
6514 text-content: '';
6515 }
6516 }
6517 @@XMLTest:
6518 @@@QName: xp.doctype.intsubset.empty.2.test
6519 @@@DEnt:
6520 @@@@test:value:
6521 <!DOCTYPE a [
6522
6523 ]>
6524 <a></a>
6525 @@@test:domTree:
6526 document {
6527 xml-version: '1.0';
6528 xml-encoding: null;
6529 xml-standalone: false;
6530 document-type {
6531 node-name: 'a';
6532 public-id: null;
6533 system-id: null;
6534 }
6535 element {
6536 namespace-uri: null;
6537 prefix: null;
6538 local-name: 'a';
6539 text-content: '';
6540 }
6541 }
6542 @@XMLTest:
6543 @@@QName: xp.doctype.intsubset.empty.3.test
6544 @@@DEnt:
6545 @@@@test:value:
6546 <!DOCTYPE a[]>
6547 <a></a>
6548 @@@test:domTree:
6549 document {
6550 document-type {
6551 node-name: 'a';
6552 public-id: null;
6553 system-id: null;
6554 }
6555 element { }
6556 }
6557 @@XMLTest:
6558 @@@QName: xp.doctype.intsubset.empty.4.test
6559 @@@DEnt:
6560 @@@@test:value:
6561 <!DOCTYPE a[] >
6562 <a></a>
6563 @@@test:domTree:
6564 document {
6565 document-type {
6566 node-name: 'a';
6567 public-id: null;
6568 system-id: null;
6569 }
6570 element { }
6571 }
6572 @@XMLTest:
6573 @@@QName: xp.doctype.intsubset.no.dsc.1.test
6574 @@@DEnt:
6575 @@@@test:value:
6576 <!DOCTYPE a [>
6577 <a></a>
6578 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 14); }
6579 @@XMLTest:
6580 @@@QName: xp.doctype.intsubset.no.dsc.2.test
6581 @@@DEnt:
6582 @@@@test:value:
6583 <!DOCTYPE a [
6584 <a></a>
6585 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6586 @@XMLTest:
6587 @@@QName: xp.doctype.intsubset.no.dsc.3.test
6588 @@@DEnt:
6589 @@@@test:value:
6590 <!DOCTYPE a [
6591 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 14); }
6592 @@XMLTest:
6593 @@@QName: xp.doctype.intsubset.no.mdc.1.test
6594 @@@DEnt:
6595 @@@@test:value:
6596 <!DOCTYPE a []
6597 <a/>
6598 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6599 @@XMLTest:
6600 @@@QName: xp.doctype.intsubset.no.mdc.2.test
6601 @@@DEnt:
6602 @@@@test:value:
6603 <!DOCTYPE a []]>
6604 <a/>
6605 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 15); }
6606 @@XMLTest:
6607 @@@QName: xp.doctype.pubid.sysid.1.test
6608 @@@DEnt:
6609 @@@@test:value:
6610 <!DOCTYPE a PUBLIC "pubid" "sysid">
6611 <a/>
6612 @@@test:domTree:
6613 document {
6614 document-type {
6615 node-name: 'a';
6616 public-id: 'pubid';
6617 system-id: 'sysid';
6618 }
6619 element { }
6620 }
6621 @@XMLTest:
6622 @@@QName: xp.doctype.pubid.sysid.2.test
6623 @@@DEnt:
6624 @@@@test:value:
6625 <!DOCTYPE a PUBLIC 'pubid' "sysid">
6626 <a/>
6627 @@@test:domTree:
6628 document {
6629 document-type {
6630 node-name: 'a';
6631 public-id: 'pubid';
6632 system-id: 'sysid';
6633 }
6634 element { }
6635 }
6636 @@XMLTest:
6637 @@@QName: xp.doctype.pubid.sysid.3.test
6638 @@@DEnt:
6639 @@@@test:value:
6640 <!DOCTYPE a PUBLIC "pubid" 'sysid'>
6641 <a/>
6642 @@@test:domTree:
6643 document {
6644 document-type {
6645 node-name: 'a';
6646 public-id: 'pubid';
6647 system-id: 'sysid';
6648 }
6649 element { }
6650 }
6651 @@XMLTest:
6652 @@@QName: xp.doctype.pubid.sysid.4.test
6653 @@@DEnt:
6654 @@@@test:value:
6655 <!DOCTYPE a PUBLIC 'pubid' 'sysid'>
6656 <a/>
6657 @@@test:domTree:
6658 document {
6659 document-type {
6660 node-name: 'a';
6661 public-id: 'pubid';
6662 system-id: 'sysid';
6663 }
6664 element { }
6665 }
6666 @@XMLTest:
6667 @@@QName: xp.doctype.pubid.sysid.5.test
6668 @@@DEnt:
6669 @@@@test:value:
6670 <!DOCTYPE a PUBLIC "pubid" "sysid" >
6671 <a/>
6672 @@@test:domTree:
6673 document {
6674 document-type {
6675 node-name: 'a';
6676 public-id: 'pubid';
6677 system-id: 'sysid';
6678 }
6679 element { }
6680 }
6681 @@XMLTest:
6682 @@@QName: xp.doctype.pubid.sysid.6.test
6683 @@@DEnt:
6684 @@@@test:value:
6685 <!DOCTYPE a PUBLIC 'pubid' 'sysid' >
6686 <a/>
6687 @@@test:domTree:
6688 document {
6689 document-type {
6690 node-name: 'a';
6691 public-id: 'pubid';
6692 system-id: 'sysid';
6693 }
6694 element { }
6695 }
6696 @@XMLTest:
6697 @@@QName: xp.doctype.pubid.sysid.intsubset.1.test
6698 @@@DEnt:
6699 @@@@test:value:
6700 <!DOCTYPE a PUBLIC "pubid" "sysid"[]>
6701 <a/>
6702 @@@test:domTree:
6703 document {
6704 document-type {
6705 node-name: 'a';
6706 public-id: 'pubid';
6707 system-id: 'sysid';
6708 }
6709 element { }
6710 }
6711 @@XMLTest:
6712 @@@QName: xp.doctype.pubid.sysid.intsubset.2.test
6713 @@@DEnt:
6714 @@@@test:value:
6715 <!DOCTYPE a PUBLIC "pubid" "sysid" []>
6716 <a/>
6717 @@@test:domTree:
6718 document {
6719 document-type {
6720 node-name: 'a';
6721 public-id: 'pubid';
6722 system-id: 'sysid';
6723 }
6724 element { }
6725 }
6726 @@XMLTest:
6727 @@@QName: xp.doctype.pubid.sysid.intsubset.3.test
6728 @@@DEnt:
6729 @@@@test:value:
6730 <!DOCTYPE a PUBLIC 'pubid' 'sysid'[]>
6731 <a/>
6732 @@@test:domTree:
6733 document {
6734 document-type {
6735 node-name: 'a';
6736 public-id: 'pubid';
6737 system-id: 'sysid';
6738 }
6739 element { }
6740 }
6741 @@XMLTest:
6742 @@@QName: xp.doctype.pubid.sysid.intsubset.4.test
6743 @@@DEnt:
6744 @@@@test:value:
6745 <!DOCTYPE a PUBLIC 'pubid' 'sysid' []>
6746 <a/>
6747 @@@test:domTree:
6748 document {
6749 document-type {
6750 node-name: 'a';
6751 public-id: 'pubid';
6752 system-id: 'sysid';
6753 }
6754 element { }
6755 }
6756 @@XMLTest:
6757 @@@QName: xp.doctype.sysid.1.test
6758 @@@DEnt:
6759 @@@@test:value:
6760 <!DOCTYPE a SYSTEM "sysid">
6761 <a/>
6762 @@@test:domTree:
6763 document {
6764 document-type {
6765 node-name: 'a';
6766 public-id: null;
6767 system-id: 'sysid';
6768 }
6769 element { }
6770 }
6771 @@XMLTest:
6772 @@@QName: xp.doctype.sysid.2.test
6773 @@@DEnt:
6774 @@@@test:value:
6775 <!DOCTYPE a SYSTEM 'sysid'>
6776 <a/>
6777 @@@test:domTree:
6778 document {
6779 document-type {
6780 node-name: 'a';
6781 public-id: null;
6782 system-id: 'sysid';
6783 }
6784 element { }
6785 }
6786 @@XMLTest:
6787 @@@QName: xp.doctype.sysid.3.test
6788 @@@DEnt:
6789 @@@@test:value:
6790 <!DOCTYPE a SYSTEM "sysid" >
6791 <a/>
6792 @@@test:domTree:
6793 document {
6794 document-type {
6795 node-name: 'a';
6796 public-id: null;
6797 system-id: 'sysid';
6798 }
6799 element { }
6800 }
6801 @@XMLTest:
6802 @@@QName: xp.doctype.sysid.4.test
6803 @@@DEnt:
6804 @@@@test:value:
6805 <!DOCTYPE a SYSTEM 'sysid' >
6806 <a/>
6807 @@@test:domTree:
6808 document {
6809 document-type {
6810 node-name: 'a';
6811 public-id: null;
6812 system-id: 'sysid';
6813 }
6814 element { }
6815 }
6816 @@XMLTest:
6817 @@@QName: xp.doctype.sysid.intsubset.1.test
6818 @@@DEnt:
6819 @@@@test:value:
6820 <!DOCTYPE a SYSTEM "sysid"[]>
6821 <a/>
6822 @@@test:domTree:
6823 document {
6824 document-type {
6825 node-name: 'a';
6826 public-id: null;
6827 system-id: 'sysid';
6828 }
6829 element { }
6830 }
6831 @@XMLTest:
6832 @@@QName: xp.doctype.sysid.intsubset.2.test
6833 @@@DEnt:
6834 @@@@test:value:
6835 <!DOCTYPE a SYSTEM "sysid" []>
6836 <a/>
6837 @@@test:domTree:
6838 document {
6839 document-type {
6840 node-name: 'a';
6841 public-id: null;
6842 system-id: 'sysid';
6843 }
6844 element { }
6845 }
6846 @@XMLTest:
6847 @@@QName: xp.doctype.sysid.intsubset.3.test
6848 @@@DEnt:
6849 @@@@test:value:
6850 <!DOCTYPE a SYSTEM 'sysid'[]>
6851 <a/>
6852 @@@test:domTree:
6853 document {
6854 document-type {
6855 node-name: 'a';
6856 public-id: null;
6857 system-id: 'sysid';
6858 }
6859 element { }
6860 }
6861 @@XMLTest:
6862 @@@QName: xp.doctype.sysid.intsubset.4.test
6863 @@@DEnt:
6864 @@@@test:value:
6865 <!DOCTYPE a SYSTEM 'sysid' []>
6866 <a/>
6867 @@@test:domTree:
6868 document {
6869 document-type {
6870 node-name: 'a';
6871 public-id: null;
6872 system-id: 'sysid';
6873 }
6874 element { }
6875 }
6876 @@XMLTest:
6877 @@@QName: xp.doctype.public.stago.test
6878 @@@DEnt:
6879 @@@@test:value:
6880 <!DOCTYPE a PUBLIC<a/>
6881 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6882 @@XMLTest:
6883 @@@QName: xp.doctype.public.mdc.test
6884 @@@DEnt:
6885 @@@@test:value:
6886 <!DOCTYPE a PUBLIC>
6887 <a/>
6888 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6889 @@XMLTest:
6890 @@@QName: xp.doctype.public.s.stago.test
6891 @@@DEnt:
6892 @@@@test:value:
6893 <!DOCTYPE a PUBLIC <a/>
6894 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 20); }
6895 @@XMLTest:
6896 @@@QName: xp.doctype.public.s.mdc.test
6897 @@@DEnt:
6898 @@@@test:value:
6899 <!DOCTYPE a PUBLIC >
6900 <a/>
6901 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 20); }
6902 @@XMLTest:
6903 @@@QName: xp.doctype.public.lit.test
6904 @@@DEnt:
6905 @@@@test:value:
6906 <!DOCTYPE a PUBLIC"p" "s">
6907 <a/>
6908 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6909 @@XMLTest:
6910 @@@QName: xp.doctype.public.lita.test
6911 @@@DEnt:
6912 @@@@test:value:
6913 <!DOCTYPE a PUBLIC'p' "s">
6914 <a/>
6915 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6916 @@XMLTest:
6917 @@@QName: xp.doctype.pubid.lit.lita.unmatched.1.test
6918 @@@DEnt:
6919 @@@@test:value:
6920 <!DOCTYPE a PUBLIC "p' "s">
6921 <a/>
6922 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 25); }
6923 @@XMLTest:
6924 @@@QName: xp.doctype.pubid.lit.lita.unmatched.2.test
6925 @@@DEnt:
6926 @@@@test:value:
6927 <!DOCTYPE a PUBLIC "p' 's'><a/>
6928 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
6929 @@XMLTest:
6930 @@@QName: xp.doctype.pubid.lita.lit.unmatched.1.test
6931 @@@DEnt:
6932 @@@@test:value:
6933 <!DOCTYPE a PUBLIC 'p" "s"><a/>
6934 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
6935 @@XMLTest:
6936 @@@QName: xp.doctype.pubid.lita.lit.unmatched.2.test
6937 @@@DEnt:
6938 @@@@test:value:
6939 <!DOCTYPE a PUBLIC 'p" 's'>
6940 <a/>
6941 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 21)..(1, 25); }
6942 @@XMLTest:
6943 @@@QName: xp.doctype.public.s.lit.mdc.test
6944 @@@DEnt:
6945 @@@@test:value:
6946 <!DOCTYPE a PUBLIC "><a/>
6947 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 26); }
6948 @@XMLTest:
6949 @@@QName: xp.doctype.public.s.lita.mdc.test
6950 @@@DEnt:
6951 @@@@test:value:
6952 <!DOCTYPE a PUBLIC '><a/>
6953 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 26); }
6954 @@XMLTest:
6955 @@@QName: xp.doctype.public.lit.pubid.lit.mdc.test
6956 @@@DEnt:
6957 @@@@test:value:
6958 <!DOCTYPE a PUBLIC "p">
6959 <a/>
6960 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 23); }
6961 @@XMLTest:
6962 @@@QName: xp.doctype.public.lita.pubid.lita.mdc.test
6963 @@@DEnt:
6964 @@@@test:value:
6965 <!DOCTYPE a PUBLIC 'p'>
6966 <a/>
6967 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 23); }
6968 @@XMLTest:
6969 @@@QName: xp.doctype.public.lit.pubid.lit.s.mdc.test
6970 @@@DEnt:
6971 @@@@test:value:
6972 <!DOCTYPE a PUBLIC "p" >
6973 <a/>
6974 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 24); }
6975 @@XMLTest:
6976 @@@QName: xp.doctype.public.lita.pubid.lita.s.mdc.test
6977 @@@DEnt:
6978 @@@@test:value:
6979 <!DOCTYPE a PUBLIC 'p' >
6980 <a/>
6981 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 24); }
6982 @@XMLTest:
6983 @@@QName: xp.doctype.public.lit.pubid.lit.s.lit.mdc.test
6984 @@@DEnt:
6985 @@@@test:value:
6986 <!DOCTYPE a PUBLIC "p" "><a/>
6987 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
6988 @@XMLTest:
6989 @@@QName: xp.doctype.public.lit.pubid.lit.s.lita.mdc.test
6990 @@@DEnt:
6991 @@@@test:value:
6992 <!DOCTYPE a PUBLIC "p" '><a/>
6993 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
6994 @@XMLTest:
6995 @@@QName: xp.doctype.public.lita.pubid.lita.s.lit.mdc.test
6996 @@@DEnt:
6997 @@@@test:value:
6998 <!DOCTYPE a PUBLIC 'p' "><a/>
6999 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7000 @@XMLTest:
7001 @@@QName: xp.doctype.public.lita.pubid.lita.s.lita.mdc.test
7002 @@@DEnt:
7003 @@@@test:value:
7004 <!DOCTYPE a PUBLIC 'p' '><a/>
7005 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7006 @@XMLTest:
7007 @@@QName: xp.doctype.public.lit.pubid.lit.lit.lita.unmatched.mdc.test
7008 @@@DEnt:
7009 @@@@test:value:
7010 <!DOCTYPE a PUBLIC "p" "s'><a/>
7011 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7012 @@XMLTest:
7013 @@@QName: xp.doctype.public.lita.pubid.lita.lita.lit.unmatched.mdc.test
7014 @@@DEnt:
7015 @@@@test:value:
7016 <!DOCTYPE a PUBLIC 'p' 's"><a/>
7017 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7018 @@XMLTest:
7019 @@@QName: xp.doctype.pubid.sysid.stago.1.test
7020 @@@DEnt:
7021 @@@@test:value:
7022 <!DOCTYPE a PUBLIC "p" "s"<a/>
7023 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27); }
7024 @@XMLTest:
7025 @@@QName: xp.doctype.pubid.sysid.stago.2.test
7026 @@@DEnt:
7027 @@@@test:value:
7028 <!DOCTYPE a PUBLIC "p" 's'<a/>
7029 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27); }
7030 @@XMLTest:
7031 @@@QName: xp.doctype.pubid.sysid.stago.s.1.test
7032 @@@DEnt:
7033 @@@@test:value:
7034 <!DOCTYPE a PUBLIC "p" "s" <a/>
7035 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
7036 @@XMLTest:
7037 @@@QName: xp.doctype.pubid.sysid.stago.s.2.test
7038 @@@DEnt:
7039 @@@@test:value:
7040 <!DOCTYPE a PUBLIC "p" 's' <a/>
7041 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
7042
7043 @@XMLTest:
7044 @@@QName: xp.endofline.1.0.crlf.test
7045 @@@DEnt:
7046 @@@@test:value:
7047 <?xml version="1.0"?>
7048 <p>aaa$u000D$u000Abbb</p>
7049 @@@test:domTree:
7050 document {
7051 xml-version: '1.0';
7052 element {
7053 text-content: 'aaa' U+000A 'bbb';
7054 }
7055 }
7056 @@XMLTest:
7057 @@@QName: xp.endofline.1.1.crlf.test
7058 @@@DEnt:
7059 @@@@test:value:
7060 <?xml version="1.1"?>
7061 <p>aaa$u000D$u000Abbb</p>
7062 @@@test:domTree:
7063 document {
7064 xml-version: '1.1';
7065 element {
7066 text-content: 'aaa' U+000A 'bbb';
7067 }
7068 }
7069 @@XMLTest:
7070 @@@QName: xp.endofline.1.0.crnl.test
7071 @@@DEnt:
7072 @@@@test:value:
7073 <?xml version="1.0"?>
7074 <p>aaa$u000D$u0085bbb</p>
7075 @@@test:domTree:
7076 document {
7077 xml-version: '1.0';
7078 element {
7079 text-content: 'aaa' U+000A U+0085 'bbb';
7080 }
7081 }
7082 @@XMLTest:
7083 @@@QName: xp.endofline.1.1.crnl.test
7084 @@@DEnt:
7085 @@@@test:value:
7086 <?xml version="1.1"?>
7087 <p>aaa$u000D$u0085bbb</p>
7088 @@@test:domTree:
7089 document {
7090 xml-version: '1.1';
7091 element {
7092 text-content: 'aaa' U+000A 'bbb';
7093 }
7094 }
7095 @@XMLTest:
7096 @@@QName: xp.endofline.1.0.nl.test
7097 @@@DEnt:
7098 @@@@test:value:
7099 <?xml version="1.0"?>
7100 <p>aaa$u0085bbb</p>
7101 @@@test:domTree:
7102 document {
7103 xml-version: '1.0';
7104 element {
7105 text-content: 'aaa' U+0085 'bbb';
7106 }
7107 }
7108 @@XMLTest:
7109 @@@QName: xp.endofline.1.1.nl.test
7110 @@@DEnt:
7111 @@@@test:value:
7112 <?xml version="1.1"?>
7113 <p>aaa$u0085bbb</p>
7114 @@@test:domTree:
7115 document {
7116 xml-version: '1.1';
7117 element {
7118 text-content: 'aaa' U+000A 'bbb';
7119 }
7120 }
7121 @@XMLTest:
7122 @@@QName: xp.endofline.1.0.ls.test
7123 @@@DEnt:
7124 @@@@test:value:
7125 <?xml version="1.0"?>
7126 <p>aaa$u2028bbb</p>
7127 @@@test:domTree:
7128 document {
7129 xml-version: '1.0';
7130 element {
7131 text-content: 'aaa' U+2028 'bbb';
7132 }
7133 }
7134 @@XMLTest:
7135 @@@QName: xp.endofline.1.1.ls.test
7136 @@@DEnt:
7137 @@@@test:value:
7138 <?xml version="1.1"?>
7139 <p>aaa$u2028bbb</p>
7140 @@@test:domTree:
7141 document {
7142 xml-version: '1.1';
7143 element {
7144 text-content: 'aaa' U+000A 'bbb';
7145 }
7146 }
7147 @@XMLTest:
7148 @@@QName: xp.endofline.1.0.cr.test
7149 @@@DEnt:
7150 @@@@test:value:
7151 <?xml version="1.0"?>
7152 <p>aaa$u000Dbbb</p>
7153 @@@test:domTree:
7154 document {
7155 xml-version: '1.0';
7156 element {
7157 text-content: 'aaa' U+000A 'bbb';
7158 }
7159 }
7160 @@XMLTest:
7161 @@@QName: xp.endofline.1.1.cr.test
7162 @@@DEnt:
7163 @@@@test:value:
7164 <?xml version="1.1"?>
7165 <p>aaa$u000Dbbb</p>
7166 @@@test:domTree:
7167 document {
7168 xml-version: '1.1';
7169 element {
7170 text-content: 'aaa' U+000A 'bbb';
7171 }
7172 }
7173 @@XMLTest:
7174 @@@QName: xp.endofline.1.0.lf.test
7175 @@@DEnt:
7176 @@@@test:value:
7177 <?xml version="1.0"?>
7178 <p>aaa$u000Abbb</p>
7179 @@@test:domTree:
7180 document {
7181 xml-version: '1.0';
7182 element {
7183 text-content: 'aaa' U+000A 'bbb';
7184 }
7185 }
7186 @@XMLTest:
7187 @@@QName: xp.endofline.1.1.lf.test
7188 @@@DEnt:
7189 @@@@test:value:
7190 <?xml version="1.1"?>
7191 <p>aaa$u000Abbb</p>
7192 @@@test:domTree:
7193 document {
7194 xml-version: '1.1';
7195 element {
7196 text-content: 'aaa' U+000A 'bbb';
7197 }
7198 }
7199 @@XMLTest:
7200 @@@QName: xp.xml10.endofline.nl.in.xmldecl.1.test
7201 @@@DEnt:
7202 @@@@test:value:
7203 <?xml$u0085version="1.0"?>
7204 <p/>
7205 @@@c:erred:
7206 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7207 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7208 @@XMLTest:
7209 @@@QName: xp.xml11.endofline.nl.in.xmldecl.1.test
7210 @@@DEnt:
7211 @@@@test:value:
7212 <?xml$u0085version="1.1"?>
7213 (err)<p/>
7214 @@@c:erred:
7215 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7216 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7217 @@XMLTest:
7218 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.1.test
7219 @@@DEnt:
7220 @@@@test:value:
7221 <?xml$u000D$u0085version="1.0"?>
7222 <p/>
7223 @@@c:erred:
7224 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7225 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7226 @@XMLTest:
7227 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.1.test
7228 @@@DEnt:
7229 @@@@test:value:
7230 <?xml$u000D$u0085version="1.1"?>
7231 (err)<p/>
7232 @@@c:erred:
7233 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7234 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7235 @@XMLTest:
7236 @@@QName: xp.xml10.endofline.ls.in.xmldecl.1.test
7237 @@@DEnt:
7238 @@@@test:value:
7239 <?xml$u2028version="1.0"?>
7240 <p/>
7241 @@@c:erred:
7242 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7243 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7244 @@XMLTest:
7245 @@@QName: xp.xml11.endofline.ls.in.xmldecl.1.test
7246 @@@DEnt:
7247 @@@@test:value:
7248 <?xml$u2028version="1.1"?>
7249 (err)<p/>
7250 @@@c:erred:
7251 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7252 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7253 @@XMLTest:
7254 @@@QName: xp.xml10.endofline.nl.in.xmldecl.2.test
7255 @@@DEnt:
7256 @@@@test:value:
7257 <?xml version="1.0"$u0085?>
7258 <p/>
7259 @@@c:erred:
7260 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7261 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7262 @@XMLTest:
7263 @@@QName: xp.xml11.endofline.nl.in.xmldecl.2.test
7264 @@@DEnt:
7265 @@@@test:value:
7266 <?xml version="1.1"$u0085?>
7267 (err)<p/>
7268 @@@c:erred:
7269 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7270 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7271 @@XMLTest:
7272 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.2.test
7273 @@@DEnt:
7274 @@@@test:value:
7275 <?xml version="1.0"$u000D$u0085?>
7276 <p/>
7277 @@@c:erred:
7278 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7279 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7280 @@XMLTest:
7281 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.2.test
7282 @@@DEnt:
7283 @@@@test:value:
7284 <?xml version="1.1"$u000D$u0085?>
7285 (err)<p/>
7286 @@@c:erred:
7287 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7288 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7289 @@XMLTest:
7290 @@@QName: xp.xml10.endofline.ls.in.xmldecl.2.test
7291 @@@DEnt:
7292 @@@@test:value:
7293 <?xml version="1.0"$u2028?>
7294 <p/>
7295 @@@c:erred:
7296 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7297 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7298 @@XMLTest:
7299 @@@QName: xp.xml11.endofline.ls.in.xmldecl.2.test
7300 @@@DEnt:
7301 @@@@test:value:
7302 <?xml version="1.1"$u2028?>
7303 (err)<p/>
7304 @@@c:erred:
7305 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7306 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7307 @@XMLTest:
7308 @@@QName: xp.xml10.endofline.nl.in.xmldecl.3.test
7309 @@@DEnt:
7310 @@@@test:value:
7311 <?xml $u0085version="1.0"?>
7312 <p/>
7313 @@@c:erred:
7314 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7315 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7316 @@XMLTest:
7317 @@@QName: xp.xml11.endofline.nl.in.xmldecl.3.test
7318 @@@DEnt:
7319 @@@@test:value:
7320 <?xml $u0085version="1.1"?>
7321 (err)<p/>
7322 @@@c:erred:
7323 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7324 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7325 @@XMLTest:
7326 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.3.test
7327 @@@DEnt:
7328 @@@@test:value:
7329 <?xml $u000D$u0085version="1.0"?>
7330 <p/>
7331 @@@c:erred:
7332 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7333 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7334 @@XMLTest:
7335 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.3.test
7336 @@@DEnt:
7337 @@@@test:value:
7338 <?xml $u000D$u0085version="1.1"?>
7339 (err)<p/>
7340 @@@c:erred:
7341 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7342 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7343 @@XMLTest:
7344 @@@QName: xp.xml10.endofline.ls.in.xmldecl.3.test
7345 @@@DEnt:
7346 @@@@test:value:
7347 <?xml $u2028version="1.0"?>
7348 <p/>
7349 @@@c:erred:
7350 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7351 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7352 @@XMLTest:
7353 @@@QName: xp.xml11.endofline.ls.in.xmldecl.3.test
7354 @@@DEnt:
7355 @@@@test:value:
7356 <?xml $u2028version="1.1"?>
7357 (err)<p/>
7358 @@@c:erred:
7359 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7360 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7361 @@XMLTest:
7362 @@@QName: xp.xml10implied.endofline.nl.in.pi.1.test
7363 @@@DEnt:
7364 @@@@test:value:
7365 <?xml-$u0085?>
7366 <p/>
7367 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 7)..(2, 0); }
7368 @@XMLTest:
7369 @@@QName: xp.xml10.endofline.nl.in.pi.1.test
7370 @@@DEnt:
7371 @@@@test:value:
7372 <?xml version="1.0"?>
7373 <?xml-$u0085?>
7374 <p/>
7375 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 7)..(3, 0); }
7376 @@XMLTest:
7377 @@@QName: xp.xml11.endofline.nl.in.pi.1.test
7378 @@@DEnt:
7379 @@@@test:value:
7380 <?xml version="1.1"?>
7381 <?xml-$u0085?>
7382 <p/>
7383 @@@test:domTree:
7384 document {
7385 xml-version: '1.1';
7386 pi {
7387 node-name: 'xml-';
7388 node-value: '';
7389 }
7390 element { }
7391 }
7392 @@XMLTest:
7393 @@@QName: xp.xml10implied.endofline.crnl.in.pi.1.test
7394 @@@DEnt:
7395 @@@@test:value:
7396 <?xml-$u000D$u0085?>
7397 <p/>
7398 @@@test:domTree:
7399 document {
7400 xml-version: '1.0';
7401 pi {
7402 node-name: 'xml-';
7403 node-value: U+0085;
7404 }
7405 element { }
7406 }
7407 @@XMLTest:
7408 @@@QName: xp.xml10.endofline.crnl.in.pi.1.test
7409 @@@DEnt:
7410 @@@@test:value:
7411 <?xml version="1.0"?>
7412 <?xml-$u000D$u0085?>
7413 <p/>
7414 @@@test:domTree:
7415 document {
7416 xml-version: '1.0';
7417 pi {
7418 node-name: 'xml-';
7419 node-value: U+0085;
7420 }
7421 element { }
7422 }
7423 @@XMLTest:
7424 @@@QName: xp.xml11.endofline.crnl.in.pi.1.test
7425 @@@DEnt:
7426 @@@@test:value:
7427 <?xml version="1.1"?>
7428 <?xml-$u000D$u0085?>
7429 <p/>
7430 @@@test:domTree:
7431 document {
7432 xml-version: '1.1';
7433 pi {
7434 node-name: 'xml-';
7435 node-value: '';
7436 }
7437 element { }
7438 }
7439 @@XMLTest:
7440 @@@QName: xp.xml10implied.endofline.ls.in.pi.1.test
7441 @@@DEnt:
7442 @@@@test:value:
7443 <?xml-$u2028?>
7444 <p/>
7445 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 7)..(2, 0); }
7446 @@XMLTest:
7447 @@@QName: xp.xml10.endofline.ls.in.pi.1.test
7448 @@@DEnt:
7449 @@@@test:value:
7450 <?xml version="1.0"?>
7451 <?xml-$u2028?>
7452 <p/>
7453 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 7)..(3, 0); }
7454 @@XMLTest:
7455 @@@QName: xp.xml11.endofline.ls.in.pi.1.test
7456 @@@DEnt:
7457 @@@@test:value:
7458 <?xml version="1.1"?>
7459 <?xml-$u2028?>
7460 <p/>
7461 @@@test:domTree:
7462 document {
7463 xml-version: '1.1';
7464 pi {
7465 node-name: 'xml-';
7466 node-value: '';
7467 }
7468 element { }
7469 }
7470
7471 @@XMLTest:
7472 @@@QName: xp.xml10.endofline.internal.1.test
7473 @@@DEnt:
7474 @@@@test:value:
7475 <?xml version="1.0"?>
7476 <!DOCTYPE a [
7477 <!ENTITY e "&#x000D; &#x000A; &#x0085; &#x000D;&#x000A; $
7478 &#x000D;&#x0085; &#x2028;">
7479 ]><a>&e;</a>
7480 @@@test:domTree:
7481 document {
7482 xml-version: '1.0';
7483 document-type {
7484 general-entity {
7485 node-name: 'e';
7486 text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7487 U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7488 }
7489 }
7490 element {
7491 text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7492 U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7493 }
7494 }
7495 @@XMLTest:
7496 @@@QName: xp.xml11.endofline.internal.1.test
7497 @@@DEnt:
7498 @@@@test:value:
7499 <?xml version="1.1"?>
7500 <!DOCTYPE a [
7501 <!ENTITY e "&#x000D; &#x000A; &#x0085; &#x000D;&#x000A; $
7502 &#x000D;&#x0085; &#x2028;">
7503 ]><a>&e;</a>
7504 @@@test:domTree:
7505 document {
7506 xml-version: '1.1';
7507 document-type {
7508 general-entity {
7509 node-name: 'e';
7510 text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7511 U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7512 }
7513 }
7514 element {
7515 text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7516 U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7517 }
7518 }
7519
7520 @@XMLTest:
7521 @@@QName: xp.noxmldecl.pi.pi.test
7522 @@@DEnt:
7523 @@@@test:value:
7524 <?noxml 1?><?noxml 2?><p/>
7525 @@@test:domTree:
7526 document {
7527 xml-version: '1.0';
7528 pi {
7529 node-name: 'noxml';
7530 node-value: '1';
7531 }
7532 pi {
7533 node-name: 'noxml';
7534 node-value: '2';
7535 }
7536 element { }
7537 }
7538 @@XMLTest:
7539 @@@QName: xp.noxmldecl.pi.pi.2.test
7540 @@@DEnt:
7541 @@@@test:value:
7542 <?xmlno 1?><?xmlno 2?><p/>
7543 @@@test:domTree:
7544 document {
7545 xml-version: '1.0';
7546 pi {
7547 node-name: 'xmlno';
7548 node-value: '1';
7549 }
7550 pi {
7551 node-name: 'xmlno';
7552 node-value: '2';
7553 }
7554 element { }
7555 }
7556 @@XMLTest:
7557 @@@QName: xp.noxmldecl.pi.pi.3.test
7558 @@@DEnt:
7559 @@@@test:value:
7560 <?xmln 1?><?xmln 2?><p/>
7561 @@@test:domTree:
7562 document {
7563 xml-version: '1.0';
7564 pi {
7565 node-name: 'xmln';
7566 node-value: '1';
7567 }
7568 pi {
7569 node-name: 'xmln';
7570 node-value: '2';
7571 }
7572 element { }
7573 }
7574 @@XMLTest:
7575 @@@QName: xp.noxml.s.nl.test
7576 @@@DEnt:
7577 @@@@test:value:
7578 $u0085<p/>
7579 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7580 @@XMLTest:
7581 @@@QName: xp.noxml.s.crnl.test
7582 @@@DEnt:
7583 @@@@test:value:
7584 $u000D$u0085<p/>
7585 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7586 @@XMLTest:
7587 @@@QName: xp.noxml.s.ls.test
7588 @@@DEnt:
7589 @@@@test:value:
7590 $u2028<p/>
7591 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7592 @@XMLTest:
7593 @@@QName: xp.xml10.decl.s.nl.test
7594 @@@DEnt:
7595 @@@@test:value:
7596 <?xml version="1.0"?>$u0085<p/>
7597 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 22)..(2, 0); }
7598 @@XMLTest:
7599 @@@QName: xp.xml10.decl.s.crnl.test
7600 @@@DEnt:
7601 @@@@test:value:
7602 <?xml version="1.0"?>$u000D$u0085<p/>
7603 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 0)..(3, 0); }
7604 @@XMLTest:
7605 @@@QName: xp.xml10.decl.s.ls.test
7606 @@@DEnt:
7607 @@@@test:value:
7608 <?xml version="1.0"?>$u2028<p/>
7609 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 22)..(2, 0); }
7610 @@XMLTest:
7611 @@@QName: xp.xml11.decl.s.nl.test
7612 @@@DEnt:
7613 @@@@test:value:
7614 <?xml version="1.1"?>$u0085<p/>
7615 @@@test:domTree:
7616 document {
7617 xml-version: '1.1';
7618 element { }
7619 }
7620 @@XMLTest:
7621 @@@QName: xp.xml11.decl.s.crnl.test
7622 @@@DEnt:
7623 @@@@test:value:
7624 <?xml version="1.1"?>$u000D$u0085<p/>
7625 @@@test:domTree:
7626 document {
7627 xml-version: '1.1';
7628 element { }
7629 }
7630 @@XMLTest:
7631 @@@QName: xp.xml11.decl.s.ls.test
7632 @@@DEnt:
7633 @@@@test:value:
7634 <?xml version="1.1"?>$u2028<p/>
7635 @@@test:domTree:
7636 document {
7637 xml-version: '1.1';
7638 element { }
7639 }
7640
7641 @@XMLTest:
7642 @@@QName: xp.element.type.match.1.test
7643 @@@DEnt:
7644 @@@@test:value:
7645 <p></pa>(err)
7646 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 4)..(1, 8); }
7647 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7648 @@XMLTest:
7649 @@@QName: xp.element.type.match.2.test
7650 @@@DEnt:
7651 @@@@test:value:
7652 <p><pa></pa></pa>(err)
7653 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 13)..(1, 17); }
7654 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7655 @@XMLTest:
7656 @@@QName: xp.element.type.match.3.test
7657 @@@DEnt:
7658 @@@@test:value:
7659 <p><pa></p></p>(err)
7660 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 8)..(1, 11); }
7661 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7662 @@XMLTest:
7663 @@@QName: xp.element.type.match.4.test
7664 @@@DEnt:
7665 @@@@test:value:
7666 <a:p xmlns:a="about:1"></p>(err)
7667 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 24)..(1, 27); }
7668 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7669 @@XMLTest:
7670 @@@QName: xp.element.type.match.5.test
7671 @@@DEnt:
7672 @@@@test:value:
7673 <a:p xmlns:a="about:1" xmlns:b="about:1"></b:p>(err)
7674 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 42)..(1, 47); }
7675 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7676
7677 @@XMLTest:
7678 @@@QName: xp.stag.stago.name.etago.test
7679 @@@DEnt:
7680 @@@@test:value:
7681 <a</a>
7682 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 3); }
7683 @@XMLTest:
7684 @@@QName: xp.stag.stago.name.s.etago.test
7685 @@@DEnt:
7686 @@@@test:value:
7687 <a </a>
7688 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 4); }
7689 @@XMLTest:
7690 @@@QName: xp.stag.stago.name.s.attr.etago.test
7691 @@@DEnt:
7692 @@@@test:value:
7693 <a a="b"</a>
7694 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
7695 @@XMLTest:
7696 @@@QName: xp.stag.stago.name.s.attr.s.attr.etago.test
7697 @@@DEnt:
7698 @@@@test:value:
7699 <a a="b" c="d"</a>
7700 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 15); }
7701 @@XMLTest:
7702 @@@QName: xp.stag.stago.name.s.attr.s.etago.test
7703 @@@DEnt:
7704 @@@@test:value:
7705 <a a="b" </a>
7706 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 10); }
7707 @@XMLTest:
7708 @@@QName: xp.stag.etag.1.test
7709 @@@DEnt:
7710 @@@@test:value:
7711 <root><a></a></root>
7712 @@@test:domTree:
7713 document {
7714 element {
7715 element {
7716 node-name: 'a';
7717 }
7718 }
7719 }
7720 @@XMLTest:
7721 @@@QName: xp.stag.etag.2.test
7722 @@@DEnt:
7723 @@@@test:value:
7724 <root><ab></ab></root>
7725 @@@test:domTree:
7726 document {
7727 element {
7728 element {
7729 node-name: 'ab';
7730 }
7731 }
7732 }
7733 @@XMLTest:
7734 @@@QName: xp.stag.etag.s.1.test
7735 @@@DEnt:
7736 @@@@test:value:
7737 <root><a ></a ></root>
7738 @@@test:domTree:
7739 document {
7740 element {
7741 element {
7742 node-name: 'a';
7743 }
7744 }
7745 }
7746 @@XMLTest:
7747 @@@QName: xp.etag.1.test
7748 @@@DEnt:
7749 @@@@test:value:
7750 <root><a/></root>
7751 @@@test:domTree:
7752 document {
7753 element {
7754 element {
7755 node-name: 'a';
7756 }
7757 }
7758 }
7759 @@XMLTest:
7760 @@@QName: xp.etag.2.test
7761 @@@DEnt:
7762 @@@@test:value:
7763 <root><a /></root>
7764 @@@test:domTree:
7765 document {
7766 element {
7767 element {
7768 node-name: 'a';
7769 }
7770 }
7771 }
7772 @@XMLTest:
7773 @@@QName: xp.stag.etag.attr.1.test
7774 @@@DEnt:
7775 @@@@test:value:
7776 <root><a at="v"></a></root>
7777 @@@test:domTree:
7778 document {
7779 element {
7780 element {
7781 node-name: 'a';
7782 attribute {
7783 node-name: 'at';
7784 value: 'v';
7785 }
7786 }
7787 }
7788 }
7789 @@XMLTest:
7790 @@@QName: xp.stag.etag.attr.2.test
7791 @@@DEnt:
7792 @@@@test:value:
7793 <root><a at="v" ></a></root>
7794 @@@test:domTree:
7795 document {
7796 element {
7797 element {
7798 node-name: 'a';
7799 attribute {
7800 node-name: 'at';
7801 value: 'v';
7802 }
7803 }
7804 }
7805 }
7806 @@XMLTest:
7807 @@@QName: xp.stag.etag.attr.3.test
7808 @@@DEnt:
7809 @@@@test:value:
7810 <root><a at ="v"></a></root>
7811 @@@test:domTree:
7812 document {
7813 element {
7814 element {
7815 node-name: 'a';
7816 attribute {
7817 node-name: 'at';
7818 value: 'v';
7819 }
7820 }
7821 }
7822 }
7823 @@XMLTest:
7824 @@@QName: xp.stag.etag.attr.4.test
7825 @@@DEnt:
7826 @@@@test:value:
7827 <root><a at= "v"></a></root>
7828 @@@test:domTree:
7829 document {
7830 element {
7831 element {
7832 node-name: 'a';
7833 attribute {
7834 node-name: 'at';
7835 value: 'v';
7836 }
7837 }
7838 }
7839 }
7840 @@XMLTest:
7841 @@@QName: xp.stag.etag.attr.5.test
7842 @@@DEnt:
7843 @@@@test:value:
7844 <root><a at='v'></a></root>
7845 @@@test:domTree:
7846 document {
7847 element {
7848 element {
7849 node-name: 'a';
7850 attribute {
7851 node-name: 'at';
7852 value: 'v';
7853 }
7854 }
7855 }
7856 }
7857 @@XMLTest:
7858 @@@QName: xp.stag.etag.attr.6.test
7859 @@@DEnt:
7860 @@@@test:value:
7861 <root><a at= 'v' ></a></root>
7862 @@@test:domTree:
7863 document {
7864 element {
7865 element {
7866 node-name: 'a';
7867 attribute {
7868 node-name: 'at';
7869 value: 'v';
7870 }
7871 }
7872 }
7873 }
7874 @@XMLTest:
7875 @@@QName: xp.stag.etag.attr.attr.1.test
7876 @@@DEnt:
7877 @@@@test:value:
7878 <root><a at="v" tr="w"></a></root>
7879 @@@test:domTree:
7880 document {
7881 element {
7882 element {
7883 node-name: 'a';
7884 attribute {
7885 node-name: 'at';
7886 value: 'v';
7887 }
7888 attribute {
7889 node-name: 'tr';
7890 value: 'w';
7891 }
7892 }
7893 }
7894 }
7895 @@XMLTest:
7896 @@@QName: xp.stag.etag.attr.attr.2.test
7897 @@@DEnt:
7898 @@@@test:value:
7899 <root><a tr="w" at="v"></a></root>
7900 @@@test:domTree:
7901 document {
7902 element {
7903 element {
7904 node-name: 'a';
7905 attribute {
7906 node-name: 'at';
7907 value: 'v';
7908 }
7909 attribute {
7910 node-name: 'tr';
7911 value: 'w';
7912 }
7913 }
7914 }
7915 }
7916 @@XMLTest:
7917 @@@QName: xp.stag.etag.attr.no.s.attr.test
7918 @@@DEnt:
7919 @@@@test:value:
7920 <root><a at="v"tr="w"></a></root>
7921 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 16)..(1, 17); }
7922 @@XMLTest:
7923 @@@QName: xp.etag.attr.1.test
7924 @@@DEnt:
7925 @@@@test:value:
7926 <root><a at="v" tr="w"></a b="c"></root>
7927 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
7928 @@XMLTest:
7929 @@@QName: xp.etag.no.etagc.1.test
7930 @@@DEnt:
7931 @@@@test:value:
7932 <root><a at="v" tr="w"></a</root>
7933 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27)..(1, 28); }
7934 @@XMLTest:
7935 @@@QName: xp.etag.no.etagc.2.test
7936 @@@DEnt:
7937 @@@@test:value:
7938 <root><a at="v" tr="w"></a </root>
7939 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 29)..(1, 30); }
7940 @@XMLTest:
7941 @@@QName: xp.mtag.attr.1.test
7942 @@@DEnt:
7943 @@@@test:value:
7944 <root><a b="c"/></root>
7945 @@@test:domTree:
7946 document {
7947 element {
7948 element {
7949 node-name: 'a';
7950 attribute {
7951 node-name: 'b';
7952 value: 'c';
7953 }
7954 }
7955 }
7956 }
7957 @@XMLTest:
7958 @@@QName: xp.mtag.attr.2.test
7959 @@@DEnt:
7960 @@@@test:value:
7961 <root><a b="c" /></root>
7962 @@@test:domTree:
7963 document {
7964 element {
7965 element {
7966 node-name: 'a';
7967 attribute {
7968 node-name: 'b';
7969 value: 'c';
7970 }
7971 }
7972 }
7973 }
7974 @@XMLTest:
7975 @@@QName: xp.mtag.attr.3.test
7976 @@@DEnt:
7977 @@@@test:value:
7978 <root><a b='c'/></root>
7979 @@@test:domTree:
7980 document {
7981 element {
7982 element {
7983 node-name: 'a';
7984 attribute {
7985 node-name: 'b';
7986 value: 'c';
7987 }
7988 }
7989 }
7990 }
7991 @@XMLTest:
7992 @@@QName: xp.mtag.attr.4.test
7993 @@@DEnt:
7994 @@@@test:value:
7995 <root><a b="c" d="e"/></root>
7996 @@@test:domTree:
7997 document {
7998 element {
7999 element {
8000 node-name: 'a';
8001 attribute {
8002 node-name: 'b';
8003 value: 'c';
8004 }
8005 attribute {
8006 node-name: 'd';
8007 value: 'e';
8008 }
8009 }
8010 }
8011 }
8012
8013 @@XMLTest:
8014 @@@QName: xp.attvalue.lt.1.test
8015 @@@DEnt:
8016 @@@@test:value:
8017 <a b="aa<dd"/>
8018 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
8019 @@XMLTest:
8020 @@@QName: xp.attvalue.lt.2.test
8021 @@@DEnt:
8022 @@@@test:value:
8023 <a b='aa<dd'/>
8024 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
8025 @@XMLTest:
8026 @@@QName: xp.attvalue.amp.1.test
8027 @@@DEnt:
8028 @@@@test:value:
8029 <a b="aa& dd"/>
8030 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 12); }
8031 @@XMLTest:
8032 @@@QName: xp.attvalue.amp.2.test
8033 @@@DEnt:
8034 @@@@test:value:
8035 <a b='aa& dd'/>
8036 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 12); }
8037 @@XMLTest:
8038 @@@QName: xp.attvalue.amp.3.test
8039 @@@DEnt:
8040 @@@@test:value:
8041 <a b="aa&# dd"/>
8042 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 13); }
8043 @@XMLTest:
8044 @@@QName: xp.attvalue.amp.4.test
8045 @@@DEnt:
8046 @@@@test:value:
8047 <a b="aa&#x dd"/>
8048 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 14); }
8049
8050 @@XMLTest:
8051 @@@QName: xp.unique.att.spec.1.test
8052 @@@DEnt:
8053 @@@@test:value:
8054 <a b="c" b="d"/>
8055 @@@c:erred: <[[xp|wf-unique-att-spec]]> { (1, 4)..(1, 14); }
8056 @@XMLTest:
8057 @@@QName: xp.unique.att.spec.2.test
8058 @@@DEnt:
8059 @@@@test:value:
8060 <a d:b="c" d:b="d" xmlns:d="about:2"/>
8061 @@@c:erred: <[[xp|wf-unique-att-spec]]> { (1, 4)..(1, 18); }
8062
8063 @@XMLTest:
8064 @@@QName: xp.no.external.entity.references.1.test
8065 @@@DEnt:
8066 @@@@test:value:
8067 <!DOCTYPE a [
8068 <!ENTITY ent SYSTEM "something">
8069 ]>
8070 <a b="c&ent;"/>
8071 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (4, 8)..(4, 12); }
8072 @@XMLTest:
8073 @@@QName: xp.no.external.entity.references.2.test
8074 @@@DEnt:
8075 @@@@test:value:
8076 <!DOCTYPE a [
8077 <!NOTATION n SYSTEM "notation">
8078 <!ENTITY ent SYSTEM "something" NDATA n>
8079 ]>
8080 <a b="c&ent;"/>
8081 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (5, 8)..(5, 12); }
8082 @@XMLTest:
8083 @@@QName: xp.no.external.entity.references.3.test
8084 @@@DEnt:
8085 @@@@test:value:
8086 <!DOCTYPE a [
8087 <!ENTITY ent SYSTEM "something">
8088 <!ENTITY ent2 "ddd&ent;">
8089 ]>
8090 <a b="c&ent2;"/>
8091 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 4)..(1, 8); }
8092 @@XMLTest:
8093 @@@QName: xp.no.external.entity.references.4.test
8094 @@@DEnt:
8095 @@@@test:value:
8096 <!DOCTYPE a [
8097 <!NOTATION n SYSTEM "notation">
8098 <!ENTITY ent SYSTEM "something" NDATA n>
8099 <!ENTITY ent2 "ddd&ent;">
8100 ]>
8101 <a b="c&ent2;"/>
8102 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 4)..(1, 8); }
8103 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
8104 @@XMLTest:
8105 @@@QName: xp.no.lt.in.attr.value.1.test
8106 @@@DEnt:
8107 @@@@test:value:
8108 <!DOCTYPE a [
8109 <!ENTITY ent "aa<bb">
8110 ]>
8111 <a b="c&ent;"/>
8112 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8113 @@@c:erred:
8114 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8115 @@@@enImplNote: When entity node is created.
8116 @@XMLTest:
8117 @@@QName: xp.no.lt.in.attr.value.2.test
8118 @@@DEnt:
8119 @@@@test:value:
8120 <!DOCTYPE a [
8121 <!ENTITY ent "aa<bb">
8122 <!ENTITY ent2 "ccc&ent;">
8123 ]>
8124 <a b="c&ent2;"/>
8125 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8126 @@@c:erred:
8127 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8128 @@@@enImplNote: When entity node is created.
8129 @@XMLTest:
8130 @@@QName: xp.no.lt.in.attr.value.3.test
8131 @@@DEnt:
8132 @@@@test:value:
8133 <!DOCTYPE a [
8134 <!ENTITY ent "aa&#x3C;bb">
8135 ]>
8136 <a b="c&ent;"/>
8137 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8138 @@@c:erred:
8139 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8140 @@@@enImplNote: When entity node is created.
8141 @@XMLTest:
8142 @@@QName: xp.no.lt.in.attr.value.4.test
8143 @@@DEnt:
8144 @@@@test:value:
8145 <!DOCTYPE a [
8146 <!ENTITY ent "aa&#x3C;bb">
8147 <!ENTITY ent2 "ccc&ent;">
8148 ]>
8149 <a b="c&ent2;"/>
8150 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8151 @@@c:erred:
8152 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8153 @@@@enImplNote: When entity node is created.
8154 @@XMLTest:
8155 @@@QName: xp.ger.lt.in.attr.value.1.test
8156 @@@DEnt:
8157 @@@@test:value:
8158 <!DOCTYPE a [
8159 <!ENTITY ent "aa&lt;bb">
8160 ]>
8161 <a b="c&ent;"/>
8162 @@@test:domTree:
8163 document {
8164 document-type {
8165 general-entity {
8166 node-name: 'ent';
8167 text-content: 'aa<bb';
8168 }
8169 }
8170 element {
8171 attribute {
8172 node-name: 'b';
8173 text { data: 'c'; }
8174 general-entity-reference {
8175 is-expanded: true;
8176 node-name: 'ent';
8177 text-content: 'aa<bb';
8178 }
8179 }
8180 }
8181 }
8182 @@XMLTest:
8183 @@@QName: xp.ger.lt.in.attr.value.2.test
8184 @@@DEnt:
8185 @@@@test:value:
8186 <!DOCTYPE a [
8187 <!ENTITY ent "aa&lt;bb">
8188 <!ENTITY ent2 "ccc&ent;">
8189 ]>
8190 <a b="c&ent2;"/>
8191 @@@test:domTree:
8192 document {
8193 document-type {
8194 general-entity {
8195 node-name: 'ent';
8196 text-content: 'aa<bb';
8197 }
8198 general-entity {
8199 node-name: 'ent2';
8200 text { data: 'ccc'; }
8201 general-entity-reference {
8202 node-name: 'ent';
8203 text-content: 'aa<bb';
8204 is-expanded: true;
8205 }
8206 }
8207 }
8208 element {
8209 attribute {
8210 node-name: 'b';
8211 text { data: 'c'; }
8212 general-entity-reference {
8213 node-name: 'ent2';
8214 text { data: 'ccc'; }
8215 general-entity-reference {
8216 node-name: 'ent';
8217 text-content: 'aa<bb';
8218 is-expanded: true;
8219 }
8220 is-expanded: true;
8221 }
8222 }
8223 }
8224 }
8225
8226 @@XMLTest:
8227 @@@QName: xp.doctype.intsubset.pi.test
8228 @@@DEnt:
8229 @@@@test:value:
8230 <!DOCTYPE a [
8231 <?pi data ?>
8232 ]>
8233 <a></a>
8234 @@@test:domTree:
8235 document {
8236 xml-version: '1.0';
8237 xml-encoding: null;
8238 xml-standalone: false;
8239 document-type {
8240 node-name: 'a';
8241 pi {
8242 target: 'pi';
8243 data: 'data ';
8244 }
8245 }
8246 element {
8247 namespace-uri: null;
8248 prefix: null;
8249 local-name: 'a';
8250 text-content: '';
8251 }
8252 }
8253 @@@enImplNote:
8254 A DOM PI node in doctype node is a manakai extension.
8255
8256
8257 @@XMLTest:
8258 @@@QName: xp.doctype.intsubset.entity.general.internal.test
8259 @@@DEnt:
8260 @@@@test:value:
8261 <!DOCTYPE a [
8262 <!ENTITY entity "entity value">
8263 ]>
8264 <a></a>
8265 @@@test:domTree:
8266 document {
8267 xml-version: '1.0';
8268 xml-encoding: null;
8269 xml-standalone: false;
8270 document-type {
8271 node-name: 'a';
8272 general-entity {
8273 node-name: 'entity';
8274 text-content: 'entity value';
8275 has-replacement-tree: true;
8276 }
8277 }
8278 element {
8279 namespace-uri: null;
8280 prefix: null;
8281 local-name: 'a';
8282 text-content: '';
8283 }
8284 }
8285 @@XMLTest:
8286 @@@QName: xp.doctype.intsubset.entity.parameter.internal.test
8287 @@@DEnt:
8288 @@@@test:value:
8289 <!DOCTYPE a [
8290 <!ENTITY % entity "entity value">
8291 ]>
8292 <a></a>
8293 @@@test:domTree:
8294 document {
8295 xml-version: '1.0';
8296 xml-encoding: null;
8297 xml-standalone: false;
8298 document-type {
8299 node-name: 'a';
8300 }
8301 element {
8302 namespace-uri: null;
8303 prefix: null;
8304 local-name: 'a';
8305 text-content: '';
8306 }
8307 }
8308
8309 @@XMLTest:
8310 @@@QName: xp.doctype.internal.entity.root.element.text.only.test
8311 @@@DEnt:
8312 @@@@test:value:
8313 <!DOCTYPE a [
8314 <!ENTITY entity "entity value">
8315 ]>
8316 <a>&entity;</a>
8317 @@@test:domTree:
8318 document {
8319 xml-version: '1.0';
8320 xml-encoding: null;
8321 xml-standalone: false;
8322 document-type {
8323 node-name: 'a';
8324 general-entity {
8325 node-name: 'entity';
8326 text-content: 'entity value';
8327 has-replacement-tree: true;
8328 }
8329 }
8330 element {
8331 namespace-uri: null;
8332 prefix: null;
8333 local-name: 'a';
8334 general-entity-reference {
8335 node-name: 'entity';
8336 text {
8337 data: 'entity value';
8338 }
8339 is-expanded: true;
8340 }
8341 }
8342 }
8343 @@XMLTest:
8344 @@@QName: xp.doctype.internal.entity.root.element.text.mult.test
8345 @@@DEnt:
8346 @@@@test:value:
8347 <!DOCTYPE a [
8348 <!ENTITY entity "entity value">
8349 ]>
8350 <a>&entity; and &entity;</a>
8351 @@@test:domTree:
8352 document {
8353 xml-version: '1.0';
8354 xml-encoding: null;
8355 xml-standalone: false;
8356 document-type {
8357 node-name: 'a';
8358 general-entity {
8359 node-name: 'entity';
8360 text-content: 'entity value';
8361 has-replacement-tree: true;
8362 }
8363 }
8364 element {
8365 namespace-uri: null;
8366 prefix: null;
8367 local-name: 'a';
8368 general-entity-reference {
8369 node-name: 'entity';
8370 text {
8371 data: 'entity value';
8372 }
8373 is-expanded: true;
8374 }
8375 text { data: ' and '; }
8376 general-entity-reference {
8377 node-name: 'entity';
8378 text {
8379 data: 'entity value';
8380 }
8381 is-expanded: true;
8382 }
8383 }
8384 }
8385 @@XMLTest:
8386 @@@QName: xp.doctype.internal.entity.root.element.text.element.test
8387 @@@DEnt:
8388 @@@@test:value:
8389 <!DOCTYPE a [
8390 <!ENTITY entity "entity <p>value</p> with <e>element</e> ">
8391 ]>
8392 <a>&entity;</a>
8393 @@@test:domTree:
8394 document {
8395 xml-version: '1.0';
8396 xml-encoding: null;
8397 xml-standalone: false;
8398 document-type {
8399 node-name: 'a';
8400 general-entity {
8401 node-name: 'entity';
8402 has-replacement-tree: true;
8403 text { data: 'entity '; }
8404 element {
8405 node-name: 'p';
8406 text-content: 'value';
8407 }
8408 text { data: ' with '; }
8409 element {
8410 node-name: 'e';
8411 text-content: 'element';
8412 }
8413 text { data: ' '; }
8414 }
8415 }
8416 element {
8417 namespace-uri: null;
8418 prefix: null;
8419 local-name: 'a';
8420 general-entity-reference {
8421 node-name: 'entity';
8422 is-expanded: true;
8423 text {
8424 data: 'entity ';
8425 }
8426 element {
8427 namespace-uri: null;
8428 prefix: null;
8429 local-name: 'p';
8430 text {
8431 data: 'value';
8432 }
8433 }
8434 text {
8435 data: ' with ';
8436 }
8437 element {
8438 namespace-uri: null;
8439 prefix: null;
8440 local-name: 'e';
8441 text {
8442 data: 'element';
8443 }
8444 }
8445 text {
8446 data: ' ';
8447 }
8448 }
8449 }
8450 }
8451 @@XMLTest:
8452 @@@QName: xp.doctype.internal.entity.root.element.text.in.ent.test
8453 @@@DEnt:
8454 @@@@test:value:
8455 <!DOCTYPE a [
8456 <!ENTITY entity1 "entity value">
8457 <!ENTITY entity2 "e&entity1;n">
8458 ]>
8459 <a>&entity2;</a>
8460 @@@test:domTree:
8461 document {
8462 xml-version: '1.0';
8463 xml-encoding: null;
8464 xml-standalone: false;
8465 document-type {
8466 node-name: 'a';
8467 general-entity {
8468 node-name: 'entity1';
8469 text-content: 'entity value';
8470 }
8471 general-entity {
8472 node-name: 'entity2';
8473 text { data: 'e'; }
8474 general-entity-reference {
8475 node-name: 'entity1';
8476 text-content: 'entity value';
8477 is-expanded: true;
8478 }
8479 text { data: 'n'; }
8480 }
8481 }
8482 element {
8483 namespace-uri: null;
8484 prefix: null;
8485 local-name: 'a';
8486 general-entity-reference {
8487 node-name: 'entity2';
8488 text { data: 'e'; }
8489 is-expanded: true;
8490 general-entity-reference {
8491 node-name: 'entity1';
8492 text {
8493 data: 'entity value';
8494 }
8495 is-expanded: true;
8496 }
8497 text { data: 'n'; }
8498 }
8499 }
8500 }
8501
8502 @@XMLTest:
8503 @@@QName: xp.doctype.entity.value.charref.test
8504 @@@DEnt:
8505 @@@@test:value:
8506 <!DOCTYPE a [
8507 <!ENTITY entity1 "entity &#x21;value&#35;">
8508 <!ENTITY entity2 '&#x21;value&#35;'>
8509 ]>
8510 <a></a>
8511 @@@test:domTree:
8512 document {
8513 document-type {
8514 general-entity {
8515 node-name: 'entity1';
8516 text-content: 'entity !value#';
8517 has-replacement-tree: true;
8518 }
8519 general-entity {
8520 node-name: 'entity2';
8521 text-content: '!value#';
8522 has-replacement-tree: true;
8523 }
8524 }
8525 element { }
8526 }
8527
8528 @@XMLTest:
8529 @@@QName: xp.predefined.in.content.test
8530 @@@DEnt:
8531 @@@@test:value:
8532 <a>_&lt;_&gt;_&quot;_&apos;_&amp;_</a>
8533 @@@test:domTree:
8534 document {
8535 element {
8536 text-content: '_<_>_"_' U+0027 '_&_';
8537 }
8538 }
8539 @@XMLTest:
8540 @@@QName: xp.predefined.in.attr.test
8541 @@@DEnt:
8542 @@@@test:value:
8543 <a at="_&lt;_&gt;_&quot;_&apos;_&amp;_"></a>
8544 @@@test:domTree:
8545 document {
8546 element {
8547 attribute {
8548 node-name: 'at';
8549 text-content: '_<_>_"_' U+0027 '_&_';
8550 }
8551 }
8552 }
8553 @@XMLTest:
8554 @@@QName: xp.predefined.in.content.in.entity.test
8555 @@@DEnt:
8556 @@@@test:value:
8557 <!DOCTYPE a [
8558 <!ENTITY ent "_&lt;_&gt;_&quot;_&apos;_&amp;_">
8559 ]>
8560 <a>&ent;</a>
8561 @@@test:domTree:
8562 document {
8563 document-type {
8564 general-entity {
8565 node-name: 'ent';
8566 text-content: '_<_>_"_' U+0027 '_&_';
8567 }
8568 }
8569 element {
8570 text-content: '_<_>_"_' U+0027 '_&_';
8571 }
8572 }
8573 @@XMLTest:
8574 @@@QName: xp.predefined.decl.ignore.test
8575 @@@DEnt:
8576 @@@@test:value:
8577 <!DOCTYPE a [
8578 <!ENTITY lt "&#x26;#x3C;">
8579 <!ENTITY gt "&#x3E;">
8580 <!ENTITY amp "&#x26;#x26;">
8581 <!ENTITY quot "&#x22;">
8582 <!ENTITY apos "&#x27;">
8583 <!ENTITY other "other">
8584 ]>
8585 <a>_&lt;_&gt;_&quot;_&apos;_&amp;_&other;_</a>
8586 @@@test:domTree:
8587 document {
8588 document-type {
8589 general-entity {
8590 node-name: 'other';
8591 text-content: 'other';
8592 }
8593 }
8594 element {
8595 text-content: '_<_>_"_' U+0027 '_&_other_';
8596 }
8597 }
8598
8599 @@XMLTest:
8600 @@@QName: xp.doctype.internal.attr.empty.test
8601 @@@DEnt:
8602 @@@@test:value:
8603 <!DOCTYPE a [
8604 <!ATTLIST a>
8605 ]>
8606 <a></a>
8607 @@@test:domTree:
8608 document {
8609 xml-version: '1.0';
8610 xml-encoding: null;
8611 xml-standalone: false;
8612 document-type {
8613 node-name: 'a';
8614 element-type-definition {
8615 node-name: 'a';
8616 }
8617 }
8618 element {
8619 namespace-uri: null;
8620 local-name: 'a';
8621 }
8622 }
8623 @@XMLTest:
8624 @@@QName: xp.doctype.internal.attr.cdata.implied.test
8625 @@@DEnt:
8626 @@@@test:value:
8627 <!DOCTYPE a [
8628 <!ATTLIST a
8629 at CDATA #IMPLIED
8630 >
8631 ]>
8632 <a></a>
8633 @@@test:domTree:
8634 document {
8635 xml-version: '1.0';
8636 xml-encoding: null;
8637 xml-standalone: false;
8638 document-type {
8639 node-name: 'a';
8640 element-type-definition {
8641 node-name: 'a';
8642 attribute-definition {
8643 node-name: 'at';
8644 declared-type: const (CDATA_ATTR);
8645 allowed-tokens: DOMStringList ();
8646 default-type: const (IMPLIED_DEFAULT);
8647 text-content: '';
8648 }
8649 }
8650 }
8651 element {
8652 namespace-uri: null;
8653 local-name: 'a';
8654 }
8655 }
8656 @@XMLTest:
8657 @@@QName: xp.doctype.internal.attr.types.implied.test
8658 @@@DEnt:
8659 @@@@test:value:
8660 <!DOCTYPE a [
8661 <!ATTLIST a
8662 at1 ID #IMPLIED
8663 at2 IDREF #IMPLIED
8664 at3 IDREFS #IMPLIED
8665 at4 ENTITY #IMPLIED
8666 at5 ENTITIES #IMPLIED
8667 at6 NMTOKEN #IMPLIED
8668 at7 NMTOKENS #IMPLIED
8669 at8 NOTATION (n1 | n2|n3) #IMPLIED
8670 at9 (e1| e2| e3 ) #IMPLIED
8671 >
8672 ]>
8673 <a></a>
8674 @@@test:domTree:
8675 document {
8676 xml-version: '1.0';
8677 xml-encoding: null;
8678 xml-standalone: false;
8679 document-type {
8680 node-name: 'a';
8681 element-type-definition {
8682 node-name: 'a';
8683 attribute-definition {
8684 node-name: 'at1';
8685 declared-type: const (ID_ATTR);
8686 allowed-tokens: DOMStringList ();
8687 default-type: const (IMPLIED_DEFAULT);
8688 text-content: '';
8689 }
8690 attribute-definition {
8691 node-name: 'at2';
8692 declared-type: const (IDREF_ATTR);
8693 allowed-tokens: DOMStringList ();
8694 default-type: const (IMPLIED_DEFAULT);
8695 text-content: '';
8696 }
8697 attribute-definition {
8698 node-name: 'at3';
8699 declared-type: const (IDREFS_ATTR);
8700 allowed-tokens: DOMStringList ();
8701 default-type: const (IMPLIED_DEFAULT);
8702 text-content: '';
8703 }
8704 attribute-definition {
8705 node-name: 'at4';
8706 declared-type: const (ENTITY_ATTR);
8707 allowed-tokens: DOMStringList ();
8708 default-type: const (IMPLIED_DEFAULT);
8709 text-content: '';
8710 }
8711 attribute-definition {
8712 node-name: 'at5';
8713 declared-type: const (ENTITIES_ATTR);
8714 allowed-tokens: DOMStringList ();
8715 default-type: const (IMPLIED_DEFAULT);
8716 text-content: '';
8717 }
8718 attribute-definition {
8719 node-name: 'at6';
8720 declared-type: const (NMTOKEN_ATTR);
8721 allowed-tokens: DOMStringList ();
8722 default-type: const (IMPLIED_DEFAULT);
8723 text-content: '';
8724 }
8725 attribute-definition {
8726 node-name: 'at7';
8727 declared-type: const (NMTOKENS_ATTR);
8728 allowed-tokens: DOMStringList ();
8729 default-type: const (IMPLIED_DEFAULT);
8730 text-content: '';
8731 }
8732 attribute-definition {
8733 node-name: 'at8';
8734 declared-type: const (NOTATION_ATTR);
8735 allowed-tokens: DOMStringList ('n1', 'n2', 'n3');
8736 default-type: const (IMPLIED_DEFAULT);
8737 text-content: '';
8738 }
8739 attribute-definition {
8740 node-name: 'at9';
8741 declared-type: const (ENUMERATION_ATTR);
8742 allowed-tokens: DOMStringList ('e1', 'e2', 'e3');
8743 default-type: const (IMPLIED_DEFAULT);
8744 text-content: '';
8745 }
8746 }
8747 }
8748 element {
8749 namespace-uri: null;
8750 local-name: 'a';
8751 }
8752 }
8753 @@XMLTest:
8754 @@@QName: xp.doctype.internal.attr.cdata.defaults.test
8755 @@@DEnt:
8756 @@@@test:value:
8757 <!DOCTYPE a [
8758 <!ATTLIST a
8759 at1 CDATA #IMPLIED
8760 at2 CDATA #REQUIRED
8761 at3 CDATA #FIXED "value3"
8762 at4 CDATA "value4"
8763 at5 CDATA #FIXED 'value5'
8764 at6 CDATA 'value6'
8765 >
8766 ]>
8767 <a></a>
8768 @@@test:domTree:
8769 document {
8770 xml-version: '1.0';
8771 xml-encoding: null;
8772 xml-standalone: false;
8773 document-type {
8774 node-name: 'a';
8775 element-type-definition {
8776 node-name: 'a';
8777 attribute-definition {
8778 node-name: 'at1';
8779 declared-type: const (CDATA_ATTR);
8780 allowed-tokens: DOMStringList ();
8781 default-type: const (IMPLIED_DEFAULT);
8782 text-content: '';
8783 }
8784 attribute-definition {
8785 node-name: 'at2';
8786 declared-type: const (CDATA_ATTR);
8787 allowed-tokens: DOMStringList ();
8788 default-type: const (REQUIRED_DEFAULT);
8789 text-content: '';
8790 }
8791 attribute-definition {
8792 node-name: 'at3';
8793 declared-type: const (CDATA_ATTR);
8794 allowed-tokens: DOMStringList ();
8795 default-type: const (FIXED_DEFAULT);
8796 text-content: 'value3';
8797 }
8798 attribute-definition {
8799 node-name: 'at4';
8800 declared-type: const (CDATA_ATTR);
8801 allowed-tokens: DOMStringList ();
8802 default-type: const (EXPLICIT_DEFAULT);
8803 text-content: 'value4';
8804 }
8805 attribute-definition {
8806 node-name: 'at5';
8807 declared-type: const (CDATA_ATTR);
8808 allowed-tokens: DOMStringList ();
8809 default-type: const (FIXED_DEFAULT);
8810 text-content: 'value5';
8811 }
8812 attribute-definition {
8813 node-name: 'at6';
8814 declared-type: const (CDATA_ATTR);
8815 allowed-tokens: DOMStringList ();
8816 default-type: const (EXPLICIT_DEFAULT);
8817 text-content: 'value6';
8818 }
8819 }
8820 }
8821 element {
8822 namespace-uri: null;
8823 local-name: 'a';
8824 attribute {
8825 node-name: 'at3';
8826 text-content: 'value3';
8827 specified: false;
8828 }
8829 attribute {
8830 node-name: 'at4';
8831 text-content: 'value4';
8832 specified: false;
8833 }
8834 attribute {
8835 node-name: 'at5';
8836 text-content: 'value5';
8837 specified: false;
8838 }
8839 attribute {
8840 node-name: 'at6';
8841 text-content: 'value6';
8842 specified: false;
8843 }
8844 }
8845 }
8846
8847 @@XMLTest:
8848 @@@QName: xp.doctype.internal.attr.cdata.default.normalize.test
8849 @@@DEnt:
8850 @@@@test:value:
8851 <!DOCTYPE a [
8852 <!ATTLIST a
8853 at CDATA " default &#x0A;value "
8854 >
8855 ]>
8856 <a></a>
8857 @@@test:domTree:
8858 document {
8859 xml-version: '1.0';
8860 xml-encoding: null;
8861 xml-standalone: false;
8862 document-type {
8863 node-name: 'a';
8864 element-type-definition {
8865 node-name: 'a';
8866 attribute-definition {
8867 node-name: 'at';
8868 declared-type: const (CDATA_ATTR);
8869 allowed-tokens: DOMStringList ();
8870 default-type: const (EXPLICIT_DEFAULT);
8871 text-content: ' default ' U+000A 'value ';
8872 }
8873 }
8874 }
8875 element {
8876 namespace-uri: null;
8877 local-name: 'a';
8878 attribute {
8879 node-name: 'at';
8880 text-content: ' default ' U+000A 'value ';
8881 specified: false;
8882 }
8883 }
8884 }
8885 @@XMLTest:
8886 @@@QName: xp.doctype.internal.attr.nmtoken.default.normalize.test
8887 @@@DEnt:
8888 @@@@test:value:
8889 <!DOCTYPE a [
8890 <!ATTLIST a
8891 at NMTOKEN " default &#x0A;value "
8892 >
8893 ]>
8894 <a></a>
8895 @@@test:domTree:
8896 document {
8897 xml-version: '1.0';
8898 xml-encoding: null;
8899 xml-standalone: false;
8900 document-type {
8901 node-name: 'a';
8902 element-type-definition {
8903 node-name: 'a';
8904 attribute-definition {
8905 node-name: 'at';
8906 declared-type: const (NMTOKEN_ATTR);
8907 allowed-tokens: DOMStringList ();
8908 default-type: const (EXPLICIT_DEFAULT);
8909 text-content: ' default ' U+000A 'value ';
8910 }
8911 }
8912 }
8913 element {
8914 namespace-uri: null;
8915 local-name: 'a';
8916 attribute {
8917 node-name: 'at';
8918 text-content: ' default ' U+000A 'value ';
8919 specified: false;
8920 }
8921 }
8922 }
8923
8924 @@XMLTest:
8925 @@@QName: xp.doctype.attrtype.no-value.test
8926 @@@DEnt:
8927 @@@@test:value:
8928 <!DOCTYPE a>
8929 <a at=" at value "></a>
8930 @@@test:domTree:
8931 document {
8932 xml-version: '1.0';
8933 xml-encoding: null;
8934 xml-standalone: false;
8935 document-type { }
8936 element {
8937 namespace-uri: null;
8938 local-name: 'a';
8939 attribute {
8940 namespace-uri: null;
8941 local-name: 'at';
8942 value: ' at value ';
8943 text {
8944 data: ' at value ';
8945 }
8946 schema-type-info: TypeInfo (null, null);
8947 specified: true;
8948 }
8949 }
8950 }
8951 @@XMLTest:
8952 @@@QName: xp.doctype.attrtype.cdata.test
8953 @@@DEnt:
8954 @@@@test:value:
8955 <!DOCTYPE a [
8956 <!ATTLIST a
8957 at CDATA #IMPLIED
8958 >
8959 ]>
8960 <a at=" at value "></a>
8961 @@@test:domTree:
8962 document {
8963 xml-version: '1.0';
8964 xml-encoding: null;
8965 xml-standalone: false;
8966 document-type { }
8967 element {
8968 namespace-uri: null;
8969 local-name: 'a';
8970 attribute {
8971 namespace-uri: null;
8972 local-name: 'at';
8973 value: ' at value ';
8974 text {
8975 data: ' at value ';
8976 }
8977 schema-type-info:
8978 TypeInfo ('http://www.w3.org/TR/REC-xml', 'CDATA');
8979 specified: true;
8980 }
8981 }
8982 }
8983 @@XMLTest:
8984 @@@QName: xp.doctype.attrtype.nmtoken.test
8985 @@@DEnt:
8986 @@@@test:value:
8987 <!DOCTYPE a [
8988 <!ATTLIST a
8989 at NMTOKEN #IMPLIED
8990 >
8991 ]>
8992 <a at=" at value "></a>
8993 @@@test:domTree:
8994 document {
8995 xml-version: '1.0';
8996 xml-encoding: null;
8997 xml-standalone: false;
8998 document-type { }
8999 element {
9000 namespace-uri: null;
9001 local-name: 'a';
9002 attribute {
9003 namespace-uri: null;
9004 local-name: 'at';
9005 value: 'at value';
9006 text {
9007 data: ' at value ';
9008 }
9009 schema-type-info:
9010 TypeInfo ('http://www.w3.org/TR/REC-xml', 'NMTOKEN');
9011 specified: true;
9012 }
9013 }
9014 }
9015
9016 @@XMLTest:
9017 @@@QName: xp.doctype.attr.normalization.1.test
9018 @@@DEnt:
9019 @@@@test:value:
9020 <a at=" at &#xA;value "></a>
9021 @@@test:domTree:
9022 document {
9023 element {
9024 attribute {
9025 node-name: 'at';
9026 value: ' at ' U+000A 'value ';
9027 schema-type-info: TypeInfo (null, null);
9028 specified: true;
9029 }
9030 }
9031 }
9032 @@XMLTest:
9033 @@@QName: xp.doctype.attr.normalization.2.test
9034 @@@DEnt:
9035 @@@@test:value:
9036 <a at=" at &#xD;value "></a>
9037 @@@test:domTree:
9038 document {
9039 element {
9040 attribute {
9041 value: ' at ' U+000D 'value ';
9042 schema-type-info: TypeInfo (null, null);
9043 specified: true;
9044 }
9045 }
9046 }
9047 @@XMLTest:
9048 @@@QName: xp.doctype.attr.normalization.3.test
9049 @@@DEnt:
9050 @@@@test:value:
9051 <a at=" at &#x9;value "></a>
9052 @@@test:domTree:
9053 document {
9054 element {
9055 attribute {
9056 node-name: 'at';
9057 value: ' at ' U+0009 'value ';
9058 schema-type-info: TypeInfo (null, null);
9059 specified: true;
9060 }
9061 }
9062 }
9063
9064 @@XMLTest:
9065 @@@QName: xp.doctype.attr.specified.1.test
9066 @@@DEnt:
9067 @@@@test:value:
9068 <!DOCTYPE a [
9069 <!ATTLIST a
9070 at CDATA "default"
9071 >
9072 ]>
9073 <a></a>
9074 @@@test:domTree:
9075 document {
9076 document-type { }
9077 element {
9078 attribute {
9079 node-name: 'at';
9080 value: 'default';
9081 specified: false;
9082 }
9083 }
9084 }
9085 @@XMLTest:
9086 @@@QName: xp.doctype.attr.specified.2.test
9087 @@@DEnt:
9088 @@@@test:value:
9089 <!DOCTYPE a [
9090 <!ATTLIST a
9091 at CDATA "default"
9092 >
9093 ]>
9094 <a at2="specified"></a>
9095 @@@test:domTree:
9096 document {
9097 document-type { }
9098 element {
9099 attribute {
9100 node-name: 'at';
9101 value: 'default';
9102 specified: false;
9103 }
9104 attribute {
9105 node-name: 'at2';
9106 value: 'specified';
9107 specified: true;
9108 }
9109 }
9110 }
9111 @@XMLTest:
9112 @@@QName: xp.doctype.attr.specified.3.test
9113 @@@DEnt:
9114 @@@@test:value:
9115 <!DOCTYPE a [
9116 <!ATTLIST a
9117 at CDATA "default"
9118 >
9119 ]>
9120 <a at="specified"></a>
9121 @@@test:domTree:
9122 document {
9123 document-type { }
9124 element {
9125 attribute {
9126 node-name: 'at';
9127 value: 'specified';
9128 specified: true;
9129 }
9130 }
9131 }
9132
9133 @@XMLTest:
9134 @@@QName: xp.attr.literal.charref.test
9135 @@@DEnt:
9136 @@@@test:value:
9137 <a at1 = "value&#33;_&#x25;value"
9138 at2 = 'value&#x25;_&#33;value'></a>
9139 @@@test:domTree:
9140 document {
9141 element {
9142 attribute {
9143 node-name: 'at1';
9144 text-content: 'value!_%value';
9145 }
9146 attribute {
9147 node-name: 'at2';
9148 text-content: 'value%_!value';
9149 }
9150 }
9151 }
9152 @@XMLTest:
9153 @@@QName: xp.attr.literal.entref.test
9154 @@@DEnt:
9155 @@@@test:value:
9156 <!DOCTYPE a [
9157 <!ENTITY ent "entity&#x26;#33;_&#x26;#x29;value">
9158 ]>
9159 <a at1 = "value&ent;value"
9160 at2 = 'value&ent;value'></a>
9161 @@@test:domTree:
9162 document {
9163 document-type {
9164 general-entity {
9165 node-name: 'ent';
9166 text-content: 'entity!_)value';
9167 }
9168 }
9169 element {
9170 attribute {
9171 node-name: 'at1';
9172 text-content: 'valueentity!_)valuevalue';
9173 }
9174 attribute {
9175 node-name: 'at2';
9176 text-content: 'valueentity!_)valuevalue';
9177 }
9178 }
9179 }
9180 @@XMLTest:
9181 @@@QName: xp.attr.literal.entref.nest.test
9182 @@@DEnt:
9183 @@@@test:value:
9184 <!DOCTYPE a [
9185 <!ENTITY ent1 "entity&#x26;#33;_&#x26;#x29;value">
9186 <!ENTITY ent2 "@&ent1;@">
9187 ]>
9188 <a at1 = "value&ent2;value"
9189 at2 = 'value&ent2;value'></a>
9190 @@@test:domTree:
9191 document {
9192 document-type {
9193 general-entity {
9194 node-name: 'ent1';
9195 text-content: 'entity!_)value';
9196 }
9197 general-entity {
9198 node-name: 'ent2';
9199 text-content: '@entity!_)value@';
9200 }
9201 }
9202 element {
9203 attribute {
9204 node-name: 'at1';
9205 text-content: 'value@entity!_)value@value';
9206 }
9207 attribute {
9208 node-name: 'at2';
9209 text-content: 'value@entity!_)value@value';
9210 }
9211 }
9212 }
9213
9214 @@XMLTest:
9215 @@@QName: xp.element.content.ncr.1.test
9216 @@@DEnt:
9217 @@@@test:value:
9218 <e>&#33;</e>
9219 @@@test:domTree:
9220 document {
9221 element {
9222 text-content: '!';
9223 }
9224 }
9225 @@XMLTest:
9226 @@@QName: xp.element.content.ncr.2.test
9227 @@@DEnt:
9228 @@@@test:value:
9229 <e>aaaa&#33;bbbb</e>
9230 @@@test:domTree:
9231 document {
9232 element {
9233 text-content: 'aaaa!bbbb';
9234 }
9235 }
9236 @@XMLTest:
9237 @@@QName: xp.attrval.ncr.1.test
9238 @@@DEnt:
9239 @@@@test:value:
9240 <e a="&#33;"/>
9241 @@@test:domTree:
9242 document {
9243 element {
9244 attribute {
9245 node-name: 'a';
9246 text-content: '!';
9247 }
9248 }
9249 }
9250 @@XMLTest:
9251 @@@QName: xp.attrval.ncr.2.test
9252 @@@DEnt:
9253 @@@@test:value:
9254 <e a="aaaaa&#33;bbbbb"/>
9255 @@@test:domTree:
9256 document {
9257 element {
9258 attribute {
9259 node-name: 'a';
9260 text-content: 'aaaaa!bbbbb';
9261 }
9262 }
9263 }
9264 @@XMLTest:
9265 @@@QName: xp.attrval.ncr.3.test
9266 @@@DEnt:
9267 @@@@test:value:
9268 <e a='&#33;'/>
9269 @@@test:domTree:
9270 document {
9271 element {
9272 attribute {
9273 node-name: 'a';
9274 text-content: '!';
9275 }
9276 }
9277 }
9278 @@XMLTest:
9279 @@@QName: xp.attrval.ncr.4.test
9280 @@@DEnt:
9281 @@@@test:value:
9282 <e a='aaaaa&#33;bbbbb'/>
9283 @@@test:domTree:
9284 document {
9285 element {
9286 attribute {
9287 node-name: 'a';
9288 text-content: 'aaaaa!bbbbb';
9289 }
9290 }
9291 }
9292 @@XMLTest:
9293 @@@QName: xp.entval.ncr.1.test
9294 @@@DEnt:
9295 @@@@test:value:
9296 <!DOCTYPE e [
9297 <!ENTITY ent "&#33;">
9298 ]>
9299 <e/>
9300 @@@test:domTree:
9301 document {
9302 document-type {
9303 general-entity {
9304 node-name: 'ent';
9305 text-content: '!';
9306 }
9307 }
9308 element { }
9309 }
9310 @@XMLTest:
9311 @@@QName: xp.entval.ncr.2.test
9312 @@@DEnt:
9313 @@@@test:value:
9314 <!DOCTYPE e [
9315 <!ENTITY ent "aaaaa&#33;bbbbb">
9316 ]>
9317 <e/>
9318 @@@test:domTree:
9319 document {
9320 document-type {
9321 general-entity {
9322 node-name: 'ent';
9323 text-content: 'aaaaa!bbbbb';
9324 }
9325 }
9326 element { }
9327 }
9328 @@XMLTest:
9329 @@@QName: xp.element.content.reptxt.ncr.1.test
9330 @@@DEnt:
9331 @@@@test:value:
9332 <!DOCTYPE e [
9333 <!ENTITY ent "&#38;#33;">
9334 ]>
9335 <e>&ent;</e>
9336 @@@test:domTree:
9337 document {
9338 document-type { }
9339 element {
9340 general-entity-reference {
9341 node-name: 'ent';
9342 text-content: '!';
9343 is-expanded: true;
9344 }
9345 }
9346 }
9347 @@XMLTest:
9348 @@@QName: xp.element.content.reptxt.ncr.2.test
9349 @@@DEnt:
9350 @@@@test:value:
9351 <!DOCTYPE e [
9352 <!ENTITY ent "aaaaa&#38;#33;bbbbb">
9353 ]>
9354 <e>&ent;</e>
9355 @@@test:domTree:
9356 document {
9357 document-type { }
9358 element {
9359 general-entity-reference {
9360 node-name: 'ent';
9361 text-content: 'aaaaa!bbbbb';
9362 is-expanded: true;
9363 }
9364 }
9365 }
9366 @@XMLTest:
9367 @@@QName: xp.element.content.reptxt.reptxt.ncr.1.test
9368 @@@DEnt:
9369 @@@@test:value:
9370 <!DOCTYPE e [
9371 <!ENTITY ent "&#38;#33;">
9372 <!ENTITY ent2 "&ent;">
9373 ]>
9374 <e>&ent2;</e>
9375 @@@test:domTree:
9376 document {
9377 document-type { }
9378 element {
9379 general-entity-reference {
9380 node-name: 'ent2';
9381 general-entity-reference {
9382 node-name: 'ent';
9383 text-content: '!';
9384 is-expanded: true;
9385 }
9386 is-expanded: true;
9387 }
9388 }
9389 }
9390 @@XMLTest:
9391 @@@QName: xp.element.content.reptxt.reptxt.ncr.2.test
9392 @@@DEnt:
9393 @@@@test:value:
9394 <!DOCTYPE e [
9395 <!ENTITY ent "aa&#38;#33;bb">
9396 <!ENTITY ent2 "&ent;">
9397 ]>
9398 <e>&ent2;</e>
9399 @@@test:domTree:
9400 document {
9401 document-type { }
9402 element {
9403 general-entity-reference {
9404 node-name: 'ent2';
9405 general-entity-reference {
9406 node-name: 'ent';
9407 text-content: 'aa!bb';
9408 is-expanded: true;
9409 }
9410 is-expanded: true;
9411 }
9412 }
9413 }
9414 @@XMLTest:
9415 @@@QName: xp.attval.reptxt.ncr.1.test
9416 @@@DEnt:
9417 @@@@test:value:
9418 <!DOCTYPE e [
9419 <!ENTITY ent "&#38;#33;">
9420 ]>
9421 <e a="&ent;"/>
9422 @@@test:domTree:
9423 document {
9424 document-type { }
9425 element {
9426 attribute {
9427 node-name: 'a';
9428 general-entity-reference {
9429 node-name: 'ent';
9430 text-content: '!';
9431 is-expanded: true;
9432 }
9433 }
9434 }
9435 }
9436 @@XMLTest:
9437 @@@QName: xp.attval.reptxt.ncr.2.test
9438 @@@DEnt:
9439 @@@@test:value:
9440 <!DOCTYPE e [
9441 <!ENTITY ent "aaaaa&#38;#33;bbbbb">
9442 ]>
9443 <e a="&ent;"/>
9444 @@@test:domTree:
9445 document {
9446 document-type { }
9447 element {
9448 attribute {
9449 node-name: 'a';
9450 general-entity-reference {
9451 node-name: 'ent';
9452 text-content: 'aaaaa!bbbbb';
9453 is-expanded: true;
9454 }
9455 }
9456 }
9457 }
9458 @@XMLTest:
9459 @@@QName: xp.attval.reptxt.reptxt.ncr.1.test
9460 @@@DEnt:
9461 @@@@test:value:
9462 <!DOCTYPE e [
9463 <!ENTITY ent "&#38;#33;">
9464 <!ENTITY ent2 "&ent;">
9465 ]>
9466 <e a="&ent2;"/>
9467 @@@test:domTree:
9468 document {
9469 document-type { }
9470 element {
9471 attribute {
9472 node-name: 'a';
9473 general-entity-reference {
9474 node-name: 'ent2';
9475 is-expanded: true;
9476 general-entity-reference {
9477 node-name: 'ent';
9478 text-content: '!';
9479 is-expanded: true;
9480 }
9481 }
9482 }
9483 }
9484 }
9485 @@XMLTest:
9486 @@@QName: xp.attval.reptxt.reptxt.ncr.2.test
9487 @@@DEnt:
9488 @@@@test:value:
9489 <!DOCTYPE e [
9490 <!ENTITY ent "aa&#38;#33;bb">
9491 <!ENTITY ent2 "&ent;">
9492 ]>
9493 <e a="&ent2;"/>
9494 @@@test:domTree:
9495 document {
9496 document-type { }
9497 element {
9498 attribute {
9499 node-name: 'a';
9500 general-entity-reference {
9501 node-name: 'ent2';
9502 is-expanded: true;
9503 general-entity-reference {
9504 node-name: 'ent';
9505 text-content: 'aa!bb';
9506 is-expanded: true;
9507 }
9508 }
9509 }
9510 }
9511 }
9512
9513 @@XMLTest:
9514 @@@QName: xp.element.content.hcr.1.test
9515 @@@DEnt:
9516 @@@@test:value:
9517 <e>&#x21;</e>
9518 @@@test:domTree:
9519 document {
9520 element {
9521 text-content: '!';
9522 }
9523 }
9524 @@XMLTest:
9525 @@@QName: xp.element.content.hcr.2.test
9526 @@@DEnt:
9527 @@@@test:value:
9528 <e>aaaa&#x21;bbbb</e>
9529 @@@test:domTree:
9530 document {
9531 element {
9532 text-content: 'aaaa!bbbb';
9533 }
9534 }
9535 @@XMLTest:
9536 @@@QName: xp.attrval.hcr.1.test
9537 @@@DEnt:
9538 @@@@test:value:
9539 <e a="&#x21;"/>
9540 @@@test:domTree:
9541 document {
9542 element {
9543 attribute {
9544 node-name: 'a';
9545 text-content: '!';
9546 }
9547 }
9548 }
9549 @@XMLTest:
9550 @@@QName: xp.attrval.hcr.2.test
9551 @@@DEnt:
9552 @@@@test:value:
9553 <e a="aaaaa&#x21;bbbbb"/>
9554 @@@test:domTree:
9555 document {
9556 element {
9557 attribute {
9558 node-name: 'a';
9559 text-content: 'aaaaa!bbbbb';
9560 }
9561 }
9562 }
9563 @@XMLTest:
9564 @@@QName: xp.attrval.hcr.3.test
9565 @@@DEnt:
9566 @@@@test:value:
9567 <e a='&#x21;'/>
9568 @@@test:domTree:
9569 document {
9570 element {
9571 attribute {
9572 node-name: 'a';
9573 text-content: '!';
9574 }
9575 }
9576 }
9577 @@XMLTest:
9578 @@@QName: xp.attrval.hcr.4.test
9579 @@@DEnt:
9580 @@@@test:value:
9581 <e a='aaaaa&#x21;bbbbb'/>
9582 @@@test:domTree:
9583 document {
9584 element {
9585 attribute {
9586 node-name: 'a';
9587 text-content: 'aaaaa!bbbbb';
9588 }
9589 }
9590 }
9591 @@XMLTest:
9592 @@@QName: xp.entval.hcr.1.test
9593 @@@DEnt:
9594 @@@@test:value:
9595 <!DOCTYPE e [
9596 <!ENTITY ent "&#x21;">
9597 ]>
9598 <e/>
9599 @@@test:domTree:
9600 document {
9601 document-type {
9602 general-entity {
9603 node-name: 'ent';
9604 text-content: '!';
9605 }
9606 }
9607 element { }
9608 }
9609 @@XMLTest:
9610 @@@QName: xp.entval.hcr.2.test
9611 @@@DEnt:
9612 @@@@test:value:
9613 <!DOCTYPE e [
9614 <!ENTITY ent "aaaaa&#x21;bbbbb">
9615 ]>
9616 <e/>
9617 @@@test:domTree:
9618 document {
9619 document-type {
9620 general-entity {
9621 node-name: 'ent';
9622 text-content: 'aaaaa!bbbbb';
9623 }
9624 }
9625 element { }
9626 }
9627 @@XMLTest:
9628 @@@QName: xp.element.content.reptxt.hcr.1.test
9629 @@@DEnt:
9630 @@@@test:value:
9631 <!DOCTYPE e [
9632 <!ENTITY ent "&#38;#x21;">
9633 ]>
9634 <e>&ent;</e>
9635 @@@test:domTree:
9636 document {
9637 document-type { }
9638 element {
9639 general-entity-reference {
9640 node-name: 'ent';
9641 text-content: '!';
9642 is-expanded: true;
9643 }
9644 }
9645 }
9646 @@XMLTest:
9647 @@@QName: xp.element.content.reptxt.hcr.2.test
9648 @@@DEnt:
9649 @@@@test:value:
9650 <!DOCTYPE e [
9651 <!ENTITY ent "aaaaa&#38;#x21;bbbbb">
9652 ]>
9653 <e>&ent;</e>
9654 @@@test:domTree:
9655 document {
9656 document-type { }
9657 element {
9658 general-entity-reference {
9659 node-name: 'ent';
9660 text-content: 'aaaaa!bbbbb';
9661 is-expanded: true;
9662 }
9663 }
9664 }
9665 @@XMLTest:
9666 @@@QName: xp.element.content.reptxt.reptxt.hcr.1.test
9667 @@@DEnt:
9668 @@@@test:value:
9669 <!DOCTYPE e [
9670 <!ENTITY ent "&#38;#x21;">
9671 <!ENTITY ent2 "&ent;">
9672 ]>
9673 <e>&ent2;</e>
9674 @@@test:domTree:
9675 document {
9676 document-type { }
9677 element {
9678 general-entity-reference {
9679 node-name: 'ent2';
9680 is-expanded: true;
9681 general-entity-reference {
9682 node-name: 'ent';
9683 text-content: '!';
9684 is-expanded: true;
9685 }
9686 }
9687 }
9688 }
9689 @@XMLTest:
9690 @@@QName: xp.element.content.reptxt.reptxt.hcr.2.test
9691 @@@DEnt:
9692 @@@@test:value:
9693 <!DOCTYPE e [
9694 <!ENTITY ent "aa&#38;#x21;bb">
9695 <!ENTITY ent2 "&ent;">
9696 ]>
9697 <e>&ent2;</e>
9698 @@@test:domTree:
9699 document {
9700 document-type { }
9701 element {
9702 general-entity-reference {
9703 node-name: 'ent2';
9704 is-expanded: true;
9705 general-entity-reference {
9706 node-name: 'ent';
9707 is-expanded: true;
9708 text-content: 'aa!bb';
9709 }
9710 }
9711 }
9712 }
9713 @@XMLTest:
9714 @@@QName: xp.attval.reptxt.hcr.1.test
9715 @@@DEnt:
9716 @@@@test:value:
9717 <!DOCTYPE e [
9718 <!ENTITY ent "&#38;#x21;">
9719 ]>
9720 <e a="&ent;"/>
9721 @@@test:domTree:
9722 document {
9723 document-type { }
9724 element {
9725 attribute {
9726 node-name: 'a';
9727 general-entity-reference {
9728 node-name: 'ent';
9729 is-expanded: true;
9730 text-content: '!';
9731 }
9732 }
9733 }
9734 }
9735 @@XMLTest:
9736 @@@QName: xp.attval.reptxt.hcr.2.test
9737 @@@DEnt:
9738 @@@@test:value:
9739 <!DOCTYPE e [
9740 <!ENTITY ent "aaaaa&#38;#x21;bbbbb">
9741 ]>
9742 <e a="&ent;"/>
9743 @@@test:domTree:
9744 document {
9745 document-type { }
9746 element {
9747 attribute {
9748 node-name: 'a';
9749 general-entity-reference {
9750 node-name: 'ent';
9751 is-expanded: true;
9752 text-content: 'aaaaa!bbbbb';
9753 }
9754 }
9755 }
9756 }
9757 @@XMLTest:
9758 @@@QName: xp.attval.reptxt.reptxt.hcr.1.test
9759 @@@DEnt:
9760 @@@@test:value:
9761 <!DOCTYPE e [
9762 <!ENTITY ent "&#38;#x21;">
9763 <!ENTITY ent2 "&ent;">
9764 ]>
9765 <e a="&ent2;"/>
9766 @@@test:domTree:
9767 document {
9768 document-type { }
9769 element {
9770 attribute {
9771 node-name: 'a';
9772 general-entity-reference {
9773 node-name: 'ent2';
9774 is-expanded: true;
9775 general-entity-reference {
9776 node-name: 'ent';
9777 is-expanded: true;
9778 text-content: '!';
9779 }
9780 }
9781 }
9782 }
9783 }
9784 @@XMLTest:
9785 @@@QName: xp.attval.reptxt.reptxt.hcr.2.test
9786 @@@DEnt:
9787 @@@@test:value:
9788 <!DOCTYPE e [
9789 <!ENTITY ent "aa&#38;#x21;bb">
9790 <!ENTITY ent2 "&ent;">
9791 ]>
9792 <e a="&ent2;"/>
9793 @@@test:domTree:
9794 document {
9795 document-type { }
9796 element {
9797 attribute {
9798 node-name: 'a';
9799 general-entity-reference {
9800 node-name: 'ent2';
9801 is-expanded: true;
9802 general-entity-reference {
9803 node-name: 'ent';
9804 is-expanded: true;
9805 text-content: 'aa!bb';
9806 }
9807 }
9808 }
9809 }
9810 }
9811
9812 @@XMLTest:
9813 @@@QName: xp.element.content.ncr.legal.char.1.0.1.test
9814 @@@DEnt:
9815 @@@@test:value:
9816 <?xml version="1.0"?>
9817 <e>&#0;</e>
9818 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9819 @@XMLTest:
9820 @@@QName: xp.element.content.ncr.legal.char.1.1.1.test
9821 @@@DEnt:
9822 @@@@test:value:
9823 <?xml version="1.1"?>
9824 <e>&#0;</e>
9825 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9826 @@XMLTest:
9827 @@@QName: xp.element.content.ncr.legal.char.1.0.2.test
9828 @@@DEnt:
9829 @@@@test:value:
9830 <?xml version="1.0"?>
9831 <e>&#1;</e>
9832 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9833 @@XMLTest:
9834 @@@QName: xp.element.content.ncr.legal.char.1.1.2.test
9835 @@@DEnt:
9836 @@@@test:value:
9837 <?xml version="1.1"?>
9838 <e>&#1;</e>
9839 @@@test:domTree:
9840 document {
9841 xml-version: '1.1';
9842 element {
9843 text-content: U+0001;
9844 }
9845 }
9846 @@XMLTest:
9847 @@@QName: xp.element.content.hcr.legal.char.1.0.1.test
9848 @@@DEnt:
9849 @@@@test:value:
9850 <?xml version="1.0"?>
9851 <e>&#x0;</e>
9852 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9853 @@XMLTest:
9854 @@@QName: xp.element.content.hcr.legal.char.1.1.1.test
9855 @@@DEnt:
9856 @@@@test:value:
9857 <?xml version="1.1"?>
9858 <e>&#x0;</e>
9859 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9860 @@XMLTest:
9861 @@@QName: xp.element.content.hcr.legal.char.1.0.2.test
9862 @@@DEnt:
9863 @@@@test:value:
9864 <?xml version="1.0"?>
9865 <e>&#x1;</e>
9866 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9867 @@XMLTest:
9868 @@@QName: xp.element.content.hcr.legal.char.1.1.2.test
9869 @@@DEnt:
9870 @@@@test:value:
9871 <?xml version="1.1"?>
9872 <e>&#x1;</e>
9873 @@@test:domTree:
9874 document {
9875 xml-version: '1.1';
9876 element {
9877 text-content: U+0001;
9878 }
9879 }
9880
9881 @@XMLTest:
9882 @@@QName: xp.element.content.ger.entity.declared.nodtd.1.test
9883 @@@DEnt:
9884 @@@@test:value:
9885 <p>&entity;</p>
9886 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 4)..(1, 11); }
9887 @@XMLTest:
9888 @@@QName: xp.element.content.ger.entity.declared.nodtd.2.test
9889 @@@DEnt:
9890 @@@@test:value:
9891 <?xml version="1.0" standalone="yes"?>
9892 <p>&entity;</p>
9893 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9894 @@XMLTest:
9895 @@@QName: xp.element.content.ger.entity.declared.nodtd.3.test
9896 @@@DEnt:
9897 @@@@test:value:
9898 <?xml version="1.0" standalone="no"?>
9899 <p>&entity;</p>
9900 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9901 @@XMLTest:
9902 @@@QName: xp.element.content.ger.entity.declared.nodtd.-1.test
9903 @@@DEnt:
9904 @@@@test:value:
9905 <p>&lt;&gt;&amp;&quot;&apos;</p>
9906 @@@test:domTree:
9907 document {
9908 element {
9909 text-content: '<>&"' U+0027;
9910 }
9911 }
9912 @@XMLTest:
9913 @@@QName: xp.element.content.ger.entity.declared.nopref.1.test
9914 @@@DEnt:
9915 @@@@test:value:
9916 <!DOCTYPE p []>
9917 <p>&entity;</p>
9918 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9919 @@XMLTest:
9920 @@@QName: xp.element.content.ger.entity.declared.nopref.2.test
9921 @@@DEnt:
9922 @@@@test:value:
9923 <!DOCTYPE p [
9924 <!ENTITY other "aa">
9925 <!ENTITY % another "aa">
9926 ]>
9927 <p>&entity;</p>
9928 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 4)..(5, 11); }
9929 @@XMLTest:
9930 @@@QName: xp.element.content.ger.entity.declared.nopref.3.test
9931 @@@DEnt:
9932 @@@@test:value:
9933 <?xml version="1.0" standalone="yes"?>
9934 <!DOCTYPE p []>
9935 <p>&entity;</p>
9936 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
9937 @@XMLTest:
9938 @@@QName: xp.element.content.ger.entity.declared.nopref.4.test
9939 @@@DEnt:
9940 @@@@test:value:
9941 <?xml version="1.0" standalone="no"?>
9942 <!DOCTYPE p []>
9943 <p>&entity;</p>
9944 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
9945 @@XMLTest:
9946 @@@QName: xp.element.content.ger.entity.declared.nopref.5.test
9947 @@@DEnt:
9948 @@@@test:value:
9949 <?xml version="1.0" standalone="yes"?>
9950 <!DOCTYPE p [
9951 <!ENTITY other "aa">
9952 <!ENTITY % another "aa">
9953 ]>
9954 <p>&entity;</p>
9955 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
9956 @@XMLTest:
9957 @@@QName: xp.element.content.ger.entity.declared.nopref.6.test
9958 @@@DEnt:
9959 @@@@test:value:
9960 <?xml version="1.0" standalone="no"?>
9961 <!DOCTYPE p [
9962 <!ENTITY other "aa">
9963 <!ENTITY % another "aa">
9964 ]>
9965 <p>&entity;</p>
9966 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
9967 @@XMLTest:
9968 @@@QName: xp.element.content.ger.entity.declared.nopref.-1.test
9969 @@@DEnt:
9970 @@@@test:value:
9971 <!DOCTYPE p [
9972 <!ENTITY entity "value">
9973 ]>
9974 <p>&entity;</p>
9975 @@@test:domTree:
9976 document {
9977 document-type {
9978 general-entity {
9979 node-name: 'entity';
9980 text-content: 'value';
9981 }
9982 }
9983 element {
9984 general-entity-reference {
9985 node-name: 'entity';
9986 is-expanded: true;
9987 text-content: 'value';
9988 }
9989 }
9990 }
9991 @@XMLTest:
9992 @@@QName: xp.element.content.ger.entity.declared.nopref.-2.test
9993 @@@DEnt:
9994 @@@@test:value:
9995 <!DOCTYPE p [
9996 <!ENTITY entity "value">
9997 <!ENTITY another SYSTEM "another">
9998 ]>
9999 <p>&entity;</p>
10000 @@@test:domTree:
10001 document {
10002 document-type {
10003 general-entity {
10004 node-name: 'entity';
10005 text-content: 'value';
10006 }
10007 general-entity {
10008 node-name: 'another';
10009 public-id: null;
10010 system-id: 'another';
10011 }
10012 }
10013 element {
10014 general-entity-reference {
10015 node-name: 'entity';
10016 is-expanded: true;
10017 text-content: 'value';
10018 }
10019 }
10020 }
10021 @@XMLTest:
10022 @@@QName: xp.element.content.ger.entity.declared.standalone.1.test
10023 @@@DEnt:
10024 @@@@test:value:
10025 <?xml version="1.0" standalone="yes"?>
10026 <p>&entity;</p>
10027 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
10028 @@XMLTest:
10029 @@@QName: xp.element.content.ger.entity.declared.standalone.2.test
10030 @@@DEnt:
10031 @@@@test:value:
10032 <?xml version="1.0" standalone="yes"?>
10033 <!DOCTYPE p []>
10034 <p>&entity;</p>
10035 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10036 @@XMLTest:
10037 @@@QName: xp.element.content.ger.entity.declared.standalone.3.test
10038 @@@DEnt:
10039 @@@@test:value:
10040 <?xml version="1.0" standalone="yes"?>
10041 <!DOCTYPE p [
10042 <!ENTITY % para "<!-- -->">
10043 %para;
10044 ]>
10045 <p>&entity;</p>
10046 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10047 @@XMLTest:
10048 @@@QName: xp.element.content.ger.entity.declared.standalone.-1.test
10049 @@@DEnt:
10050 @@@@test:value:
10051 <?xml version="1.0" standalone="no"?>
10052 <!DOCTYPE p [
10053 <!ENTITY % para "<!-- -->">
10054 %para;
10055 ]>
10056 <p>&entity;</p>
10057 @@@test:domTree:
10058 document {
10059 document-type { }
10060 element {
10061 general-entity-reference {
10062 is-expanded: false;
10063 }
10064 }
10065 }
10066 @@XMLTest:
10067 @@@QName: xp.element.content.ger.entity.declared.standalone.-2.test
10068 @@@DEnt:
10069 @@@@test:value:
10070 <!DOCTYPE p [
10071 <!ENTITY % para "<!-- -->">
10072 %para;
10073 ]>
10074 <p>&entity;</p>
10075 @@@test:domTree:
10076 document {
10077 document-type { }
10078 element {
10079 general-entity-reference {
10080 is-expanded: false;
10081 }
10082 }
10083 }
10084 @@XMLTest:
10085 @@@QName: xp.element.content.ger.entity.declared.standalone.4.test
10086 @@@DEnt:
10087 @@@@test:value:
10088 <?xml version="1.0" standalone="yes"?>
10089 <!DOCTYPE p [
10090 <!ENTITY % para SYSTEM "para">
10091 %para;
10092 ]>
10093 <p>&entity;</p>
10094 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10095 @@XMLTest:
10096 @@@QName: xp.element.content.ger.entity.declared.standalone.-3.test
10097 @@@DEnt:
10098 @@@@test:value:
10099 <?xml version="1.0" standalone="no"?>
10100 <!DOCTYPE p [
10101 <!ENTITY % para SYSTEM "para">
10102 %para;
10103 ]>
10104 <p>&entity;</p>
10105 @@@test:domTree:
10106 document {
10107 document-type { }
10108 element {
10109 general-entity-reference {
10110 is-expanded: false;
10111 }
10112 }
10113 }
10114 @@XMLTest:
10115 @@@QName: xp.element.content.ger.entity.declared.standalone.-4.test
10116 @@@DEnt:
10117 @@@@test:value:
10118 <!DOCTYPE p [
10119 <!ENTITY % para SYSTEM "para">
10120 %para;
10121 ]>
10122 <p>&entity;</p>
10123 @@@test:domTree:
10124 document {
10125 document-type { }
10126 element {
10127 general-entity-reference {
10128 is-expanded: false;
10129 }
10130 }
10131 }
10132 @@XMLTest:
10133 @@@QName: xp.element.content.ger.entity.declared.standalone.5.test
10134 @@@DEnt:
10135 @@@@test:value:
10136 <?xml version="1.0" standalone="yes"?>
10137 <!DOCTYPE p SYSTEM "dtd">
10138 <p>&entity;</p>
10139 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10140 @@XMLTest:
10141 @@@QName: xp.element.content.ger.entity.declared.standalone.-5.test
10142 @@@DEnt:
10143 @@@@test:value:
10144 <?xml version="1.0" standalone="no"?>
10145 <!DOCTYPE p SYSTEM "dtd">
10146 <p>&entity;</p>
10147 @@@test:domTree:
10148 document {
10149 document-type { }
10150 element {
10151 general-entity-reference {
10152 is-expanded: false;
10153 }
10154 }
10155 }
10156 @@XMLTest:
10157 @@@QName: xp.element.content.ger.entity.declared.standalone.-6.test
10158 @@@DEnt:
10159 @@@@test:value:
10160 <!DOCTYPE p SYSTEM "dtd">
10161 <p>&entity;</p>
10162 @@@test:domTree:
10163 document {
10164 document-type { }
10165 element {
10166 general-entity-reference {
10167 is-expanded: false;
10168 }
10169 }
10170 }
10171
10172 @@XMLTest:
10173 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.1.test
10174 @@@DEnt:
10175 @@@@test:value:
10176 <!DOCTYPE p [
10177 <!ENTITY c "&entity;">
10178 ]>
10179 <p>&c;</p>
10180 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10181 @@XMLTest:
10182 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.2.test
10183 @@@DEnt:
10184 @@@@test:value:
10185 <!DOCTYPE p [
10186 <!ENTITY other "aa">
10187 <!ENTITY % another "aa">
10188 <!ENTITY c "&entity;">
10189 ]>
10190 <p>&c;</p>
10191 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10192 @@XMLTest:
10193 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.3.test
10194 @@@DEnt:
10195 @@@@test:value:
10196 <?xml version="1.0" standalone="yes"?>
10197 <!DOCTYPE p [
10198 <!ENTITY c "&entity;">
10199 ]>
10200 <p>&c;</p>
10201 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10202 @@XMLTest:
10203 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.4.test
10204 @@@DEnt:
10205 @@@@test:value:
10206 <?xml version="1.0" standalone="no"?>
10207 <!DOCTYPE p [
10208 <!ENTITY c "&entity;">
10209 ]>
10210 <p>&c;</p>
10211 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10212 @@XMLTest:
10213 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.5.test
10214 @@@DEnt:
10215 @@@@test:value:
10216 <?xml version="1.0" standalone="yes"?>
10217 <!DOCTYPE p [
10218 <!ENTITY other "aa">
10219 <!ENTITY % another "aa">
10220 <!ENTITY c "&entity;">
10221 ]>
10222 <p>&c;</p>
10223 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10224 @@XMLTest:
10225 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.6.test
10226 @@@DEnt:
10227 @@@@test:value:
10228 <?xml version="1.0" standalone="no"?>
10229 <!DOCTYPE p [
10230 <!ENTITY other "aa">
10231 <!ENTITY % another "aa">
10232 <!ENTITY c "&entity;">
10233 ]>
10234 <p>&c;</p>
10235 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10236 @@XMLTest:
10237 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.-1.test
10238 @@@DEnt:
10239 @@@@test:value:
10240 <!DOCTYPE p [
10241 <!ENTITY entity "value">
10242 <!ENTITY c "&entity;">
10243 ]>
10244 <p>&c;</p>
10245 @@@test:domTree:
10246 document {
10247 document-type {
10248 general-entity {
10249 node-name: 'entity';
10250 text-content: 'value';
10251 }
10252 general-entity {
10253 node-name: 'c';
10254 general-entity-reference {
10255 node-name: 'entity';
10256 text-content: 'value';
10257 }
10258 }
10259 }
10260 element {
10261 general-entity-reference {
10262 node-name: 'c';
10263 general-entity-reference {
10264 node-name: 'entity';
10265 text-content: 'value';
10266 }
10267 }
10268 }
10269 }
10270 @@XMLTest:
10271 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.-2.test
10272 @@@DEnt:
10273 @@@@test:value:
10274 <!DOCTYPE p [
10275 <!ENTITY entity "value">
10276 <!ENTITY another SYSTEM "another">
10277 <!ENTITY c "&entity;">
10278 ]>
10279 <p>&c;</p>
10280 @@@test:domTree:
10281 document {
10282 document-type {
10283 general-entity {
10284 node-name: 'entity';
10285 text-content: 'value';
10286 }
10287 general-entity {
10288 node-name: 'c';
10289 general-entity-reference {
10290 node-name: 'entity';
10291 is-expanded: true;
10292 text-content: 'value';
10293 }
10294 }
10295 general-entity {
10296 node-name: 'another';
10297 public-id: null;
10298 system-id: 'another';
10299 has-replacement-tree: false;
10300 }
10301 }
10302 element {
10303 general-entity-reference {
10304 node-name: 'c';
10305 is-expanded: true;
10306 general-entity-reference {
10307 node-name: 'entity';
10308 is-expanded: true;
10309 text-content: 'value';
10310 }
10311 }
10312 }
10313 }
10314 @@XMLTest:
10315 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.2.test
10316 @@@DEnt:
10317 @@@@test:value:
10318 <?xml version="1.0" standalone="yes"?>
10319 <!DOCTYPE p [
10320 <!ENTITY c "&entity;">
10321 ]>
10322 <p>&c;</p>
10323 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10324 @@XMLTest:
10325 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.3.test
10326 @@@DEnt:
10327 @@@@test:value:
10328 <?xml version="1.0" standalone="yes"?>
10329 <!DOCTYPE p [
10330 <!ENTITY % para "<!-- -->">
10331 %para;
10332 <!ENTITY c "&entity;">
10333 ]>
10334 <p>&c;</p>
10335 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10336 @@XMLTest:
10337 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-1.test
10338 @@@DEnt:
10339 @@@@test:value:
10340 <?xml version="1.0" standalone="no"?>
10341 <!DOCTYPE p [
10342 <!ENTITY c "&entity;">
10343 <!ENTITY % para "<!-- -->">
10344 %para;
10345 ]>
10346 <p>&c;</p>
10347 @@@test:domTree:
10348 document {
10349 document-type {
10350 general-entity {
10351 node-name: 'c';
10352 general-entity-reference {
10353 node-name: 'entity';
10354 is-expanded: false;
10355 }
10356 }
10357 }
10358 element {
10359 general-entity-reference {
10360 node-name: 'c';
10361 general-entity-reference {
10362 node-name: 'entity';
10363 is-expanded: false;
10364 }
10365 }
10366 }
10367 }
10368 @@XMLTest:
10369 @@@QName:
10370 xp.reptxt.element.content.ger.entity.declared.standalone.-1.2.test
10371 @@@DEnt:
10372 @@@@test:value:
10373 <?xml version="1.0" standalone="no"?>
10374 <!DOCTYPE p [
10375 <!ENTITY % para "<!-- -->">
10376 %para;
10377 <!ENTITY c "&entity;">
10378 ]>
10379 <p>&c;</p>
10380 @@@test:domTree:
10381 document {
10382 document-type { }
10383 element {
10384 general-entity-reference {
10385 node-name: 'c';
10386 is-expanded: false;
10387 }
10388 }
10389 }
10390 @@XMLTest:
10391 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-2.test
10392 @@@DEnt:
10393 @@@@test:value:
10394 <!DOCTYPE p [
10395 <!ENTITY c "&entity;">
10396 <!ENTITY % para "<!-- -->">
10397 %para;
10398 ]>
10399 <p>&c;</p>
10400 @@@test:domTree:
10401 document {
10402 document-type { }
10403 element {
10404 general-entity-reference {
10405 node-name: 'c';
10406 is-expanded: true;
10407 general-entity-reference {
10408 node-name: 'entity';
10409 is-expanded: false;
10410 }
10411 }
10412 }
10413 }
10414 @@XMLTest:
10415 @@@QName:
10416 xp.reptxt.element.content.ger.entity.declared.standalone.-2.2.test
10417 @@@DEnt:
10418 @@@@test:value:
10419 <!DOCTYPE p [
10420 <!ENTITY % para "<!-- -->">
10421 %para;
10422 <!ENTITY c "&entity;">
10423 ]>
10424 <p>&c;</p>
10425 @@@test:domTree:
10426 document {
10427 document-type { }
10428 element {
10429 general-entity-reference {
10430 node-name: 'c';
10431 is-expanded: false;
10432 }
10433 }
10434 }
10435 @@XMLTest:
10436 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.4.test
10437 @@@DEnt:
10438 @@@@test:value:
10439 <?xml version="1.0" standalone="yes"?>
10440 <!DOCTYPE p [
10441 <!ENTITY % para SYSTEM "para">
10442 %para;
10443 <!ENTITY c "&entity;">
10444 ]>
10445 <p>&c;</p>
10446 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10447 @@XMLTest:
10448 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-3.test
10449 @@@DEnt:
10450 @@@@test:value:
10451 <?xml version="1.0" standalone="no"?>
10452 <!DOCTYPE p [
10453 <!ENTITY c "&entity;">
10454 <!ENTITY % para SYSTEM "para">
10455 %para;
10456 ]>
10457 <p>&c;</p>
10458 @@@test:domTree:
10459 document {
10460 document-type { }
10461 element {
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 @@XMLTest:
10473 @@@QName:
10474 xp.reptxt.element.content.ger.entity.declared.standalone.-3.2.test
10475 @@@DEnt:
10476 @@@@test:value:
10477 <?xml version="1.0" standalone="no"?>
10478 <!DOCTYPE p [
10479 <!ENTITY % para SYSTEM "para">
10480 %para;
10481 <!ENTITY c "&entity;">
10482 ]>
10483 <p>&c;</p>
10484 @@@test:domTree:
10485 document {
10486 document-type { }
10487 element {
10488 general-entity-reference {
10489 node-name: 'c';
10490 is-expanded: false;
10491 }
10492 }
10493 }
10494 @@XMLTest:
10495 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-4.test
10496 @@@DEnt:
10497 @@@@test:value:
10498 <!DOCTYPE p [
10499 <!ENTITY c "&entity;">
10500 <!ENTITY % para SYSTEM "para">
10501 %para;
10502 ]>
10503 <p>&c;</p>
10504 @@@test:domTree:
10505 document {
10506 document-type { }
10507 element {
10508 general-entity-reference {
10509 node-name: 'c';
10510 is-expanded: true;
10511 general-entity-reference {
10512 node-name: 'entity';
10513 is-expanded: false;
10514 }
10515 }
10516 }
10517 }
10518 @@XMLTest:
10519 @@@QName:
10520 xp.reptxt.element.content.ger.entity.declared.standalone.-4.2.test
10521 @@@DEnt:
10522 @@@@test:value:
10523 <!DOCTYPE p [
10524 <!ENTITY % para SYSTEM "para">
10525 %para;
10526 <!ENTITY c "&entity;">
10527 ]>
10528 <p>&c;</p>
10529 @@@test:domTree:
10530 document {
10531 document-type { }
10532 element {
10533 general-entity-reference {
10534 node-name: 'c';
10535 is-expanded: false;
10536 }
10537 }
10538 }
10539 @@XMLTest:
10540 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.5.test
10541 @@@DEnt:
10542 @@@@test:value:
10543 <?xml version="1.0" standalone="yes"?>
10544 <!DOCTYPE p SYSTEM "dtd" [
10545 <!ENTITY c "&entity;">
10546 ]>
10547 <p>&c;</p>
10548 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10549 @@XMLTest:
10550 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-5.test
10551 @@@DEnt:
10552 @@@@test:value:
10553 <?xml version="1.0" standalone="no"?>
10554 <!DOCTYPE p SYSTEM "dtd" [
10555 <!ENTITY c "&entity;">
10556 ]>
10557 <p>&c;</p>
10558 @@@test:domTree:
10559 document {
10560 document-type { }
10561 element {
10562 general-entity-reference {
10563 node-name: 'c';
10564 is-expanded: true;
10565 general-entity-reference {
10566 node-name: 'entity';
10567 is-expanded: false;
10568 }
10569 }
10570 }
10571 }
10572 @@XMLTest:
10573 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-6.test
10574 @@@DEnt:
10575 @@@@test:value:
10576 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">]>
10577 <p>&c;</p>
10578 @@@test:domTree:
10579 document {
10580 document-type { }
10581 element {
10582 general-entity-reference {
10583 node-name: 'c';
10584 is-expanded: true;
10585 general-entity-reference {
10586 node-name: 'entity';
10587 is-expanded: false;
10588 }
10589 }
10590 }
10591 }
10592
10593 @@XMLTest:
10594 @@@QName: xp.attval.ger.entity.declared.nodtd.1.test
10595 @@@DEnt:
10596 @@@@test:value:
10597 <p a="&entity;"/>
10598 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 7)..(1, 14); }
10599 @@XMLTest:
10600 @@@QName: xp.attval.ger.entity.declared.nodtd.2.test
10601 @@@DEnt:
10602 @@@@test:value:
10603 <?xml version="1.0" standalone="yes"?>
10604 <p a="&entity;"/>
10605 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10606 @@XMLTest:
10607 @@@QName: xp.attval.ger.entity.declared.nodtd.3.test
10608 @@@DEnt:
10609 @@@@test:value:
10610 <?xml version="1.0" standalone="no"?>
10611 <p a="&entity;"/>
10612 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10613 @@XMLTest:
10614 @@@QName: xp.attval.ger.entity.declared.nodtd.-1.test
10615 @@@DEnt:
10616 @@@@test:value:
10617 <p a="&lt;&gt;&amp;&quot;&apos;"/>
10618 @@@test:domTree:
10619 document {
10620 element {
10621 attribute {
10622 node-name: 'a';
10623 text-content: '<>&"' U+0027;
10624 }
10625 }
10626 }
10627 @@XMLTest:
10628 @@@QName: xp.attval.ger.entity.declared.nopref.1.test
10629 @@@DEnt:
10630 @@@@test:value:
10631 <!DOCTYPE p []>
10632 <p a="&entity;"/>
10633 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10634 @@XMLTest:
10635 @@@QName: xp.attval.ger.entity.declared.nopref.2.test
10636 @@@DEnt:
10637 @@@@test:value:
10638 <!DOCTYPE p [
10639 <!ENTITY other "aa">
10640 <!ENTITY % another "aa">
10641 ]>
10642 <p a="&entity;"/>
10643 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 7)..(5, 14); }
10644 @@XMLTest:
10645 @@@QName: xp.attval.ger.entity.declared.nopref.3.test
10646 @@@DEnt:
10647 @@@@test:value:
10648 <?xml version="1.0" standalone="yes"?>
10649 <!DOCTYPE p []>
10650 <p a="&entity;"/>
10651 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10652 @@XMLTest:
10653 @@@QName: xp.attval.ger.entity.declared.nopref.4.test
10654 @@@DEnt:
10655 @@@@test:value:
10656 <?xml version="1.0" standalone="no"?>
10657 <!DOCTYPE p []>
10658 <p a="&entity;"/>
10659 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10660 @@XMLTest:
10661 @@@QName: xp.attval.ger.entity.declared.nopref.5.test
10662 @@@DEnt:
10663 @@@@test:value:
10664 <?xml version="1.0" standalone="yes"?>
10665 <!DOCTYPE p [
10666 <!ENTITY other "aa">
10667 <!ENTITY % another "aa">
10668 ]>
10669 <p a="&entity;"/>
10670 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10671 @@XMLTest:
10672 @@@QName: xp.attval.ger.entity.declared.nopref.6.test
10673 @@@DEnt:
10674 @@@@test:value:
10675 <?xml version="1.0" standalone="no"?>
10676 <!DOCTYPE p [
10677 <!ENTITY other "aa">
10678 <!ENTITY % another "aa">
10679 ]>
10680 <p a="&entity;"/>
10681 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10682 @@XMLTest:
10683 @@@QName: xp.attval.ger.entity.declared.nopref.-1.test
10684 @@@DEnt:
10685 @@@@test:value:
10686 <!DOCTYPE p [
10687 <!ENTITY entity "value">
10688 ]>
10689 <p a="&entity;"/>
10690 @@@test:domTree:
10691 document {
10692 document-type {
10693 general-entity {
10694 node-name: 'entity';
10695 text-content: 'value';
10696 }
10697 }
10698 element {
10699 attribute {
10700 node-name: 'a';
10701 general-entity-reference {
10702 node-name: 'entity';
10703 is-expanded: true;
10704 text-content: 'value';
10705 }
10706 }
10707 }
10708 }
10709 @@XMLTest:
10710 @@@QName: xp.attval.ger.entity.declared.nopref.-2.test
10711 @@@DEnt:
10712 @@@@test:value:
10713 <!DOCTYPE p [
10714 <!ENTITY entity "value">
10715 <!ENTITY another SYSTEM "another">
10716 ]>
10717 <p a="&entity;"/>
10718 @@@test:domTree:
10719 document {
10720 document-type {
10721 general-entity {
10722 node-name: 'entity';
10723 text-content: 'value';
10724 has-replacement-tree: true;
10725 }
10726 general-entity {
10727 node-name: 'another';
10728 public-id: null;
10729 system-id: 'another';
10730 has-replacement-tree: false;
10731 }
10732 }
10733 element {
10734 attribute {
10735 node-name: 'a';
10736 general-entity-reference {
10737 node-name: 'entity';
10738 is-expanded: true;
10739 text-content: 'value';
10740 }
10741 }
10742 }
10743 }
10744 @@XMLTest:
10745 @@@QName: xp.attval.ger.entity.declared.standalone.1.test
10746 @@@DEnt:
10747 @@@@test:value:
10748 <?xml version="1.0" standalone="yes"?>
10749 <p a="&entity;"/>
10750 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10751 @@XMLTest:
10752 @@@QName: xp.attval.ger.entity.declared.standalone.2.test
10753 @@@DEnt:
10754 @@@@test:value:
10755 <?xml version="1.0" standalone="yes"?>
10756 <!DOCTYPE p []>
10757 <p a="&entity;"/>
10758 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10759 @@XMLTest:
10760 @@@QName: xp.attval.ger.entity.declared.standalone.3.test
10761 @@@DEnt:
10762 @@@@test:value:
10763 <?xml version="1.0" standalone="yes"?>
10764 <!DOCTYPE p [
10765 <!ENTITY % para "<!-- -->">
10766 %para;
10767 ]>
10768 <p a="&entity;"/>
10769 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10770 @@XMLTest:
10771 @@@QName: xp.attval.ger.entity.declared.standalone.-1.test
10772 @@@DEnt:
10773 @@@@test:value:
10774 <?xml version="1.0" standalone="no"?>
10775 <!DOCTYPE p [
10776 <!ENTITY % para "<!-- -->">
10777 %para;
10778 ]>
10779 <p a="&entity;"/>
10780 @@@test:domTree:
10781 document {
10782 document-type { }
10783 element {
10784 attribute {
10785 node-name: 'a';
10786 general-entity-reference {
10787 is-expanded: false;
10788 }
10789 }
10790 }
10791 }
10792 @@XMLTest:
10793 @@@QName: xp.attval.ger.entity.declared.standalone.-2.test
10794 @@@DEnt:
10795 @@@@test:value:
10796 <!DOCTYPE p [
10797 <!ENTITY % para "<!-- -->">
10798 %para;
10799 ]>
10800 <p a="&entity;"/>
10801 @@@test:domTree:
10802 document {
10803 document-type { }
10804 element {
10805 attribute {
10806 node-name: 'a';
10807 general-entity-reference {
10808 is-expanded: false;
10809 }
10810 }
10811 }
10812 }
10813 @@XMLTest:
10814 @@@QName: xp.attval.ger.entity.declared.standalone.4.test
10815 @@@DEnt:
10816 @@@@test:value:
10817 <?xml version="1.0" standalone="yes"?>
10818 <!DOCTYPE p [
10819 <!ENTITY % para SYSTEM "para">
10820 %para;
10821 ]>
10822 <p a="&entity;"/>
10823 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10824 @@XMLTest:
10825 @@@QName: xp.attval.ger.entity.declared.standalone.-3.test
10826 @@@DEnt:
10827 @@@@test:value:
10828 <?xml version="1.0" standalone="no"?>
10829 <!DOCTYPE p [
10830 <!ENTITY % para SYSTEM "para">
10831 %para;
10832 ]>
10833 <p a="&entity;"/>
10834 @@@test:domTree:
10835 document {
10836 document-type { }
10837 element {
10838 attribute {
10839 node-name: 'a';
10840 general-entity-reference {
10841 is-expanded: false;
10842 }
10843 }
10844 }
10845 }
10846 @@XMLTest:
10847 @@@QName: xp.attval.ger.entity.declared.standalone.-4.test
10848 @@@DEnt:
10849 @@@@test:value:
10850 <!DOCTYPE p [
10851 <!ENTITY % para SYSTEM "para">
10852 %para;
10853 ]>
10854 <p a="&entity;"/>
10855 @@@test:domTree:
10856 document {
10857 document-type { }
10858 element {
10859 attribute {
10860 node-name: 'a';
10861 general-entity-reference {
10862 is-expanded: false;
10863 }
10864 }
10865 }
10866 }
10867 @@XMLTest:
10868 @@@QName: xp.attval.ger.entity.declared.standalone.5.test
10869 @@@DEnt:
10870 @@@@test:value:
10871 <?xml version="1.0" standalone="yes"?>
10872 <!DOCTYPE p SYSTEM "dtd">
10873 <p a="&entity;"/>
10874 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10875 @@XMLTest:
10876 @@@QName: xp.attval.ger.entity.declared.standalone.-5.test
10877 @@@DEnt:
10878 @@@@test:value:
10879 <?xml version="1.0" standalone="no"?>
10880 <!DOCTYPE p SYSTEM "dtd">
10881 <p a="&entity;"/>
10882 @@@test:domTree:
10883 document {
10884 document-type { }
10885 element {
10886 attribute {
10887 node-name: 'a';
10888 general-entity-reference {
10889 is-expanded: false;
10890 }
10891 }
10892 }
10893 }
10894 @@XMLTest:
10895 @@@QName: xp.attval.ger.entity.declared.standalone.-6.test
10896 @@@DEnt:
10897 @@@@test:value:
10898 <!DOCTYPE p SYSTEM "dtd">
10899 <p a="&entity;"/>
10900 @@@test:domTree:
10901 document {
10902 document-type { }
10903 element {
10904 attribute {
10905 node-name: 'a';
10906 general-entity-reference {
10907 is-expanded: false;
10908 }
10909 }
10910 }
10911 }
10912
10913 @@XMLTest:
10914 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.1.test
10915 @@@DEnt:
10916 @@@@test:value:
10917 <!DOCTYPE p [
10918 <!ENTITY c "&entity;">
10919 ]>
10920 <p a="&c;"/>
10921 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10922 @@XMLTest:
10923 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.2.test
10924 @@@DEnt:
10925 @@@@test:value:
10926 <!DOCTYPE p [
10927 <!ENTITY other "aa">
10928 <!ENTITY % another "aa">
10929 <!ENTITY c "&entity;">
10930 ]>
10931 <p a="&c;"/>
10932 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10933 @@XMLTest:
10934 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.3.test
10935 @@@DEnt:
10936 @@@@test:value:
10937 <?xml version="1.0" standalone="yes"?>
10938 <!DOCTYPE p [
10939 <!ENTITY c "&entity;">
10940 ]>
10941 <p a="&c;"/>
10942 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10943 @@XMLTest:
10944 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.4.test
10945 @@@DEnt:
10946 @@@@test:value:
10947 <?xml version="1.0" standalone="no"?>
10948 <!DOCTYPE p [
10949 <!ENTITY c "&entity;">
10950 ]>
10951 <p a="&c;"/>
10952 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10953 @@XMLTest:
10954 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.5.test
10955 @@@DEnt:
10956 @@@@test:value:
10957 <?xml version="1.0" standalone="yes"?>
10958 <!DOCTYPE p [
10959 <!ENTITY other "aa">
10960 <!ENTITY % another "aa">
10961 <!ENTITY c "&entity;">
10962 ]>
10963 <p a="&c;"/>
10964 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10965 @@XMLTest:
10966 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.6.test
10967 @@@DEnt:
10968 @@@@test:value:
10969 <?xml version="1.0" standalone="no"?>
10970 <!DOCTYPE p [
10971 <!ENTITY other "aa">
10972 <!ENTITY % another "aa">
10973 <!ENTITY c "&entity;">
10974 ]>
10975 <p a="&c;"/>
10976 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10977 @@XMLTest:
10978 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.-1.test
10979 @@@DEnt:
10980 @@@@test:value:
10981 <!DOCTYPE p [
10982 <!ENTITY entity "value">
10983 <!ENTITY c "&entity;">
10984 ]>
10985 <p a="&c;"/>
10986 @@@test:domTree:
10987 document {
10988 document-type {
10989 general-entity {
10990 node-name: 'entity';
10991 text-content: 'value';
10992 }
10993 general-entity {
10994 node-name: 'c';
10995 general-entity-reference {
10996 node-name: 'entity';
10997 text-content: 'value';
10998 }
10999 }
11000 }
11001 element {
11002 attribute {
11003 node-name: 'a';
11004 general-entity-reference {
11005 node-name: 'c';
11006 general-entity-reference {
11007 node-name: 'entity';
11008 text-content: 'value';
11009 }
11010 }
11011 }
11012 }
11013 }
11014 @@XMLTest:
11015 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.-2.test
11016 @@@DEnt:
11017 @@@@test:value:
11018 <!DOCTYPE p [
11019 <!ENTITY entity "value">
11020 <!ENTITY another SYSTEM "another">
11021 <!ENTITY c "&entity;">
11022 ]>
11023 <p a="&c;"/>
11024 @@@test:domTree:
11025 document {
11026 document-type {
11027 general-entity {
11028 node-name: 'entity';
11029 text-content: 'value';
11030 }
11031 general-entity {
11032 node-name: 'c';
11033 general-entity-reference {
11034 node-name: 'entity';
11035 text-content: 'value';
11036 }
11037 }
11038 general-entity {
11039 node-name: 'another';
11040 public-id: null;
11041 system-id: 'another';
11042 has-replacement-tree: false;
11043 }
11044 }
11045 element {
11046 attribute {
11047 node-name: 'a';
11048 general-entity-reference {
11049 node-name: 'c';
11050 general-entity-reference {
11051 node-name: 'entity';
11052 text-content: 'value';
11053 }
11054 }
11055 }
11056 }
11057 }
11058 @@XMLTest:
11059 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.2.test
11060 @@@DEnt:
11061 @@@@test:value:
11062 <?xml version="1.0" standalone="yes"?>
11063 <!DOCTYPE p [
11064 <!ENTITY c "&entity;">
11065 ]>
11066 <p a="&c;"/>
11067 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11068 @@XMLTest:
11069 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.3.test
11070 @@@DEnt:
11071 @@@@test:value:
11072 <?xml version="1.0" standalone="yes"?>
11073 <!DOCTYPE p [
11074 <!ENTITY % para "<!-- -->">
11075 %para;
11076 <!ENTITY c "&entity;">
11077 ]>
11078 <p a="&c;"/>
11079 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11080 @@XMLTest:
11081 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-1.test
11082 @@@DEnt:
11083 @@@@test:value:
11084 <?xml version="1.0" standalone="no"?>
11085 <!DOCTYPE p [
11086 <!ENTITY c "&entity;">
11087 <!ENTITY % para "<!-- -->">
11088 %para;
11089 ]>
11090 <p a="&c;"/>
11091 @@@test:domTree:
11092 document {
11093 document-type {
11094 general-entity {
11095 node-name: 'c';
11096 general-entity-reference {
11097 node-name: 'entity';
11098 is-expanded: false;
11099 }
11100 }
11101 }
11102 element {
11103 attribute {
11104 node-name: 'a';
11105 general-entity-reference {
11106 node-name: 'c';
11107 general-entity-reference {
11108 node-name: 'entity';
11109 is-expanded: false;
11110 }
11111 }
11112 }
11113 }
11114 }
11115 @@XMLTest:
11116 @@@QName:
11117 xp.reptxt.attval.ger.entity.declared.standalone.-1.2.test
11118 @@@DEnt:
11119 @@@@test:value:
11120 <?xml version="1.0" standalone="no"?>
11121 <!DOCTYPE p [
11122 <!ENTITY % para "<!-- -->">
11123 %para;
11124 <!ENTITY c "&entity;">
11125 ]>
11126 <p a="&c;"/>
11127 @@@test:domTree:
11128 document {
11129 document-type { }
11130 element {
11131 attribute {
11132 node-name: 'a';
11133 general-entity-reference {
11134 node-name: 'c';
11135 is-expanded: false;
11136 }
11137 }
11138 }
11139 }
11140 @@XMLTest:
11141 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-2.test
11142 @@@DEnt:
11143 @@@@test:value:
11144 <!DOCTYPE p [
11145 <!ENTITY c "&entity;">
11146 <!ENTITY % para "<!-- -->">
11147 %para;
11148 ]>
11149 <p a="&c;"/>
11150 @@@test:domTree:
11151 document {
11152 document-type { }
11153 element {
11154 attribute {
11155 node-name: 'a';
11156 general-entity-reference {
11157 node-name: 'c';
11158 is-expanded: true;
11159 general-entity-reference {
11160 node-name: 'entity';
11161 is-expanded: false;
11162 }
11163 }
11164 }
11165 }
11166 }
11167 @@XMLTest:
11168 @@@QName:
11169 xp.reptxt.attval.ger.entity.declared.standalone.-2.2.test
11170 @@@DEnt:
11171 @@@@test:value:
11172 <!DOCTYPE p [
11173 <!ENTITY % para "<!-- -->">
11174 %para;
11175 <!ENTITY c "&entity;">
11176 ]>
11177 <p a="&c;"/>
11178 @@@test:domTree:
11179 document {
11180 document-type { }
11181 element {
11182 attribute {
11183 node-name: 'a';
11184 general-entity-reference {
11185 node-name: 'c';
11186 is-expanded: false;
11187 }
11188 }
11189 }
11190 }
11191 @@XMLTest:
11192 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.4.test
11193 @@@DEnt:
11194 @@@@test:value:
11195 <?xml version="1.0" standalone="yes"?>
11196 <!DOCTYPE p [
11197 <!ENTITY % para SYSTEM "para">
11198 %para;
11199 <!ENTITY c "&entity;">
11200 ]>
11201 <p a="&c;"/>
11202 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11203 @@XMLTest:
11204 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-3.test
11205 @@@DEnt:
11206 @@@@test:value:
11207 <?xml version="1.0" standalone="no"?>
11208 <!DOCTYPE p [
11209 <!ENTITY c "&entity;">
11210 <!ENTITY % para SYSTEM "para">
11211 %para;
11212 ]>
11213 <p a="&c;"/>
11214 @@@test:domTree:
11215 document {
11216 document-type { }
11217 element {
11218 attribute {
11219 node-name: 'a';
11220 general-entity-reference {
11221 node-name: 'c';
11222 is-expanded: true;
11223 general-entity-reference {
11224 node-name: 'entity';
11225 is-expanded: false;
11226 }
11227 }
11228 }
11229 }
11230 }
11231 @@XMLTest:
11232 @@@QName:
11233 xp.reptxt.attval.ger.entity.declared.standalone.-3.2.test
11234 @@@DEnt:
11235 @@@@test:value:
11236 <?xml version="1.0" standalone="no"?>
11237 <!DOCTYPE p [
11238 <!ENTITY % para SYSTEM "para">
11239 %para;
11240 <!ENTITY c "&entity;">
11241 ]>
11242 <p a="&c;"/>
11243 @@@test:domTree:
11244 document {
11245 document-type { }
11246 element {
11247 attribute {
11248 node-name: 'a';
11249 general-entity-reference {
11250 node-name: 'c';
11251 is-expanded: false;
11252 }
11253 }
11254 }
11255 }
11256 @@XMLTest:
11257 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-4.test
11258 @@@DEnt:
11259 @@@@test:value:
11260 <!DOCTYPE p [
11261 <!ENTITY c "&entity;">
11262 <!ENTITY % para SYSTEM "para">
11263 %para;
11264 ]>
11265 <p a="&c;"/>
11266 @@@test:domTree:
11267 document {
11268 document-type { }
11269 element {
11270 attribute {
11271 node-name: 'a';
11272 general-entity-reference {
11273 node-name: 'c';
11274 is-expanded: true;
11275 general-entity-reference {
11276 node-name: 'entity';
11277 is-expanded: false;
11278 }
11279 }
11280 }
11281 }
11282 }
11283 @@XMLTest:
11284 @@@QName:
11285 xp.reptxt.attval.ger.entity.declared.standalone.-4.2.test
11286 @@@DEnt:
11287 @@@@test:value:
11288 <!DOCTYPE p [
11289 <!ENTITY % para SYSTEM "para">
11290 %para;
11291 <!ENTITY c "&entity;">
11292 ]>
11293 <p a="&c;"/>
11294 @@@test:domTree:
11295 document {
11296 document-type { }
11297 element {
11298 attribute {
11299 node-name: 'a';
11300 general-entity-reference {
11301 node-name: 'c';
11302 is-expanded: false;
11303 }
11304 }
11305 }
11306 }
11307 @@XMLTest:
11308 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.5.test
11309 @@@DEnt:
11310 @@@@test:value:
11311 <?xml version="1.0" standalone="yes"?>
11312 <!DOCTYPE p SYSTEM "dtd" [
11313 <!ENTITY c "&entity;">
11314 ]>
11315 <p a="&c;"/>
11316 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11317 @@XMLTest:
11318 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-5.test
11319 @@@DEnt:
11320 @@@@test:value:
11321 <?xml version="1.0" standalone="no"?>
11322 <!DOCTYPE p SYSTEM "dtd" [
11323 <!ENTITY c "&entity;">
11324 ]>
11325 <p a="&c;"/>
11326 @@@test:domTree:
11327 document {
11328 document-type { }
11329 element {
11330 attribute {
11331 node-name: 'a';
11332 general-entity-reference {
11333 node-name: 'c';
11334 is-expanded: true;
11335 general-entity-reference {
11336 node-name: 'entity';
11337 is-expanded: false;
11338 }
11339 }
11340 }
11341 }
11342 }
11343 @@XMLTest:
11344 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-6.test
11345 @@@DEnt:
11346 @@@@test:value:
11347 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">]>
11348 <p a="&c;"/>
11349 @@@test:domTree:
11350 document {
11351 document-type { }
11352 element {
11353 attribute {
11354 node-name: 'a';
11355 general-entity-reference {
11356 node-name: 'c';
11357 is-expanded: true;
11358 general-entity-reference {
11359 node-name: 'entity';
11360 is-expanded: false;
11361 }
11362 }
11363 }
11364 }
11365 }
11366
11367 @@XMLTest:
11368 @@@QName: xp.attlist.dup.entity.declared.1.test
11369 @@@DEnt:
11370 @@@@test:value:
11371 <!DOCTYPE p [
11372 <!ATTLIST p a CDATA "no-entity">
11373 <!ATTLIST p a CDATA "&entity;">
11374 ]>
11375 <p/>
11376 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 21)..(3, 29); }
11377 @@XMLTest:
11378 @@@QName: xp.attlist.dup.entity.declared.2.test
11379 @@@DEnt:
11380 @@@@test:value:
11381 <!DOCTYPE p [
11382 <!ATTLIST p a CDATA "no-entity"
11383 a CDATA "&entity;">
11384 ]>
11385 <p/>
11386 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 21)..(3, 29); }
11387 @@XMLTest:
11388 @@@QName: xp.attlist.unused.entity.declared.1.test
11389 @@@DEnt:
11390 @@@@test:value:
11391 <!DOCTYPE p [
11392 <!ATTLIST q a CDATA "&entity;">
11393 ]>
11394 <p/>
11395 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 21)..(2, 29); }
11396 @@XMLTest:
11397 @@@QName: xp.attlist.unused.entity.declared.2.test
11398 @@@DEnt:
11399 @@@@test:value:
11400 <!DOCTYPE p [
11401 <!ATTLIST p a CDATA "&entity;">
11402 ]>
11403 <p a="bb"/>
11404 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 21)..(2, 29); }
11405
11406 @@XMLTest:
11407 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.1.test
11408 @@@DEnt:
11409 @@@@test:value:
11410 <!DOCTYPE p [
11411 <!ENTITY c "&entity;">
11412 <!ATTLIST p a CDATA "&c;">
11413 ]>
11414 <p/>
11415 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11416 @@XMLTest:
11417 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.2.test
11418 @@@DEnt:
11419 @@@@test:value:
11420 <!DOCTYPE p [
11421 <!ENTITY other "aa">
11422 <!ENTITY % another "aa">
11423 <!ENTITY c "&entity;">
11424 <!ATTLIST p a CDATA "&c;">
11425 ]>
11426 <p/>
11427 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11428 @@XMLTest:
11429 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.3.test
11430 @@@DEnt:
11431 @@@@test:value:
11432 <?xml version="1.0" standalone="yes"?>
11433 <!DOCTYPE p [
11434 <!ENTITY c "&entity;">
11435 <!ATTLIST p a CDATA "&c;">
11436 ]>
11437 <p/>
11438 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11439 @@XMLTest:
11440 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.4.test
11441 @@@DEnt:
11442 @@@@test:value:
11443 <?xml version="1.0" standalone="no"?>
11444 <!DOCTYPE p [
11445 <!ENTITY c "&entity;">
11446 <!ATTLIST p a CDATA "&c;">
11447 ]>
11448 <p/>
11449 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11450 @@XMLTest:
11451 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.5.test
11452 @@@DEnt:
11453 @@@@test:value:
11454 <?xml version="1.0" standalone="yes"?>
11455 <!DOCTYPE p [
11456 <!ENTITY other "aa">
11457 <!ENTITY % another "aa">
11458 <!ENTITY c "&entity;">
11459 <!ATTLIST p a CDATA "&c;">
11460 ]>
11461 <p/>
11462 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11463 @@XMLTest:
11464 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.6.test
11465 @@@DEnt:
11466 @@@@test:value:
11467 <?xml version="1.0" standalone="no"?>
11468 <!DOCTYPE p [
11469 <!ENTITY other "aa">
11470 <!ENTITY % another "aa">
11471 <!ENTITY c "&entity;">
11472 <!ATTLIST p a CDATA "&c;">
11473 ]>
11474 <p/>
11475 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11476 @@XMLTest:
11477 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.-1.test
11478 @@@DEnt:
11479 @@@@test:value:
11480 <!DOCTYPE p [
11481 <!ENTITY entity "value">
11482 <!ENTITY c "&entity;">
11483 <!ATTLIST p a CDATA "&c;">
11484 ]>
11485 <p/>
11486 @@@test:domTree:
11487 document {
11488 document-type {
11489 general-entity {
11490 node-name: 'entity';
11491 text-content: 'value';
11492 }
11493 general-entity {
11494 node-name: 'c';
11495 general-entity-reference {
11496 node-name: 'entity';
11497 is-expanded: true;
11498 text-content: 'value';
11499 }
11500 }
11501 element-type-definition {
11502 node-name: 'p';
11503 attribute-definition {
11504 node-name: 'a';
11505 general-entity-reference {
11506 node-name: 'c';
11507 is-expanded: true;
11508 general-entity-reference {
11509 node-name: 'entity';
11510 is-expanded: true;
11511 text-content: 'value';
11512 }
11513 }
11514 }
11515 }
11516 }
11517 element {
11518 attribute {
11519 node-name: 'a';
11520 specified: false;
11521 general-entity-reference {
11522 node-name: 'c';
11523 general-entity-reference {
11524 node-name: 'entity';
11525 text-content: 'value';
11526 }
11527 }
11528 }
11529 }
11530 }
11531 @@XMLTest:
11532 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.-2.test
11533 @@@DEnt:
11534 @@@@test:value:
11535 <!DOCTYPE p [
11536 <!ENTITY entity "value">
11537 <!ENTITY another SYSTEM "another">
11538 <!ENTITY c "&entity;">
11539 <!ATTLIST p a CDATA "&c;">
11540 ]>
11541 <p/>
11542 @@@test:domTree:
11543 document {
11544 document-type {
11545 general-entity {
11546 node-name: 'entity';
11547 text-content: 'value';
11548 }
11549 general-entity {
11550 node-name: 'c';
11551 general-entity-reference {
11552 node-name: 'entity';
11553 text-content: 'value';
11554 }
11555 }
11556 general-entity {
11557 node-name: 'another';
11558 public-id: null;
11559 system-id: 'another';
11560 has-replacement-tree: false;
11561 }
11562 element-type-definition {
11563 node-name: 'p';
11564 attribute-definition {
11565 node-name: 'a';
11566 general-entity-reference {
11567 node-name: 'c';
11568 is-expanded: true;
11569 general-entity-reference {
11570 node-name: 'entity';
11571 is-expanded: true;
11572 text-content: 'value';
11573 }
11574 }
11575 }
11576 }
11577 }
11578 element {
11579 attribute {
11580 node-name: 'a';
11581 specified: false;
11582 general-entity-reference {
11583 node-name: 'c';
11584 general-entity-reference {
11585 node-name: 'entity';
11586 text-content: 'value';
11587 }
11588 }
11589 }
11590 }
11591 }
11592 @@XMLTest:
11593 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.2.test
11594 @@@DEnt:
11595 @@@@test:value:
11596 <?xml version="1.0" standalone="yes"?>
11597 <!DOCTYPE p [
11598 <!ENTITY c "&entity;">
11599 <!ATTLIST p a CDATA "&c;">
11600 ]>
11601 <p/>
11602 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11603 @@XMLTest:
11604 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.3.test
11605 @@@DEnt:
11606 @@@@test:value:
11607 <?xml version="1.0" standalone="yes"?>
11608 <!DOCTYPE p [
11609 <!ENTITY % para "<!-- -->">
11610 %para;
11611 <!ENTITY c "&entity;">
11612 <!ATTLIST p a CDATA "&c;">
11613 ]>
11614 <p/>
11615 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11616 @@XMLTest:
11617 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-1.test
11618 @@@DEnt:
11619 @@@@test:value:
11620 <?xml version="1.0" standalone="no"?>
11621 <!DOCTYPE p [
11622 <!ENTITY c "&entity;">
11623 <!ATTLIST p a CDATA "&c;">
11624 <!ENTITY % para "<!-- -->">
11625 %para;
11626 ]>
11627 <p/>
11628 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11629 @@XMLTest:
11630 @@@QName:
11631 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-1.2.test
11632 @@@DEnt:
11633 @@@@test:value:
11634 <?xml version="1.0" standalone="no"?>
11635 <!DOCTYPE p [
11636 <!ENTITY % para "<!-- -->">
11637 %para;
11638 <!ENTITY c "&entity;">
11639 <!ATTLIST p a CDATA "&c;">
11640 ]>
11641 <p g="h"/>
11642 @@@test:domTree:
11643 document {
11644 document-type { }
11645 element {
11646 attribute {
11647 node-name: 'g';
11648 text-content: 'h';
11649 }
11650 }
11651 }
11652 @@XMLTest:
11653 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-2.test
11654 @@@DEnt:
11655 @@@@test:value:
11656 <!DOCTYPE p [
11657 <!ENTITY c "&entity;">
11658 <!ATTLIST p a CDATA "&c;">
11659 <!ENTITY % para "<!-- -->">
11660 %para;
11661 ]>
11662 <p/>
11663 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11664 @@XMLTest:
11665 @@@QName:
11666 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-2.2.test
11667 @@@DEnt:
11668 @@@@test:value:
11669 <!DOCTYPE p [
11670 <!ENTITY % para "<!-- -->">
11671 %para;
11672 <!ENTITY c "&entity;">
11673 <!ATTLIST p a CDATA "&c;">
11674 ]>
11675 <p g="h"/>
11676 @@@test:domTree:
11677 document {
11678 document-type { }
11679 element {
11680 attribute {
11681 node-name: 'g';
11682 text-content: 'h';
11683 }
11684 }
11685 }
11686 @@XMLTest:
11687 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.4.test
11688 @@@DEnt:
11689 @@@@test:value:
11690 <?xml version="1.0" standalone="yes"?>
11691 <!DOCTYPE p [
11692 <!ENTITY % para SYSTEM "para">
11693 %para;
11694 <!ENTITY c "&entity;">
11695 <!ATTLIST p a CDATA "&c;">
11696 ]>
11697 <p/>
11698 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11699 @@XMLTest:
11700 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-3.test
11701 @@@DEnt:
11702 @@@@test:value:
11703 <?xml version="1.0" standalone="no"?>
11704 <!DOCTYPE p [
11705 <!ENTITY c "&entity;">
11706 <!ATTLIST p a CDATA "&c;">
11707 <!ENTITY % para SYSTEM "para">
11708 %para;
11709 ]>
11710 <p/>
11711 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11712 @@XMLTest:
11713 @@@QName:
11714 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-3.2.test
11715 @@@DEnt:
11716 @@@@test:value:
11717 <?xml version="1.0" standalone="no"?>
11718 <!DOCTYPE p [
11719 <!ENTITY % para SYSTEM "para">
11720 %para;
11721 <!ENTITY c "&entity;">
11722 <!ATTLIST p a CDATA "&c;">
11723 ]>
11724 <p g="h"/>
11725 @@@test:domTree:
11726 document {
11727 document-type { }
11728 element {
11729 attribute {
11730 node-name: 'g';
11731 text-content: 'h';
11732 }
11733 }
11734 }
11735 @@XMLTest:
11736 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-4.test
11737 @@@DEnt:
11738 @@@@test:value:
11739 <!DOCTYPE p [
11740 <!ENTITY c "&entity;">
11741 <!ATTLIST p a CDATA "&c;">
11742 <!ENTITY % para SYSTEM "para">
11743 %para;
11744 ]>
11745 <p/>
11746 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11747 @@XMLTest:
11748 @@@QName:
11749 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-4.2.test
11750 @@@DEnt:
11751 @@@@test:value:
11752 <!DOCTYPE p [
11753 <!ENTITY % para SYSTEM "para">
11754 %para;
11755 <!ENTITY c "&entity;">
11756 <!ATTLIST p a CDATA "&c;">
11757 ]>
11758 <p g="h"/>
11759 @@@test:domTree:
11760 document {
11761 document-type { }
11762 element {
11763 attribute {
11764 node-name: 'g';
11765 text-content: 'h';
11766 }
11767 }
11768 }
11769 @@XMLTest:
11770 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.5.test
11771 @@@DEnt:
11772 @@@@test:value:
11773 <?xml version="1.0" standalone="yes"?>
11774 <!DOCTYPE p SYSTEM "dtd" [
11775 <!ENTITY c "&entity;">
11776 <!ATTLIST p a CDATA "&c;">
11777 ]>
11778 <p/>
11779 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11780 @@XMLTest:
11781 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-5.test
11782 @@@DEnt:
11783 @@@@test:value:
11784 <?xml version="1.0" standalone="no"?>
11785 <!DOCTYPE p SYSTEM "dtd" [
11786 <!ENTITY c "&entity;">
11787 <!ATTLIST p a CDATA "&c;">
11788 ]>
11789 <p/>
11790 @@@test:domTree:
11791 document {
11792 document-type { }
11793 element {
11794 attribute {
11795 node-name: 'a';
11796 specified: false;
11797 general-entity-reference {
11798 node-name: 'c';
11799 is-expanded: true;
11800 general-entity-reference {
11801 node-name: 'entity';
11802 is-expanded: false;
11803 }
11804 }
11805 }
11806 }
11807 }
11808 @@XMLTest:
11809 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-6.test
11810 @@@DEnt:
11811 @@@@test:value:
11812 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">
11813 <!ATTLIST p a CDATA "&c;">
11814 ]>
11815 <p/>
11816 @@@test:domTree:
11817 document {
11818 document-type { }
11819 element {
11820 attribute {
11821 node-name: 'a';
11822 specified: false;
11823 general-entity-reference {
11824 node-name: 'c';
11825 is-expanded: true;
11826 general-entity-reference {
11827 node-name: 'entity';
11828 is-expanded: false;
11829 }
11830 }
11831 }
11832 }
11833 }
11834
11835 @@XMLTest:
11836 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.1.test
11837 @@@DEnt:
11838 @@@@test:value:
11839 <!DOCTYPE p [
11840 <!ATTLIST p a CDATA "&entity;">
11841 ]>
11842 <p/>
11843 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
11844 @@XMLTest:
11845 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.2.test
11846 @@@DEnt:
11847 @@@@test:value:
11848 <!DOCTYPE p [
11849 <!ENTITY other "aa">
11850 <!ENTITY % another "aa">
11851 <!ATTLIST p a CDATA "&entity;">
11852 ]>
11853 <p/>
11854 @@@c:erred: <[[xp|wf-entity-declared]]> { (4, 22)..(4, 29); }
11855 @@XMLTest:
11856 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.3.test
11857 @@@DEnt:
11858 @@@@test:value:
11859 <?xml version="1.0" standalone="yes"?>
11860 <!DOCTYPE p [
11861 <!ATTLIST p a CDATA "&entity;">
11862 ]>
11863 <p/>
11864 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11865 @@XMLTest:
11866 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.4.test
11867 @@@DEnt:
11868 @@@@test:value:
11869 <?xml version="1.0" standalone="no"?>
11870 <!DOCTYPE p [
11871 <!ATTLIST p a CDATA "&entity;">
11872 ]>
11873 <p/>
11874 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11875 @@XMLTest:
11876 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.5.test
11877 @@@DEnt:
11878 @@@@test:value:
11879 <?xml version="1.0" standalone="yes"?>
11880 <!DOCTYPE p [
11881 <!ENTITY other "aa">
11882 <!ENTITY % another "aa">
11883 <!ATTLIST p a CDATA "&entity;">
11884 ]>
11885 <p/>
11886 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
11887 @@XMLTest:
11888 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.6.test
11889 @@@DEnt:
11890 @@@@test:value:
11891 <?xml version="1.0" standalone="no"?>
11892 <!DOCTYPE p [
11893 <!ENTITY other "aa">
11894 <!ENTITY % another "aa">
11895 <!ATTLIST p a CDATA "&entity;">
11896 ]>
11897 <p/>
11898 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
11899 @@XMLTest:
11900 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-1.test
11901 @@@DEnt:
11902 @@@@test:value:
11903 <!DOCTYPE p [
11904 <!ENTITY entity "value">
11905 <!ATTLIST p a CDATA "&entity;">
11906 ]>
11907 <p/>
11908 @@@test:domTree:
11909 document {
11910 document-type {
11911 general-entity {
11912 node-name: 'entity';
11913 text-content: 'value';
11914 }
11915 element-type-definition {
11916 node-name: 'p';
11917 attribute-definition {
11918 node-name: 'a';
11919 general-entity-reference {
11920 node-name: 'entity';
11921 is-expanded: true;
11922 text-content: 'value';
11923 }
11924 }
11925 }
11926 }
11927 element {
11928 attribute {
11929 node-name: 'a';
11930 specified: false;
11931 general-entity-reference {
11932 node-name: 'entity';
11933 is-expanded: true;
11934 text-content: 'value';
11935 }
11936 }
11937 }
11938 }
11939 @@XMLTest:
11940 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-1.2.test
11941 @@@DEnt:
11942 @@@@test:value:
11943 <!DOCTYPE p [
11944 <!ATTLIST p a CDATA "&entity;">
11945 <!ENTITY entity "value">
11946 ]>
11947 <p/>
11948 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
11949 @@XMLTest:
11950 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-2.test
11951 @@@DEnt:
11952 @@@@test:value:
11953 <!DOCTYPE p [
11954 <!ENTITY entity "value">
11955 <!ENTITY another SYSTEM "another">
11956 <!ATTLIST p a CDATA "&entity;">
11957 ]>
11958 <p/>
11959 @@@test:domTree:
11960 document {
11961 document-type {
11962 element-type-definition {
11963 node-name: 'p';
11964 attribute-definition {
11965 node-name: 'a';
11966 general-entity-reference {
11967 node-name: 'entity';
11968 is-expanded: true;
11969 text-content: 'value';
11970 }
11971 }
11972 }
11973 general-entity {
11974 node-name: 'entity';
11975 text-content: 'value';
11976 has-replacement-tree: true;
11977 }
11978 general-entity {
11979 node-name: 'another';
11980 public-id: null;
11981 system-id: 'another';
11982 has-replacement-tree: false;
11983 }
11984 }
11985 element {
11986 attribute {
11987 node-name: 'a';
11988 specified: false;
11989 general-entity-reference {
11990 node-name: 'entity';
11991 is-expanded: true;
11992 text-content: 'value';
11993 }
11994 }
11995 }
11996 }
11997 @@XMLTest:
11998 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-2.2.test
11999 @@@DEnt:
12000 @@@@test:value:
12001 <!DOCTYPE p [
12002 <!ATTLIST p a CDATA "&entity;">
12003 <!ENTITY entity "value">
12004 <!ENTITY another SYSTEM "another">
12005 ]>
12006 <p/>
12007 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12008 @@XMLTest:
12009 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.2.test
12010 @@@DEnt:
12011 @@@@test:value:
12012 <?xml version="1.0" standalone="yes"?>
12013 <!DOCTYPE p [
12014 <!ATTLIST p a CDATA "&entity;">
12015 ]>
12016 <p/>
12017 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12018 @@XMLTest:
12019 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.3.test
12020 @@@DEnt:
12021 @@@@test:value:
12022 <?xml version="1.0" standalone="yes"?>
12023 <!DOCTYPE p [
12024 <!ATTLIST p a CDATA "&entity;">
12025 <!ENTITY % para "<!-- -->">
12026 %para;
12027 ]>
12028 <p/>
12029 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12030 @@XMLTest:
12031 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.3.2.test
12032 @@@DEnt:
12033 @@@@test:value:
12034 <?xml version="1.0" standalone="yes"?>
12035 <!DOCTYPE p [
12036 <!ENTITY % para "<!-- -->">
12037 %para;
12038 <!ATTLIST p a CDATA "&entity;">
12039 ]>
12040 <p/>
12041 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
12042 @@@enImplNote:
12043 The <XML::ATTLIST> declaration is processed since
12044 it is a <XA::standalone> document.
12045 @@XMLTest:
12046 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-1.test
12047 @@@DEnt:
12048 @@@@test:value:
12049 <?xml version="1.0" standalone="no"?>
12050 <!DOCTYPE p [
12051 <!ATTLIST p a CDATA "&entity;">
12052 <!ENTITY % para "<!-- -->">
12053 %para;
12054 ]>
12055 <p/>
12056 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12057 @@XMLTest:
12058 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-1.2.test
12059 @@@DEnt:
12060 @@@@test:value:
12061 <?xml version="1.0" standalone="no"?>
12062 <!DOCTYPE p [
12063 <!ATTLIST p b CDATA #IMPLIED>
12064 <!ENTITY % para "<!-- -->">
12065 %para;
12066 <!ATTLIST p a CDATA "&entity;">
12067 ]>
12068 <p c="d"/>
12069 @@@c:erred:
12070 <[[xp|warning-attribute-definition-not-processed]]> { (6, 13)..(6, 30); }
12071 @@@test:domTree:
12072 document {
12073 document-type {
12074 element-type-definition {
12075 node-name: 'p';
12076 attribute-definition {
12077 node-name: 'b';
12078 }
12079 }
12080 }
12081 element {
12082 attribute {
12083 node-name: 'c';
12084 text-content: 'd';
12085 }
12086 }
12087 }
12088 @@@enImplNote:
12089 The second <XML::ATTLIST> declaration is read but not processed
12090 and its <XML::&entity;> general entity reference violates
12091 entity declared validty constraint rather than well-formedness
12092 constraint.
12093 @@XMLTest:
12094 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-2.test
12095 @@@DEnt:
12096 @@@@test:value:
12097 <!DOCTYPE p [
12098 <!ATTLIST p a CDATA "&entity;">
12099 <!ENTITY % para "<!-- -->">
12100 %para;
12101 ]>
12102 <p/>
12103 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12104 @@XMLTest:
12105 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-2.2.test
12106 @@@DEnt:
12107 @@@@test:value:
12108 <!DOCTYPE p [
12109 <!ATTLIST p b CDATA #IMPLIED>
12110 <!ENTITY % para "<!-- -->">
12111 %para;
12112 <!ATTLIST p a CDATA "&entity;">
12113 ]>
12114 <p c="d"/>
12115 @@@c:erred:
12116 <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 30); }
12117 @@@test:domTree:
12118 document {
12119 document-type {
12120 element-type-definition {
12121 node-name: 'p';
12122 attribute-definition {
12123 node-name: 'b';
12124 }
12125 }
12126 }
12127 element {
12128 attribute {
12129 node-name: 'c';
12130 text-content: 'd';
12131 }
12132 }
12133 }
12134 @@XMLTest:
12135 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.4.test
12136 @@@DEnt:
12137 @@@@test:value:
12138 <?xml version="1.0" standalone="yes"?>
12139 <!DOCTYPE p [
12140 <!ATTLIST p a CDATA "&entity;">
12141 <!ENTITY % para SYSTEM "p">
12142 %para;
12143 ]>
12144 <p/>
12145 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12146 @@XMLTest:
12147 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.4.2.test
12148 @@@DEnt:
12149 @@@@test:value:
12150 <?xml version="1.0" standalone="yes"?>
12151 <!DOCTYPE p [
12152 <!ENTITY % para SYSTEM "p">
12153 %para;
12154 <!ATTLIST p a CDATA "&entity;">
12155 ]>
12156 <p/>
12157 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
12158 @@@enImplNote:
12159 The <XML::ATTLIST> declaration is processed since
12160 it is a <XA::standalone> document.
12161 @@XMLTest:
12162 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-3.test
12163 @@@DEnt:
12164 @@@@test:value:
12165 <?xml version="1.0" standalone="no"?>
12166 <!DOCTYPE p [
12167 <!ATTLIST p a CDATA "&entity;">
12168 <!ENTITY % para SYSTEM "p">
12169 %para;
12170 ]>
12171 <p/>
12172 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12173 @@@enImplNote:
12174 Is this well-formed? It has a parameter entity reference,
12175 therefore, it does not violates Entity Declared WFC, isn't it?
12176
12177 Note that Firefox 1.5 and Opera 9 TP1 reports that this document has a
12178 fatal error (also note that they does not support unexpanded).
12179
12180 See also:
12181 <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>
12182 @@XMLTest:
12183 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-3.2.test
12184 @@@DEnt:
12185 @@@@test:value:
12186 <?xml version="1.0" standalone="no"?>
12187 <!DOCTYPE p [
12188 <!ATTLIST p b CDATA #IMPLIED>
12189 <!ENTITY % para SYSTEM "p">
12190 %para;
12191 <!ATTLIST p a CDATA "&entity;">
12192 ]>
12193 <p c="d"/>
12194 @@@c:erred:
12195 <[[xp|warning-attribute-definition-not-processed]]> { (6, 13)..(6, 30); }
12196 @@@test:domTree:
12197 document {
12198 document-type {
12199 element-type-definition {
12200 node-name: 'p';
12201 attribute-definition {
12202 node-name: 'b';
12203 }
12204 }
12205 }
12206 element {
12207 attribute {
12208 node-name: 'c';
12209 text-content: 'd';
12210 }
12211 }
12212 }
12213 @@@enImplNote:
12214 The second <XML::ATTLIST> declaration is read but not processed
12215 and its <XML::&entity;> general entity reference violates
12216 entity declared validty constraint rather than well-formedness
12217 constraint.
12218 @@XMLTest:
12219 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-4.test
12220 @@@DEnt:
12221 @@@@test:value:
12222 <!DOCTYPE p [
12223 <!ATTLIST p a CDATA "&entity;">
12224 <!ENTITY % para SYSTEM "p">
12225 %para;
12226 ]>
12227 <p/>
12228 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12229 @@XMLTest:
12230 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-4.2.test
12231 @@@DEnt:
12232 @@@@test:value:
12233 <!DOCTYPE p [
12234 <!ATTLIST p b CDATA #IMPLIED>
12235 <!ENTITY % para SYSTEM "p">
12236 %para;
12237 <!ATTLIST p a CDATA "&entity;">
12238 ]>
12239 <p c="d"/>
12240 @@@c:erred:
12241 <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 30); }
12242 @@@test:domTree:
12243 document {
12244 document-type {
12245 element-type-definition {
12246 node-name: 'p';
12247 attribute-definition {
12248 node-name: 'b';
12249 }
12250 }
12251 }
12252 element {
12253 attribute {
12254 node-name: 'c';
12255 text-content: 'd';
12256 }
12257 }
12258 }
12259 @@XMLTest:
12260 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.5.test
12261 @@@DEnt:
12262 @@@@test:value:
12263 <?xml version="1.0" standalone="yes"?>
12264 <!DOCTYPE p SYSTEM "dtd" [
12265 <!ATTLIST p a CDATA "&entity;">
12266 ]>
12267 <p/>
12268 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12269 @@@enImplNote:
12270 This document has an error - result is implementation dependent.
12271 @@XMLTest:
12272 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-5.test
12273 @@@DEnt:
12274 @@@@test:value:
12275 <?xml version="1.0" standalone="no"?>
12276 <!DOCTYPE p SYSTEM "dtd" [
12277 <!ATTLIST p a CDATA "&entity;">
12278 ]>
12279 <p/>
12280 @@@test:domTree:
12281 document {
12282 document-type {
12283 element-type-definition {
12284 node-name: 'p';
12285 attribute-definition {
12286 node-name: 'a';
12287 general-entity-reference {
12288 node-name: 'entity';
12289 is-expanded: false;
12290 }
12291 }
12292 }
12293 }
12294 element {
12295 attribute {
12296 node-name: 'a';
12297 specified: false;
12298 general-entity-reference {
12299 node-name: 'entity';
12300 is-expanded: false;
12301 }
12302 }
12303 }
12304 }
12305 @@@enImplNote:
12306 This document has an error - result is implementation dependent.
12307 @@XMLTest:
12308 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-6.test
12309 @@@DEnt:
12310 @@@@test:value:
12311 <!DOCTYPE p SYSTEM "dtd" [
12312 <!ATTLIST p a CDATA "&entity;">
12313 ]>
12314 <p/>
12315 @@@test:domTree:
12316 document {
12317 document-type {
12318 element-type-definition {
12319 node-name: 'p';
12320 attribute-definition {
12321 node-name: 'a';
12322 general-entity-reference {
12323 node-name: 'entity';
12324 is-expanded: false;
12325 }
12326 }
12327 }
12328 }
12329 element {
12330 attribute {
12331 node-name: 'a';
12332 specified: false;
12333 general-entity-reference {
12334 node-name: 'entity';
12335 is-expanded: false;
12336 }
12337 }
12338 }
12339 }
12340 @@@enImplNote:
12341 This document has an error - result is implementation dependent.
12342
12343 @@enImplNote:
12344 {TODO:: Entity declared WFC for
12345
12346 - General entity references in entity value??
12347
12348 }
12349
12350 @@XMLTest:
12351 @@@QName: xp.element.content.parsed.entity.reference.test
12352 @@@DEnt:
12353 @@@@test:value:
12354 <!DOCTYPE p [
12355 <!NOTATION n SYSTEM "notation">
12356 <!ENTITY ext SYSTEM "system" NDATA n>
12357 ]>
12358 <p>&ext;</p>
12359 @@@c:erred: <[[xp|wf-parsed-entity]]> { (5, 4)..(5, 8); }
12360 @@XMLTest:
12361 @@@QName: xp.attval.parsed.entity.reference.test
12362 @@@DEnt:
12363 @@@@test:value:
12364 <!DOCTYPE p [
12365 <!NOTATION n SYSTEM "notation">
12366 <!ENTITY ext SYSTEM "system" NDATA n>
12367 ]>
12368 <p a="&ext;"/>
12369 # @@@c:erred: <[[xp|wf-parsed-entity]]> { (5, 7)..(5, 11); }
12370 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (5, 7)..(5, 11); }
12371 @@XMLTest:
12372 @@@QName: xp.element.content.reptxt.parsed.entity.reference.test
12373 @@@DEnt:
12374 @@@@test:value:
12375 <!DOCTYPE p [
12376 <!NOTATION n SYSTEM "notation">
12377 <!ENTITY ext SYSTEM "system" NDATA n>
12378 <!ENTITY c "&#x26;ext;">
12379 ]>
12380 <p>&c;</p>
12381 @@@c:erred: <[[xp|wf-parsed-entity]]> { (1, 1)..(1, 5); }
12382 @@XMLTest:
12383 @@@QName: xp.attval.reptxt.parsed.entity.reference.test
12384 @@@DEnt:
12385 @@@@test:value:
12386 <!DOCTYPE p [
12387 <!NOTATION n SYSTEM "notation">
12388 <!ENTITY ext SYSTEM "system" NDATA n>
12389 <!ENTITY c "&#x26;ext;">
12390 ]>
12391 <p a="&c;"/>
12392 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 1)..(1, 5); }
12393 @@@c:erred:
12394 @@@@@: <[[xp|wf-parsed-entity]]> { }
12395 @@@@enImplNote: During entity node construction.
12396 @@XMLTest:
12397 @@@QName: xp.element.content.entval.parsed.entity.reference.test
12398 @@@DEnt:
12399 @@@@test:value:
12400 <!DOCTYPE p [
12401 <!NOTATION n SYSTEM "notation">
12402 <!ENTITY ext SYSTEM "system" NDATA n>
12403 <!ENTITY c "&ext;">
12404 ]>
12405 <p>&c;</p>
12406 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
12407 @@XMLTest:
12408 @@@QName: xp.attval.entval.parsed.entity.reference.test
12409 @@@DEnt:
12410 @@@@test:value:
12411 <!DOCTYPE p [
12412 <!NOTATION n SYSTEM "notation">
12413 <!ENTITY ext SYSTEM "system" NDATA n>
12414 <!ENTITY c "&ext;">
12415 ]>
12416 <p a="&c;"/>
12417 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { }
12418 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
12419
12420 @@XMLTest:
12421 @@@QName: xp.element.content.no.recursion.direct.test
12422 @@@DEnt:
12423 @@@@test:value:
12424 <!DOCTYPE p [
12425 <!ENTITY c "&c;">
12426 ]>
12427 <p>&c;</p>
12428 @@@c:erred: <[[xp|wf-no-recursion]]> { (1, 1)..(1, 3); }
12429 @@XMLTest:
12430 @@@QName: xp.element.content.no.recursion.indirect.test
12431 @@@DEnt:
12432 @@@@test:value:
12433 <!DOCTYPE p [
12434 <!ENTITY d "&c;">
12435 <!ENTITY c "&d;">
12436 ]>
12437 <p>&c;</p>
12438 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12439 @@XMLTest:
12440 @@@QName: xp.attval.no.recursion.direct.test
12441 @@@DEnt:
12442 @@@@test:value:
12443 <!DOCTYPE p [
12444 <!ENTITY c "&c;">
12445 ]>
12446 <p a="&c;"/>
12447 @@@c:erred: <[[xp|wf-no-recursion]]> { (1, 1)..(1, 3); }
12448 @@XMLTest:
12449 @@@QName: xp.attval.no.recursion.indirect.test
12450 @@@DEnt:
12451 @@@@test:value:
12452 <!DOCTYPE p [
12453 <!ENTITY d "&c;">
12454 <!ENTITY c "&d;">
12455 ]>
12456 <p a="&c;"/>
12457 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12458 @@XMLTest:
12459 @@@QName: xp.reptxt.element.content.no.recursion.direct.test
12460 @@@DEnt:
12461 @@@@test:value:
12462 <!DOCTYPE p [
12463 <!ENTITY c "&c;">
12464 <!ENTITY e "&#x26;c;">
12465 ]>
12466 <p>&e;</p>
12467 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |e| */ (1, 1)..(1, 3); }
12468 @@XMLTest:
12469 @@@QName: xp.reptxt.element.content.no.recursion.indirect.test
12470 @@@DEnt:
12471 @@@@test:value:
12472 <!DOCTYPE p [
12473 <!ENTITY d "&c;">
12474 <!ENTITY c "&d;">
12475 <!ENTITY e "&#x26;c;">
12476 ]>
12477 <p>&e;</p>
12478 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12479 @@XMLTest:
12480 @@@QName: xp.reptxt.attval.no.recursion.direct.test
12481 @@@DEnt:
12482 @@@@test:value:
12483 <!DOCTYPE p [
12484 <!ENTITY c "&c;">
12485 <!ENTITY e "&#x26;c;">
12486 ]>
12487 <p a="&e;"/>
12488 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |e| */ (1, 1)..(1, 3); }
12489 @@XMLTest:
12490 @@@QName: xp.reptxt.attval.no.recursion.indirect.test
12491 @@@DEnt:
12492 @@@@test:value:
12493 <!DOCTYPE p [
12494 <!ENTITY d "&c;">
12495 <!ENTITY c "&d;">
12496 <!ENTITY e "&#x26;c;">
12497 ]>
12498 <p a="&e;"/>
12499 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12500
12501 @@XMLTest:
12502 @@@QName: xp.ENTITY.system.ndata.name.test
12503 @@@DEnt:
12504 @@@@test:value:
12505 <!DOCTYPE a [
12506 <!NOTATION n SYSTEM "n">
12507 <!ENTITY % e SYSTEM "sys" NDATA n>
12508 ]><a/>
12509 @@@c:erred: <[[xp|wf-syntax-error]]> { (3, 26)..(3, 30); }
12510 @@XMLTest:
12511 @@@QName: xp.ENTITY.public.ndata.name.test
12512 @@@DEnt:
12513 @@@@test:value:
12514 <!DOCTYPE a [
12515 <!NOTATION n SYSTEM "n">
12516 <!ENTITY % e PUBLIC "pub" "sys" NDATA n>
12517 ]><a/>
12518 @@@c:erred: <[[xp|wf-syntax-error]]> { (3, 33)..(3, 37); }
12519 @@XMLTest:
12520 @@@QName: xp.ENTITY.public.ndata.name.-1.test
12521 @@@DEnt:
12522 @@@@test:value:
12523 <!DOCTYPE a [
12524 <!NOTATION n SYSTEM "n">
12525 <!ENTITY % e PUBLIC "pub" "sys" >
12526 ]><a/>
12527 @@@test:domTree:
12528 document { }
12529
12530 @@XMLTest:
12531 @@@QName: xp.ENTITY.pubid.1.test
12532 @@@DEnt:
12533 @@@@test:value:
12534 <!DOCTYPE a [
12535 <!ENTITY e PUBLIC "p" "s">
12536 ]><a/>
12537 @@@test:domTree:
12538 document {
12539 document-type {
12540 general-entity {
12541 node-name: 'e';
12542 public-id: 'p';
12543 system-id: 's';
12544 }
12545 }
12546 element { }
12547 }
12548 @@XMLTest:
12549 @@@QName: xp.ENTITY.pubid.2.test
12550 @@@DEnt:
12551 @@@@test:value:
12552 <!DOCTYPE a [
12553 <!ENTITY e PUBLIC " p " "s">
12554 ]><a/>
12555 @@@test:domTree:
12556 document {
12557 document-type {
12558 general-entity {
12559 node-name: 'e';
12560 public-id: 'p';
12561 system-id: 's';
12562 }
12563 }
12564 element { }
12565 }
12566 @@XMLTest:
12567 @@@QName: xp.ENTITY.pubid.3.test
12568 @@@DEnt:
12569 @@@@test:value:
12570 <!DOCTYPE a [
12571 <!ENTITY e PUBLIC " p $u000Aq$u000A " "s">
12572 ]><a/>
12573 @@@test:domTree:
12574 document {
12575 document-type {
12576 general-entity {
12577 node-name: 'e';
12578 public-id: 'p q';
12579 system-id: 's';
12580 }
12581 }
12582 element { }
12583 }
12584 @@XMLTest:
12585 @@@QName: xp.ENTITY.pubid.4.test
12586 @@@DEnt:
12587 @@@@test:value:
12588 <!DOCTYPE a [
12589 <!ENTITY e PUBLIC " p $u000D$u000Aq" "s">
12590 ]><a/>
12591 @@@test:domTree:
12592 document {
12593 document-type {
12594 general-entity {
12595 node-name: 'e';
12596 public-id: 'p q';
12597 system-id: 's';
12598 }
12599 }
12600 element { }
12601 }
12602 @@XMLTest:
12603 @@@QName: xp.ENTITY.pubid.5.test
12604 @@@DEnt:
12605 @@@@test:value:
12606 <?xml version="1.1"?>
12607 <!DOCTYPE a [
12608 <!ENTITY e PUBLIC " p $u000D$u0085q" "s">
12609 ]><a/>
12610 @@@test:domTree:
12611 document {
12612 document-type {
12613 general-entity {
12614 node-name: 'e';
12615 public-id: 'p q';
12616 system-id: 's';
12617 }
12618 }
12619 element { }
12620 }
12621
12622 @@XMLTest:
12623 @@@QName: xp.ENTITY.ignored.test
12624 @@@DEnt:
12625 @@@@test:value:
12626 <!DOCTYPE a [
12627 <!ENTITY e "a">
12628 <!ENTITY e "b">
12629 ]><a/>
12630 @@@test:domTree:
12631 document {
12632 document-type {
12633 general-entity {
12634 node-name: 'e';
12635 text-content: 'a';
12636 }
12637 }
12638 element { }
12639 }
12640 @@@c:erred:
12641 <[[xp|warning-entity-declaration-ignored]]> { (3, 1)..(3, 15); }
12642 @@XMLTest:
12643 @@@QName: xp.ENTITY.ignored.2.test
12644 @@@DEnt:
12645 @@@@test:value:
12646 <!DOCTYPE a [
12647 <!ENTITY % e "a">
12648 <!ENTITY % e "b">
12649 ]><a/>
12650 @@@test:domTree:
12651 document { }
12652 @@@c:erred:
12653 <[[xp|warning-entity-declaration-ignored]]> { (3, 1)..(3, 17); }
12654
12655 @@XMLTest:
12656 @@@QName: xp.ENTITY.predefined.1.test
12657 @@@DEnt:
12658 @@@@test:value:
12659 <!DOCTYPE a [
12660 <!ENTITY lt "&#38;#60;">
12661 <!ENTITY gt "&#62;">
12662 <!ENTITY amp "&#38;#38;">
12663 <!ENTITY apos "&#39;">
12664 <!ENTITY quot "&#34;">
12665 <!ENTITY e "f">
12666 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12667 @@@test:domTree:
12668 document {
12669 document-type {
12670 general-entity {
12671 node-name: 'e';
12672 text-content: 'f';
12673 }
12674 }
12675 element {
12676 text-content: '<>&' U+0027 '"';
12677 }
12678 }
12679 @@XMLTest:
12680 @@@QName: xp.ENTITY.predefined.2.test
12681 @@@DEnt:
12682 @@@@test:value:
12683 <!DOCTYPE a [
12684 <!ENTITY lt "&#38;#60;">
12685 <!ENTITY gt "&#x26;#62;">
12686 <!ENTITY amp "&#38;#38;">
12687 <!ENTITY apos "&#x26;#39;">
12688 <!ENTITY quot "&#x26;#34;">
12689 <!ENTITY e "f">
12690 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12691 @@@test:domTree:
12692 document {
12693 document-type {
12694 general-entity {
12695 node-name: 'e';
12696 text-content: 'f';
12697 }
12698 }
12699 element {
12700 text-content: '<>&' U+0027 '"';
12701 }
12702 }
12703 @@XMLTest:
12704 @@@QName: xp.ENTITY.predefined.3.test
12705 @@@DEnt:
12706 @@@@test:value:
12707 <!DOCTYPE a [
12708 <!ENTITY lt "&#60;">
12709 <!ENTITY gt "&#62;">
12710 <!ENTITY amp "&#38;">
12711 <!ENTITY apos "&#39;">
12712 <!ENTITY quot "&#34;">
12713 <!ENTITY e "f">
12714 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12715 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (2, 1)..(2, 24); }
12716 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (4, 1)..(4, 24); }
12717 @@@test:domTree:
12718 document {
12719 document-type {
12720 general-entity {
12721 node-name: 'e';
12722 text-content: 'f';
12723 }
12724 }
12725 element {
12726 text-content: '<>&' U+0027 '"';
12727 }
12728 }
12729 @@XMLTest:
12730 @@@QName: xp.ENTITY.predefined.4.test
12731 @@@DEnt:
12732 @@@@test:value:
12733 <!DOCTYPE a [
12734 <!ENTITY lt "1">
12735 <!ENTITY gt "2">
12736 <!ENTITY amp "3">
12737 <!ENTITY apos "4">
12738 <!ENTITY quot "5">
12739 <!ENTITY e "f">
12740 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12741 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (2, 1)..(2, 24); }
12742 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (3, 1)..(3, 24); }
12743 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (4, 1)..(4, 24); }
12744 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (5, 1)..(5, 24); }
12745 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (6, 1)..(6, 24); }
12746 @@@test:domTree:
12747 document {
12748 document-type {
12749 general-entity {
12750 node-name: 'e';
12751 text-content: 'f';
12752 }
12753 }
12754 element {
12755 text-content: '<>&' U+0027 '"';
12756 }
12757 }
12758 @@XMLTest:
12759 @@@QName: xp.ENTITY.predefined.5.test
12760 @@@DEnt:
12761 @@@@test:value:
12762 <!DOCTYPE a [
12763 <!ENTITY lt SYSTEM "1">
12764 <!ENTITY gt SYSTEM "2">
12765 <!ENTITY amp SYSTEM "3">
12766 <!ENTITY apos SYSTEM "4">
12767 <!ENTITY quot SYSTEM "5">
12768 <!ENTITY e "f">
12769 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12770 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (2, 1)..(2, 27); }
12771 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (3, 1)..(3, 27); }
12772 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (4, 1)..(4, 27); }
12773 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (5, 1)..(5, 27); }
12774 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (6, 1)..(6, 27); }
12775 @@@test:domTree:
12776 document {
12777 document-type {
12778 general-entity {
12779 node-name: 'e';
12780 text-content: 'f';
12781 }
12782 }
12783 element {
12784 text-content: '<>&' U+0027 '"';
12785 }
12786 }
12787 @@XMLTest:
12788 @@@QName: xp.ENTITY.predefined.6.test
12789 @@@DEnt:
12790 @@@@test:value:
12791 <!DOCTYPE a [
12792 <!ENTITY % lt SYSTEM "1">
12793 <!ENTITY % gt SYSTEM "2">
12794 <!ENTITY % amp SYSTEM "3">
12795 <!ENTITY % apos SYSTEM "4">
12796 <!ENTITY % quot SYSTEM "5">
12797 <!ENTITY e "f">
12798 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12799 @@@test:domTree:
12800 document {
12801 document-type {
12802 general-entity {
12803 node-name: 'e';
12804 text-content: 'f';
12805 }
12806 }
12807 element {
12808 text-content: '<>&' U+0027 '"';
12809 }
12810 }
12811 @@XMLTest:
12812 @@@QName: xp.ENTITY.predefined.7.test
12813 @@@DEnt:
12814 @@@@test:value:
12815 <!DOCTYPE a [
12816 <!ENTITY lt "&#38;#x3C;">
12817 <!ENTITY gt "&#x3E;">
12818 <!ENTITY amp "&#38;#x26;">
12819 <!ENTITY apos "&#x27;">
12820 <!ENTITY quot "&#x22;">
12821 <!ENTITY e "f">
12822 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12823 @@@test:domTree:
12824 document {
12825 document-type {
12826 general-entity {
12827 node-name: 'e';
12828 text-content: 'f';
12829 }
12830 }
12831 element {
12832 text-content: '<>&' U+0027 '"';
12833 }
12834 }
12835 @@XMLTest:
12836 @@@QName: xp.ENTITY.predefined.8.test
12837 @@@DEnt:
12838 @@@@test:value:
12839 <!DOCTYPE a [
12840 <!ENTITY lt "&#38;#x3c;">
12841 <!ENTITY gt "&#x3e;">
12842 <!ENTITY amp "&#38;#x26;">
12843 <!ENTITY apos "&#x27;">
12844 <!ENTITY quot "&#x22;">
12845 <!ENTITY e "f">
12846 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12847 @@@test:domTree:
12848 document {
12849 document-type {
12850 general-entity {
12851 node-name: 'e';
12852 text-content: 'f';
12853 }
12854 }
12855 element {
12856 text-content: '<>&' U+0027 '"';
12857 }
12858 }
12859 @@XMLTest:
12860 @@@QName: xp.ENTITY.predefined.9.test
12861 @@@DEnt:
12862 @@@@test:value:
12863 <!DOCTYPE a [
12864 <!ENTITY lt "&#38;#x00003C;">
12865 <!ENTITY gt "&#x0003E;">
12866 <!ENTITY amp "&#38;#x026;">
12867 <!ENTITY apos "&#x000027;">
12868 <!ENTITY quot "&#x0022;">
12869 <!ENTITY e "f">
12870 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12871 @@@test:domTree:
12872 document {
12873 document-type {
12874 general-entity {
12875 node-name: 'e';
12876 text-content: 'f';
12877 }
12878 }
12879 element {
12880 text-content: '<>&' U+0027 '"';
12881 }
12882 }
12883 @@XMLTest:
12884 @@@QName: xp.ENTITY.predefined.10.test
12885 @@@DEnt:
12886 @@@@test:value:
12887 <!DOCTYPE a [
12888 <!ENTITY lt "&#38;#00060;">
12889 <!ENTITY gt "&#062;">
12890 <!ENTITY amp "&#38;#000038;">
12891 <!ENTITY apos "&#0000039;">
12892 <!ENTITY quot "&#0034;">
12893 <!ENTITY e "f">
12894 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12895 @@@test:domTree:
12896 document {
12897 document-type {
12898 general-entity {
12899 node-name: 'e';
12900 text-content: 'f';
12901 }
12902 }
12903 element {
12904 text-content: '<>&' U+0027 '"';
12905 }
12906 }
12907
12908 @@XMLTest:
12909 @@@QName: xp.processed.1.test
12910 @@@DEnt:
12911 @@@@test:value:
12912 <a/>
12913 @@@test:domTree:
12914 document {
12915 all-declarations-processed: true;
12916 element { }
12917 }
12918 @@XMLTest:
12919 @@@QName: xp.processed.2.test
12920 @@@DEnt:
12921 @@@@test:value:
12922 <!DOCTYPE a [
12923 <!ENTITY e "f">
12924 <!ATTLIST a b NMTOKEN " c ">
12925 ]><a>&e;</a>
12926 @@@test:domTree:
12927 document {
12928 document-type {
12929 general-entity {
12930 node-name: 'e';
12931 }
12932 element-type-definition {
12933 node-name: 'a';
12934 attribute-definition {
12935 node-name: 'b';
12936 }
12937 }
12938 }
12939 all-declarations-processed: true;
12940 element {
12941 attribute {
12942 node-name: 'b';
12943 node-value: 'c';
12944 }
12945 text-content: 'f';
12946 }
12947 }
12948 @@XMLTest:
12949 @@@QName: xp.processed.3.test
12950 @@@DEnt:
12951 @@@@test:value:
12952 <!DOCTYPE a [
12953 <!ENTITY % p SYSTEM "p">
12954 %p;
12955 <!ENTITY e "f">
12956 <!ATTLIST a b NMTOKEN " c ">
12957 ]><a d="e">&e;</a>
12958 @@@test:domTree:
12959 document {
12960 document-type { }
12961 all-declarations-processed: false;
12962 element {
12963 attribute {
12964 node-name: 'd';
12965 node-value: 'e';
12966 }
12967 general-entity-reference {
12968 node-name: 'e';
12969 is-expanded: false;
12970 }
12971 }
12972 }
12973 @@@c:erred:
12974 <[[xp|warning-entity-declaration-not-processed]]> { (4, 1)..(4, 20); }
12975 @@@c:erred:
12976 <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 31); }
12977 @@XMLTest:
12978 @@@QName: xp.processed.4.test
12979 @@@DEnt:
12980 @@@@test:value:
12981 <?xml version="1.1" standalone="yes"?>
12982 <!DOCTYPE a [
12983 <!ENTITY % p SYSTEM "p">
12984 %p;
12985 <!ENTITY e "f">
12986 <!ATTLIST a b NMTOKEN " c ">
12987 ]><a>&e;</a>
12988 @@@test:domTree:
12989 document {
12990 document-type {
12991 general-entity {
12992 node-name: 'e';
12993 }
12994 element-type-definition {
12995 node-name: 'a';
12996 attribute-definition {
12997 node-name: 'b';
12998 }
12999 }
13000 }
13001 all-declarations-processed: false;
13002 element {
13003 attribute {
13004 node-name: 'b';
13005 node-value: 'c';
13006 }
13007 text-content: 'f';
13008 }
13009 }
13010 @@XMLTest:
13011 @@@QName: xp.processed.5.test
13012 @@@DEnt:
13013 @@@@test:value:
13014 <!DOCTYPE a SYSTEM "p" [
13015 <!ENTITY e "f">
13016 <!ATTLIST a b NMTOKEN " c ">
13017 ]><a>&e;</a>
13018 @@@test:domTree:
13019 document {
13020 document-type {
13021 general-entity {
13022 node-name: 'e';
13023 }
13024 element-type-definition {
13025 node-name: 'a';
13026 attribute-definition {
13027 node-name: 'b';
13028 }
13029 }
13030 }
13031 all-declarations-processed: false;
13032 element {
13033 attribute {
13034 node-name: 'b';
13035 node-value: 'c';
13036 }
13037 text-content: 'f';
13038 }
13039 }
13040
13041 @@XMLTest:
13042 @@@QName: xp.PEs.in.internal.subset.1.test
13043 @@@DEnt:
13044 @@@@test:value:
13045 <!DOCTYPE a [
13046 <!ENTITY % p " ">
13047 <!ENTITY % q "%p;">
13048 ]><a/>
13049 @@@c:erred: <[[xp|wf-pes-in-internal-subset]]> { (3, 15)..(3, 17); }
13050 @@XMLTest:
13051 @@@QName: xp.PEs.in.internal.subset.2.test
13052 @@@DEnt:
13053 @@@@test:value:
13054 <!DOCTYPE a [
13055 <!ENTITY % p " ">
13056 <!ENTITY % q '%p;'>
13057 ]><a/>
13058 @@@c:erred: <[[xp|wf-pes-in-internal-subset]]> { (3, 15)..(3, 17); }
13059
13060 @@XMLTest:
13061 @@@QName: xp.name.pitarget.content.1.0.2.test
13062 @@@DEnt:
13063 @@@@test:value:
13064 <?xml version="1.0"?>
13065 <p>
13066 <?$u3001$u3002?>
13067 </p>
13068 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13069 @@XMLTest:
13070 @@@QName: xp.name.pitarget.content.1.1.2.test
13071 @@@DEnt:
13072 @@@@test:value:
13073 <?xml version="1.1"?>
13074 <p>$
13075 <?$u3001$u3002?>$
13076 </p>
13077 @@@test:domTree:
13078 document {
13079 xml-version: '1.1';
13080 element {
13081 pi {
13082 node-name: U+3001 U+3002;
13083 }
13084 }
13085 }
13086 @@XMLTest:
13087 @@@QName: xp.name.pitarget.content.1.0.3.test
13088 @@@DEnt:
13089 @@@@test:value:
13090 <?xml version="1.0"?>
13091 <p>
13092 <?$u3005b?>
13093 </p>
13094 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13095 @@XMLTest:
13096 @@@QName: xp.name.pitarget.content.1.1.3.test
13097 @@@DEnt:
13098 @@@@test:value:
13099 <?xml version="1.1"?>
13100 <p>$
13101 <?$u3005b?>$
13102 </p>
13103 @@@test:domTree:
13104 document {
13105 xml-version: '1.1';
13106 element {
13107 pi {
13108 node-name: U+3005 'b';
13109 }
13110 }
13111 }
13112 @@XMLTest:
13113 @@@QName: xp.name.pitarget.content.names.1.0.1.test
13114 @@@DEnt:
13115 @@@@test:value:
13116 <?xml version="1.0"?>
13117 <p>
13118 <?a:b?>
13119 </p>
13120 @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13121 @@XMLTest:
13122 @@@QName: xp.name.pitarget.content.names.1.1.1.test
13123 @@@DEnt:
13124 @@@@test:value:
13125 <?xml version="1.1"?>
13126 <p>
13127 <?a:b?>
13128 </p>
13129 @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13130 @@XMLTest:
13131 @@@QName: xp.name.pitarget.intsubset.1.0.2.test
13132 @@@DEnt:
13133 @@@@test:value:
13134 <?xml version="1.0"?>
13135 <!DOCTYPE p [
13136 <?$u3001$u3002?>
13137 ]><p/>
13138 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13139 @@XMLTest:
13140 @@@QName: xp.name.pitarget.intsubset.1.1.2.test
13141 @@@DEnt:
13142 @@@@test:value:
13143 <?xml version="1.1"?>
13144 <!DOCTYPE p [
13145 <?$u3001$u3002?>
13146 ]><p/>
13147 @@@test:domTree:
13148 document {
13149 xml-version: '1.1';
13150 document-type {
13151 pi {
13152 node-name: U+3001 U+3002;
13153 }
13154 }
13155 element { }
13156 }
13157 @@XMLTest:
13158 @@@QName: xp.name.pitarget.intsubset.1.0.3.test
13159 @@@DEnt:
13160 @@@@test:value:
13161 <?xml version="1.0"?>
13162 <!DOCTYPE p [
13163 <?$u3005b?>
13164 ]><p/>
13165 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13166 @@XMLTest:
13167 @@@QName: xp.name.pitarget.intsubset.1.1.3.test
13168 @@@DEnt:
13169 @@@@test:value:
13170 <?xml version="1.1"?>
13171 <!DOCTYPE p [
13172 <?$u3005b?>
13173 ]><p/>
13174 @@@test:domTree:
13175 document {
13176 xml-version: '1.1';
13177 document-type {
13178 pi {
13179 node-name: U+3005 'b';
13180 }
13181 }
13182 element { }
13183 }
13184 @@XMLTest:
13185 @@@QName: xp.name.pitarget.intsubset.names.1.0.1.test
13186 @@@DEnt:
13187 @@@@test:value:
13188 <?xml version="1.0"?>
13189 <!DOCTYPE p [
13190 <?a:b?>
13191 ]><p/>
13192 @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13193 @@XMLTest:
13194 @@@QName: xp.name.pitarget.intsubset.names.1.1.1.test
13195 @@@DEnt:
13196 @@@@test:value:
13197 <?xml version="1.1"?>
13198 <!DOCTYPE p [
13199 <?a:b?>
13200 ]><p/>
13201 @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13202 @@XMLTest:
13203 @@@QName: xp.name.doctypedecl.stag.etag.1.0.2.test
13204 @@@DEnt:
13205 @@@@test:value:
13206 <?xml version="1.0"?>
13207 <!DOCTYPE $u3001$u3002>
13208 <$u3001$u3002>
13209 </$u3001$u3002>
13210 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 11)..(2, 12); }
13211 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 2)..(3, 3); }
13212 # @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 3)..(4, 4); }
13213 @@XMLTest:
13214 @@@QName: xp.name.doctypedecl.stag.etag.1.1.2.test
13215 @@@DEnt:
13216 @@@@test:value:
13217 <?xml version="1.1"?>
13218 <!DOCTYPE $u3001$u3002>
13219 <$u3001$u3002>
13220 </$u3001$u3002>
13221 @@@test:domTree:
13222 document {
13223 xml-version: '1.1';
13224 document-type {
13225 node-name: U+3001 U+3002;
13226 }
13227 element {
13228 node-name: U+3001 U+3002;
13229 }
13230 }
13231 @@XMLTest:
13232 @@@QName: xp.name.doctypedecl.stag.etag.1.0.3.test
13233 @@@DEnt:
13234 @@@@test:value:
13235 <?xml version="1.0"?>
13236 <!DOCTYPE $u3005b>
13237 <$u3005b>
13238 </$u3005b>
13239 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 11)..(2, 12); }
13240 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 2)..(3, 3); }
13241 # @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 3)..(4, 4); }
13242 @@XMLTest:
13243 @@@QName: xp.name.doctype.decl.stag.etag.1.1.3.test
13244 @@@DEnt:
13245 @@@@test:value:
13246 <?xml version="1.1"?>
13247 <!DOCTYPE $u3005b>
13248 <$u3005b>
13249 </$u3005b>
13250 @@@test:domTree:
13251 document {
13252 xml-version: '1.1';
13253 document-type {
13254 node-name: U+3005 'b';
13255 }
13256 element {
13257 node-name: U+3005 'b';
13258 }
13259 }
13260 @@XMLTest:
13261 @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.1.test
13262 @@@DEnt:
13263 @@@@test:value:
13264 <?xml version="1.0"?>
13265 <!DOCTYPE a:b>
13266 <a:b xmlns:a="http://a.example/">
13267 </a:b>
13268 @@@test:domTree:
13269 document {
13270 xml-version: '1.0';
13271 document-type {
13272 node-name: 'a:b';
13273 }
13274 element {
13275 prefix: 'a';
13276 local-name: 'b';
13277 namespace-uri: 'http://a.example/';
13278 attribute {
13279 namespace-uri: 'http://www.w3.org/2000/xmlns/';
13280 prefix: 'xmlns';
13281 local-name: 'a';
13282 value: 'http://a.example/';
13283 specified: true;
13284 }
13285 }
13286 }
13287 @@XMLTest:
13288 @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.1.test
13289 @@@DEnt:
13290 @@@@test:value:
13291 <?xml version="1.1"?>
13292 <!DOCTYPE a:b>
13293 <a:b xmlns:a="http://a.example/">
13294 </a:b>
13295 @@@test:domTree:
13296 document {
13297 xml-version: '1.1';
13298 document-type {
13299 node-name: 'a:b';
13300 }
13301 element {
13302 prefix: 'a';
13303 local-name: 'b';
13304 namespace-uri: 'http://a.example/';
13305 attribute {
13306 namespace-uri: 'http://www.w3.org/2000/xmlns/';
13307 prefix: 'xmlns';
13308 local-name: 'a';
13309 specified: true;
13310 }
13311 }
13312 }
13313 @@XMLTest:
13314 @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.2.test
13315 @@@DEnt:
13316 @@@@test:value:
13317 <?xml version="1.0"?>
13318 <!DOCTYPE :ab>
13319 <:ab>
13320 </:ab>
13321 @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13322 @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13323 @@@c:erred: <[[xp|nsc-prefix-declared]]> { /* prefix || */ }
13324 @@XMLTest:
13325 @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.2.test
13326 @@@DEnt:
13327 @@@@test:value:
13328 <?xml version="1.1"?>
13329 <!DOCTYPE :ab>
13330 <:ab>
13331 </:ab>
13332 @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13333 @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13334 @@@c:erred: <[[xp|nsc-prefix-declared]]> { /* prefix || */ }
13335 @@XMLTest:
13336 @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.3.test
13337 @@@DEnt:
13338 @@@@test:value:
13339 <?xml version="1.0"?>
13340 <!DOCTYPE a:$u3005>
13341 <a:$u3005 xmlns:a="http://a.example/">
13342 </a:$u3005>
13343 @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13344 @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13345 @@XMLTest:
13346 @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.3.test
13347 @@@DEnt:
13348 @@@@test:value:
13349 <?xml version="1.1"?>
13350 <!DOCTYPE a:$u3005>
13351 <a:$u3005 xmlns:a="http://a.example/">
13352 </a:$u3005>
13353 @@@test:domTree:
13354 document {
13355 xml-version: '1.1';
13356 document-type {
13357 node-name: 'a:' U+3005;
13358 }
13359 element {
13360 prefix: 'a';
13361 local-name: U+3005;
13362 namespace-uri: 'http://a.example/';
13363 attribute {
13364 namespace-uri: 'http://www.w3.org/2000/xmlns/';
13365 prefix: 'xmlns';
13366 local-name: 'a';
13367 value: 'http://a.example/';
13368 specified: true;
13369 }
13370 }
13371 }
13372 @@XMLTest:
13373 @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.4.test
13374 @@@DEnt:
13375 @@@@test:value:
13376 <?xml version="1.0"?>
13377 <!DOCTYPE a:b>
13378 <a:b>
13379 </a:b>
13380 @@@c:erred: <[[xp|nsc-prefix-declared]]> { (3, 1)..(3, 5); }
13381 @@XMLTest:
13382 @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.4.test
13383 @@@DEnt:
13384 @@@@test:value:
13385 <?xml version="1.1"?>
13386 <!DOCTYPE a:b>
13387 <a:b>
13388 </a:b>
13389 @@@c:erred: <[[xp|nsc-prefix-declared]]> { (3, 1)..(3, 5); }
13390 @@XMLTest:
13391 @@@QName: xp.name.emptyelemtag.1.0.2.test
13392 @@@DEnt:
13393 @@@@test:value:
13394 <?xml version="1.0"?>
13395 <$u3001$u3002/>
13396 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 2)..(2, 3); }
13397 @@XMLTest:
13398 @@@QName: xp.name.emptyelemtag.1.1.2.test
13399 @@@DEnt:
13400 @@@@test:value:
13401 <?xml version="1.1"?>
13402 <$u3001$u3002/>
13403 @@@test:domTree:
13404 document {
13405 xml-version: '1.1';
13406 element {
13407 node-name: U+3001 U+3002;
13408 }
13409 }
13410 @@XMLTest:
13411 @@@QName: xp.name.emptyelemtag.1.0.3.test
13412 @@@DEnt:
13413 @@@@test:value:
13414 <?xml version="1.0"?>
13415 <$u3005b/>
13416 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 2)..(2, 3); }
13417 @@XMLTest:
13418 @@@QName: xp.name.emptyelemtag.1.1.3.test
13419 @@@DEnt:
13420 @@@@test:value:
13421 <?xml version="1.1"?>
13422 <$u3005b/>
13423 @@@test:domTree:
13424 document {
13425 xml-version: '1.1';
13426 element {
13427 node-name: U+3005 'b';
13428 }
13429 }
13430 @@XMLTest:
13431 @@@QName: xp.name.emptyelemtag.names.1.0.1.test
13432 @@@DEnt:
13433 @@@@test:value:
13434 <?xml version="1.0"?>
13435 <a:b/>
13436 @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 6); }
13437 @@XMLTest:
13438 @@@QName: xp.name.emptyelemtag.names.1.1.1.test
13439 @@@DEnt:
13440 @@@@test:value:
13441 <?xml version="1.1"?>
13442 <a:b/>
13443 @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 6); }
13444 @@XMLTest:
13445 @@@QName: xp.name.attr.1.0.2.test
13446 @@@DEnt:
13447 @@@@test:value:
13448 <?xml version="1.0"?>
13449 <a $u3001$u3002=""/>
13450 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 4)..(2, 5); }
13451 @@XMLTest:
13452 @@@QName: xp.name.attr.1.1.2.test
13453 @@@DEnt:
13454 @@@@test:value:
13455 <?xml version="1.1"?>
13456 <a $u3001$u3002=""/>
13457 @@@test:domTree:
13458 document {
13459 xml-version: '1.1';
13460 element {
13461 attribute {
13462 node-name: U+3001 U+3002;
13463 }
13464 }
13465 }
13466 @@XMLTest:
13467 @@@QName: xp.name.attr.1.0.3.test
13468 @@@DEnt:
13469 @@@@test:value:
13470 <?xml version="1.0"?>
13471 <a $u3005b=""/>
13472 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 4)..(2, 5); }
13473 @@XMLTest:
13474 @@@QName: xp.name.attr.1.1.3.test
13475 @@@DEnt:
13476 @@@@test:value:
13477 <?xml version="1.1"?>
13478 <a $u3005b=""/>
13479 @@@test:domTree:
13480 document {
13481 xml-version: '1.1';
13482 element {
13483 attribute {
13484 node-name: U+3005 'b';
13485 }
13486 }
13487 }
13488 @@XMLTest:
13489 @@@QName: xp.name.attr.names.1.0.1.test
13490 @@@DEnt:
13491 @@@@test:value:
13492 <?xml version="1.0"?>
13493 <a a:b=""/>
13494 @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 11); }
13495 @@XMLTest:
13496 @@@QName: xp.name.attr.names.1.1.1.test
13497 @@@DEnt:
13498 @@@@test:value:
13499 <?xml version="1.1"?>
13500 <a a:b=""/>
13501 @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 11); }
13502 @@XMLTest:
13503 @@@QName: xp.name.attr.names.1.0.2.test
13504 @@@DEnt:
13505 @@@@test:value:
13506 <?xml version="1.0"?>
13507 <a :ab=""/>
13508 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (2, 4)..(2, 6); }
13509 @@@c:erred: <[[xp|nsc-prefix-declared]]> { }
13510 @@XMLTest:
13511 @@@QName: xp.name.attr.names.1.1.2.test
13512 @@@DEnt:
13513 @@@@test:value:
13514 <?xml version="1.1"?>
13515 <a :ab=""/>
13516 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (2, 4)..(2, 6); }
13517 @@@c:erred: <[[xp|nsc-prefix-declared]]> { }
13518 @@XMLTest:
13519 @@@QName: xp.name.attlist.1.0.2.test
13520 @@@DEnt:
13521 @@@@test:value:
13522 <?xml version="1.0"?>
13523 <!DOCTYPE p [
13524 <!NOTATION $u3001$u3002 SYSTEM "n">
13525 <!ATTLIST $u3001$u3002
13526 $u3001$u3002
13527 NOTATION
13528 ($u3001$u3002)
13529 #IMPLIED>
13530 ]><p/>
13531 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13532 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 11)..(4, 12); }
13533 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 1)..(5, 2); }
13534 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (7, 2)..(7, 3); }
13535 @@XMLTest:
13536 @@@QName: xp.name.attlist.1.1.2.test
13537 @@@DEnt:
13538 @@@@test:value:
13539 <?xml version="1.1"?>
13540 <!DOCTYPE p [
13541 <!NOTATION $u3001$u3002 SYSTEM "n">
13542 <!ATTLIST $u3001$u3002
13543 $u3001$u3002
13544 NOTATION
13545 ($u3001$u3002)
13546 #IMPLIED>
13547 ]><p/>
13548 @@@test:domTree:
13549 document {
13550 xml-version: '1.1';
13551 document-type {
13552 notation {
13553 node-name: U+3001 U+3002;
13554 }
13555 element-type-definition {
13556 node-name: U+3001 U+3002;
13557 attribute-definition {
13558 node-name: U+3001 U+3002;
13559 allowed-tokens: DOMStringList (U+3001 U+3002);
13560 }
13561 }
13562 }
13563 element { }
13564 }
13565 @@XMLTest:
13566 @@@QName: xp.name.attlist.1.0.3.test
13567 @@@DEnt:
13568 @@@@test:value:
13569 <?xml version="1.0"?>
13570 <!DOCTYPE p [
13571 <!NOTATION $u3005b SYSTEM "n">
13572 <!ATTLIST $u3005b
13573 $u3005b
13574 NOTATION
13575 ($u3005b)
13576 #IMPLIED>
13577 ]><p/>
13578 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13579 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 11)..(4, 12); }
13580 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 1)..(5, 2); }
13581 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (7, 2)..(7, 3); }
13582 @@XMLTest:
13583 @@@QName: xp.name.attlist.1.1.3.test
13584 @@@DEnt:
13585 @@@@test:value:
13586 <?xml version="1.1"?>
13587 <!DOCTYPE p [
13588 <!NOTATION $u3005b SYSTEM "n">
13589 <!ATTLIST $u3005b
13590 $u3005b
13591 NOTATION
13592 ($u3005b)
13593 #IMPLIED>
13594 ]><p/>
13595 @@@test:domTree:
13596 document {
13597 xml-version: '1.1';
13598 document-type {
13599 notation {
13600 node-name: U+3005 'b';
13601 }
13602 element-type-definition {
13603 node-name: U+3005 'b';
13604 attribute-definition {
13605 node-name: U+3005 'b';
13606 allowed-tokens: DOMStringList (U+3005 'b');
13607 }
13608 }
13609 }
13610 element { }
13611 }
13612 @@XMLTest:
13613 @@@QName: xp.name.attlist.names.1.0.1.test
13614 @@@DEnt:
13615 @@@@test:value:
13616 <?xml version="1.0"?>
13617 <!DOCTYPE p [
13618 <!NOTATION a:b SYSTEM "n">
13619 <!ATTLIST a:b
13620 a:b
13621 NOTATION
13622 (a:b)
13623 #IMPLIED>
13624 ]><p/>
13625 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13626 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13627 @@XMLTest:
13628 @@@QName: xp.name.attlist.names.1.1.1.test
13629 @@@DEnt:
13630 @@@@test:value:
13631 <?xml version="1.1"?>
13632 <!DOCTYPE p [
13633 <!NOTATION a:b SYSTEM "n">
13634 <!ATTLIST a:b
13635 a:b
13636 NOTATION
13637 (a:b)
13638 #IMPLIED>
13639 ]><p/>
13640 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13641 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13642 @@XMLTest:
13643 @@@QName: xp.name.attlist.names.1.0.2.test
13644 @@@DEnt:
13645 @@@@test:value:
13646 <?xml version="1.0"?>
13647 <!DOCTYPE p [
13648 <!NOTATION :ab SYSTEM "n">
13649 <!ATTLIST :ab
13650 :ab
13651 NOTATION
13652 (:ab)
13653 #IMPLIED>
13654 ]><p/>
13655 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13656 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (4, 11)..(4, 13); }
13657 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (5, 1)..(5, 3); }
13658 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13659 @@XMLTest:
13660 @@@QName: xp.name.attlist.names.1.1.2.test
13661 @@@DEnt:
13662 @@@@test:value:
13663 <?xml version="1.1"?>
13664 <!DOCTYPE p [
13665 <!NOTATION :ab SYSTEM "n">
13666 <!ATTLIST :ab
13667 :ab
13668 NOTATION
13669 (:ab)
13670 #IMPLIED>
13671 ]><p/>
13672 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13673 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (4, 11)..(4, 13); }
13674 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (5, 1)..(5, 3); }
13675 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13676 @@XMLTest:
13677 @@@QName: xp.name.gent.1.0.2.test
13678 @@@DEnt:
13679 @@@@test:value:
13680 <?xml version="1.0"?>
13681 <!DOCTYPE p [
13682 <!ENTITY $u3001$u3002 "n">
13683 ]>
13684 <p a="&$u3001$u3002;">
13685 &$u3001$u3002;
13686 </p>
13687 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 10)..(3, 11); }
13688 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 8)..(5, 9); }
13689 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (6, 2)..(6, 3); }
13690 @@XMLTest:
13691 @@@QName: xp.name.ger.1.1.2.test
13692 @@@DEnt:
13693 @@@@test:value:
13694 <?xml version="1.1"?>
13695 <!DOCTYPE p [
13696 <!ENTITY $u3001$u3002 "n">
13697 ]>
13698 <p a="&$u3001$u3002;">$
13699 &$u3001$u3002;$
13700 </p>
13701 @@@test:domTree:
13702 document {
13703 xml-version: '1.1';
13704 document-type {
13705 general-entity {
13706 node-name: U+3001 U+3002;
13707 }
13708 }
13709 element {
13710 attribute {
13711 node-name: 'a';
13712 general-entity-reference {
13713 node-name: U+3001 U+3002;
13714 }
13715 }
13716 general-entity-reference {
13717 node-name: U+3001 U+3002;
13718 }
13719 }
13720 }
13721 @@XMLTest:
13722 @@@QName: xp.name.ger.1.0.3.test
13723 @@@DEnt:
13724 @@@@test:value:
13725 <?xml version="1.0"?>
13726 <!DOCTYPE p [
13727 <!ENTITY $u3005b "n">
13728 ]>
13729 <p a="&$u3005b;">
13730 &$u3005b;
13731 </p>
13732 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 10)..(3, 11); }
13733 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 8)..(5, 9); }
13734 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (6, 2)..(6, 3); }
13735 @@XMLTest:
13736 @@@QName: xp.name.ger.1.1.3.test
13737 @@@DEnt:
13738 @@@@test:value:
13739 <?xml version="1.1"?>
13740 <!DOCTYPE p [
13741 <!ENTITY $u3005b "n">
13742 ]>
13743 <p a="&$u3005b;">$
13744 &$u3005b;$
13745 </p>
13746 @@@test:domTree:
13747 document {
13748 xml-version: '1.1';
13749 document-type {
13750 general-entity {
13751 node-name: U+3005 'b';
13752 }
13753 }
13754 element {
13755 attribute {
13756 node-name: 'a';
13757 general-entity-reference {
13758 node-name: U+3005 'b';
13759 }
13760 }
13761 general-entity-reference {
13762 node-name: U+3005 'b';
13763 }
13764 }
13765 }
13766 @@XMLTest:
13767 @@@QName: xp.name.ger.names.1.0.1.test
13768 @@@DEnt:
13769 @@@@test:value:
13770 <?xml version="1.0"?>
13771 <!DOCTYPE p [
13772 <!ENTITY a:b "n">
13773 ]>
13774 <p a="&a:b;">
13775 &a:b;
13776 </p>
13777 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 10)..(3, 12); }
13778 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (5, 8)..(5, 10); }
13779 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (6, 2)..(6, 4); }
13780 @@XMLTest:
13781 @@@QName: xp.name.ger.names.1.1.1.test
13782 @@@DEnt:
13783 @@@@test:value:
13784 <?xml version="1.1"?>
13785 <!DOCTYPE p [
13786 <!ENTITY a:b "n">
13787 ]>
13788 <p a="&a:b;">
13789 &a:b;
13790 </p>
13791 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 10)..(3, 12); }
13792 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (5, 8)..(5, 10); }
13793 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (6, 2)..(6, 4); }
13794 @@XMLTest:
13795 @@@QName: xp.name.ndata.1.0.2.test
13796 @@@DEnt:
13797 @@@@test:value:
13798 <?xml version="1.0"?>
13799 <!DOCTYPE p [
13800 <!NOTATION $u3001$u3002 SYSTEM "n">
13801 <!ENTITY e SYSTEM "s" NDATA $u3001$u3002>
13802 ]><p/>
13803 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13804 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 29)..(4, 30); }
13805 @@XMLTest:
13806 @@@QName: xp.name.ndata.1.1.2.test
13807 @@@DEnt:
13808 @@@@test:value:
13809 <?xml version="1.1"?>
13810 <!DOCTYPE p [
13811 <!NOTATION $u3001$u3002 SYSTEM "n">
13812 <!ENTITY e SYSTEM "s" NDATA $u3001$u3002>
13813 ]><p/>
13814 @@@test:domTree:
13815 document {
13816 xml-version: '1.1';
13817 document-type {
13818 notation {
13819 node-name: U+3001 U+3002;
13820 }
13821 general-entity {
13822 node-name: 'e';
13823 notation-name: U+3001 U+3002;
13824 }
13825 }
13826 element { }
13827 }
13828 @@XMLTest:
13829 @@@QName: xp.name.ndata.1.0.3.test
13830 @@@DEnt:
13831 @@@@test:value:
13832 <?xml version="1.0"?>
13833 <!DOCTYPE p [
13834 <!NOTATION $u3005b SYSTEM "n">
13835 <!ENTITY e SYSTEM "s" NDATA $u3005b>
13836 ]><p/>
13837 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13838 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 29)..(4, 30); }
13839 @@XMLTest:
13840 @@@QName: xp.name.ndata.1.1.3.test
13841 @@@DEnt:
13842 @@@@test:value:
13843 <?xml version="1.1"?>
13844 <!DOCTYPE p [
13845 <!NOTATION $u3005b SYSTEM "n">
13846 <!ENTITY e SYSTEM "s" NDATA $u3005b>
13847 ]><p/>
13848 @@@test:domTree:
13849 document {
13850 xml-version: '1.1';
13851 document-type {
13852 notation {
13853 node-name: U+3005 'b';
13854 }
13855 general-entity {
13856 node-name: 'e';
13857 notation-name: U+3005 'b';
13858 }
13859 }
13860 element { }
13861 }
13862 @@XMLTest:
13863 @@@QName: xp.name.ndata.names.1.0.1.test
13864 @@@DEnt:
13865 @@@@test:value:
13866 <?xml version="1.0"?>
13867 <!DOCTYPE p [
13868 <!NOTATION a:b SYSTEM "n">
13869 <!ENTITY e SYSTEM "s" NDATA a:b>
13870 ]><p/>
13871 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13872 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (4, 29)..(4, 31); }
13873 @@XMLTest:
13874 @@@QName: xp.name.ndata.names.1.1.1.test
13875 @@@DEnt:
13876 @@@@test:value:
13877 <?xml version="1.1"?>
13878 <!DOCTYPE p [
13879 <!NOTATION a:b SYSTEM "n">
13880 <!ENTITY e SYSTEM "s" NDATA a:b>
13881 ]><p/>
13882 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13883 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (4, 29)..(4, 31); }
13884
13885 @@enImplNote:
13886 @@@ddid: wf-invalid-character-in-node-name
13887 @@@@:
13888 {ISSUE::
13889 {P:: Tests required for:
13890
13891 - <CODE::Name> in element type declaration
13892
13893 - <CODE::Name> in model group
13894
13895 - <CODE::Name> in parameter entity declaration
13896
13897 - <CODE::Name> in parameter entity reference
13898
13899 }
13900 }
13901
13902 @@XMLTest:
13903 @@@QName: xp.NOTATION.1.test
13904 @@@DEnt:
13905 @@@@test:value:
13906 <!DOCTYPE p [
13907 <!NOTATION n SYSTEM "m">
13908 ]><p/>
13909 @@@test:domTree:
13910 document {
13911 document-type {
13912 notation {
13913 node-name: 'n';
13914 public-id: null;
13915 system-id: 'm';
13916 }
13917 }
13918 element { }
13919 }
13920 @@XMLTest:
13921 @@@QName: xp.NOTATION.2.test
13922 @@@DEnt:
13923 @@@@test:value:
13924 <!DOCTYPE p [
13925 <!NOTATION n PUBLIC "m">
13926 ]><p/>
13927 @@@test:domTree:
13928 document {
13929 document-type {
13930 notation {
13931 node-name: 'n';
13932 system-id: null;
13933 public-id: 'm';
13934 }
13935 }
13936 element { }
13937 }
13938 @@XMLTest:
13939 @@@QName: xp.NOTATION.3.test
13940 @@@DEnt:
13941 @@@@test:value:
13942 <!DOCTYPE p [
13943 <!NOTATION n PUBLIC "m" "l">
13944 ]><p/>
13945 @@@test:domTree:
13946 document {
13947 document-type {
13948 notation {
13949 node-name: 'n';
13950 public-id: 'm';
13951 system-id: 'l';
13952 }
13953 }
13954 element { }
13955 }
13956 @@XMLTest:
13957 @@@QName: xp.NOTATION.4.test
13958 @@@DEnt:
13959 @@@@test:value:
13960 <!DOCTYPE p [
13961 <!NOTATION n SYSTEM "m">
13962 <!NOTATION n SYSTEM "l">
13963 ]><p/>
13964 @@@c:erred: <[[xp|vc-unique-notation-name]]> { (3, 1)..(3, 24); }
13965 @@@test:domTree:
13966 document {
13967 document-type {
13968 notation {
13969 node-name: 'n';
13970 system-id: 'm';
13971 }
13972 }
13973 element { }
13974 }
13975
13976 @@XMLTest:
13977 @@@QName: xp.names.1.test
13978 @@@DEnt:
13979 @@@@test:value:
13980 <p xmlns="http://1.example/" a="b"/>
13981 @@@test:domTree:
13982 document {
13983 element {
13984 prefix: null;
13985 local-name: 'p';
13986 namespace-uri: 'http://1.example/';
13987 attribute {
13988 prefix: null;
13989 local-name: 'xmlns';
13990 namespace-uri: 'http://www.w3.org/2000/xmlns/';
13991 specified: true;
13992 }
13993 attribute {
13994 prefix: null;
13995 local-name: 'a';
13996 specified: true;
13997 }
13998 }
13999 }
14000 @@XMLTest:
14001 @@@QName: xp.names.2.test
14002 @@@DEnt:
14003 @@@@test:value:
14004 <p xmlns:a="http://1.example/" a="b" a:a="c"/>
14005 @@@test:domTree:
14006 document {
14007 element {
14008 prefix: null;
14009 local-name: 'p';
14010 namespace-uri: null;
14011 attribute {
14012 prefix: 'xmlns';
14013 local-name: 'a';
14014 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14015 specified: true;
14016 }
14017 attribute {
14018 prefix: null;
14019 local-name: 'a';
14020 specified: true;
14021 }
14022 attribute {
14023 prefix: 'a';
14024 local-name: 'a';
14025 namespace-uri: 'http://1.example/';
14026 specified: true;
14027 }
14028 }
14029 }
14030 @@XMLTest:
14031 @@@QName: xp.names.3.test
14032 @@@DEnt:
14033 @@@@test:value:
14034 <a:p xmlns:a="http://1.example/" a="b" a:a="c"/>
14035 @@@test:domTree:
14036 document {
14037 element {
14038 prefix: 'a';
14039 local-name: 'p';
14040 namespace-uri: 'http://1.example/';
14041 attribute {
14042 prefix: 'xmlns';
14043 local-name: 'a';
14044 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14045 specified: true;
14046 }
14047 attribute {
14048 prefix: null;
14049 local-name: 'a';
14050 specified: true;
14051 }
14052 attribute {
14053 prefix: 'a';
14054 local-name: 'a';
14055 namespace-uri: 'http://1.example/';
14056 specified: true;
14057 }
14058 }
14059 }
14060 @@XMLTest:
14061 @@@QName: xp.names.5.test
14062 @@@DEnt:
14063 @@@@test:value:
14064 <p xmlns:a="http://1.example/">$
14065 <a:q/>$
14066 </p>
14067 @@@test:domTree:
14068 document {
14069 element {
14070 prefix: null;
14071 local-name: 'p';
14072 namespace-uri: null;
14073 attribute {
14074 prefix: 'xmlns';
14075 local-name: 'a';
14076 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14077 specified: true;
14078 }
14079 element {
14080 prefix: 'a';
14081 local-name: 'q';
14082 namespace-uri: 'http://1.example/';
14083 }
14084 }
14085 }
14086 @@XMLTest:
14087 @@@QName: xp.names.6.test
14088 @@@DEnt:
14089 @@@@test:value:
14090 <p xmlns:a="http://1.example/">$
14091 <q a:b="c"/>$
14092 </p>
14093 @@@test:domTree:
14094 document {
14095 element {
14096 prefix: null;
14097 local-name: 'p';
14098 namespace-uri: null;
14099 attribute {
14100 prefix: 'xmlns';
14101 local-name: 'a';
14102 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14103 specified: true;
14104 }
14105 element {
14106 prefix: null;
14107 local-name: 'q';
14108 namespace-uri: null;
14109 attribute {
14110 prefix: 'a';
14111 local-name: 'b';
14112 namespace-uri: 'http://1.example/';
14113 specified: true;
14114 }
14115 }
14116 }
14117 }
14118 @@XMLTest:
14119 @@@QName: xp.names.7.test
14120 @@@DEnt:
14121 @@@@test:value:
14122 <p xmlns:a="http://1.example/">$
14123 <q a:b="c" xmlns:a="http://2.example/"/>$
14124 </p>
14125 @@@test:domTree:
14126 document {
14127 element {
14128 prefix: null;
14129 local-name: 'p';
14130 namespace-uri: null;
14131 attribute {
14132 prefix: 'xmlns';
14133 local-name: 'a';
14134 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14135 specified: true;
14136 }
14137 element {
14138 prefix: null;
14139 local-name: 'q';
14140 namespace-uri: null;
14141 attribute {
14142 prefix: 'a';
14143 local-name: 'b';
14144 namespace-uri: 'http://2.example/';
14145 specified: true;
14146 }
14147 attribute {
14148 prefix: 'xmlns';
14149 local-name: 'a';
14150 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14151 specified: true;
14152 }
14153 }
14154 }
14155 }
14156
14157 @@XMLTest:
14158 @@@QName: xp.names.undeclare.1.test
14159 @@@DEnt:
14160 @@@@test:value:
14161 <p xmlns="http://1.example/">$
14162 <q xmlns="">$
14163 <r xmlns="http://2.example/"/>$
14164 </q>$
14165 </p>
14166 @@@test:domTree:
14167 document {
14168 element {
14169 prefix: null;
14170 local-name: 'p';
14171 namespace-uri: 'http://1.example/';
14172 attribute {
14173 prefix: null;
14174 local-name: 'xmlns';
14175 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14176 specified: true;
14177 }
14178 element {
14179 prefix: null;
14180 local-name: 'q';
14181 namespace-uri: null;
14182 attribute {
14183 prefix: null;
14184 local-name: 'xmlns';
14185 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14186 specified: true;
14187 }
14188 element {
14189 prefix: null;
14190 local-name: 'r';
14191 namespace-uri: 'http://2.example/';
14192 attribute {
14193 prefix: null;
14194 local-name: 'xmlns';
14195 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14196 specified: true;
14197 }
14198 }
14199 }
14200 }
14201 }
14202
14203 @@XMLTest:
14204 @@@QName: xp.names.undeclare.1.0.1.test
14205 @@@DEnt:
14206 @@@@test:value:
14207 <?xml version="1.0"?>
14208 <a:p xmlns:a="http://1.example/">$
14209 <q xmlns:a="">$
14210 <a:r xmlns:a="http://2.example/"/>$
14211 </q>$
14212 </a:p>
14213 @@@c:erred: <[[xp|nswf-empty-namespace-name]]> { (2, 34)..(2, 47); }
14214 @@XMLTest:
14215 @@@QName: xp.names.undeclare.1.1.1.test
14216 @@@DEnt:
14217 @@@@test:value:
14218 <?xml version="1.1"?>
14219 <a:p xmlns:a="http://1.example/">$
14220 <q xmlns:a="">$
14221 <a:r xmlns:a="http://2.example/"/>$
14222 </q>$
14223 </a:p>
14224 @@@test:domTree:
14225 document {
14226 element {
14227 prefix: 'a';
14228 local-name: 'p';
14229 namespace-uri: 'http://1.example/';
14230 attribute {
14231 prefix: 'xmlns';
14232 local-name: 'a';
14233 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14234 specified: true;
14235 }
14236 element {
14237 prefix: null;
14238 local-name: 'q';
14239 namespace-uri: null;
14240 attribute {
14241 prefix: 'xmlns';
14242 local-name: 'a';
14243 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14244 specified: true;
14245 }
14246 element {
14247 prefix: 'a';
14248 local-name: 'r';
14249 namespace-uri: 'http://2.example/';
14250 attribute {
14251 prefix: 'xmlns';
14252 local-name: 'a';
14253 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14254 specified: true;
14255 }
14256 }
14257 }
14258 }
14259 }
14260 @@XMLTest:
14261 @@@QName: xp.names.undeclare.1.1.2.test
14262 @@@DEnt:
14263 @@@@test:value:
14264 <?xml version="1.1"?>
14265 <a:p xmlns:a="http://1.example/">$
14266 <q xmlns:a="">$
14267 <a:r/>$
14268 </q>$
14269 </a:p>
14270 @@@c:erred: <[[xp|nsc-prefix-declared]]> { (2, 48)..(2, 53); }
14271
14272 @@XMLTest:
14273 @@@QName: xp.names.xml.prefix.1.test
14274 @@@DEnt:
14275 @@@@test:value:
14276 <a xmlns:xml="http://www.w3.org/XML/1998/namespace"/>
14277 @@@test:domTree:
14278 document {
14279 element {
14280 attribute {
14281 prefix: 'xmlns';
14282 local-name: 'xml';
14283 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14284 }
14285 }
14286 }
14287 @@XMLTest:
14288 @@@QName: xp.names.xml.prefix.2.test
14289 @@@DEnt:
14290 @@@@test:value:
14291 <a xmlns:xml="a"/>
14292 @@@c:erred: <[[xp|nsc-reserved-prefix-xml]]> { (1, 1)..(1, 18); }
14293 @@XMLTest:
14294 @@@QName: xp.names.xml.prefix.3.test
14295 @@@DEnt:
14296 @@@@test:value:
14297 <a xmlns:a="http://www.w3.org/XML/1998/namespace"
14298 />
14299 @@@c:erred: <[[xp|nsc-reserved-namespace-name-xml]]> { (1, 1)..(2, 2); }
14300 @@XMLTest:
14301 @@@QName: xp.names.xml.prefix.4.test
14302 @@@DEnt:
14303 @@@@test:value:
14304 <a xml:lang="ja"/>
14305 @@@test:domTree:
14306 document {
14307 element {
14308 attribute {
14309 prefix: 'xml';
14310 local-name: 'lang';
14311 namespace-uri: 'http://www.w3.org/XML/1998/namespace';
14312 }
14313 }
14314 }
14315
14316 @@XMLTest:
14317 @@@QName: xp.names.prefix.declared.1.test
14318 @@@DEnt:
14319 @@@@test:value:
14320 <!DOCTYPE a [
14321 <!ATTLIST a
14322 b:c CDATA "d"
14323 >
14324 ]>
14325 <a/>
14326 @@@c:erred: <[[xp|nsc-prefix-declared]]> { (6, 1)..(6, 4); }
14327
14328 @@XMLTest:
14329 @@@QName: xp.names.xmlns.reserved.1.test
14330 @@@DEnt:
14331 @@@@test:value:
14332 <a xmlns:xmlns="http://www.w3.org/2000/xmlns/"
14333 />
14334 @@@c:erred: <[[xp|nsc-reserved-prefix-xmlns]]> { (1, 1)..(2, 2); }
14335 @@@c:erred: <[[xp|nsc-reserved-namespace-name-xmlns]]> { (1, 1)..(2, 2); }
14336 @@XMLTest:
14337 @@@QName: xp.names.xmlns.reserved.2.test
14338 @@@DEnt:
14339 @@@@test:value:
14340 <a xmlns:xmlns="a"
14341 />
14342 @@@c:erred: <[[xp|nsc-reserved-prefix-xmlns]]> { (1, 1)..(2, 2); }
14343 @@XMLTest:
14344 @@@QName: xp.names.xmlns.reserved.3.test
14345 @@@DEnt:
14346 @@@@test:value:
14347 <a xmlns:a="http://www.w3.org/2000/xmlns/"
14348 />
14349 @@@c:erred: <[[xp|nsc-reserved-namespace-name-xmlns]]> { (1, 1)..(2, 2); }
14350
14351 @@XMLTest:
14352 @@@QName: xp.names.default.1.test
14353 @@@DEnt:
14354 @@@@test:value:
14355 <!DOCTYPE a [
14356 <!ATTLIST a
14357 xmlns CDATA "http://1.example/">
14358 ]>
14359 <a/>
14360 @@@test:domTree:
14361 document {
14362 document-type {
14363 element-type-definition {
14364 node-name: 'a';
14365 attribute-definition {
14366 node-name: 'xmlns';
14367 node-value: 'http://1.example/';
14368 }
14369 }
14370 }
14371 element {
14372 prefix: null;
14373 local-name: 'a';
14374 namespace-uri: 'http://1.example/';
14375 attribute {
14376 prefix: null;
14377 local-name: 'xmlns';
14378 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14379 value: 'http://1.example/';
14380 specified: false;
14381 }
14382 }
14383 }
14384 @@XMLTest:
14385 @@@QName: xp.names.default.2.test
14386 @@@DEnt:
14387 @@@@test:value:
14388 <!DOCTYPE a [
14389 <!ATTLIST a
14390 xmlns CDATA "http://1.example/">
14391 ]>
14392 <a xmlns="http://2.example/"/>
14393 @@@test:domTree:
14394 document {
14395 document-type {
14396 element-type-definition {
14397 node-name: 'a';
14398 attribute-definition {
14399 node-name: 'xmlns';
14400 node-value: 'http://1.example/';
14401 }
14402 }
14403 }
14404 element {
14405 prefix: null;
14406 local-name: 'a';
14407 namespace-uri: 'http://2.example/';
14408 attribute {
14409 prefix: null;
14410 local-name: 'xmlns';
14411 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14412 value: 'http://2.example/';
14413 specified: true;
14414 }
14415 }
14416 }
14417 @@XMLTest:
14418 @@@QName: xp.names.default.3.test
14419 @@@DEnt:
14420 @@@@test:value:
14421 <!DOCTYPE b:a [
14422 <!ATTLIST b:a
14423 xmlns:b CDATA "http://1.example/">
14424 ]>
14425 <b:a/>
14426 @@@test:domTree:
14427 document {
14428 document-type {
14429 element-type-definition {
14430 node-name: 'b:a';
14431 attribute-definition {
14432 node-name: 'xmlns:b';
14433 node-value: 'http://1.example/';
14434 }
14435 }
14436 }
14437 element {
14438 prefix: 'b';
14439 local-name: 'a';
14440 namespace-uri: 'http://1.example/';
14441 attribute {
14442 prefix: 'xmlns';
14443 local-name: 'b';
14444 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14445 value: 'http://1.example/';
14446 specified: false;
14447 }
14448 }
14449 }
14450 @@XMLTest:
14451 @@@QName: xp.names.default.4.test
14452 @@@DEnt:
14453 @@@@test:value:
14454 <!DOCTYPE b:a [
14455 <!ATTLIST b:a
14456 xmlns:b CDATA "http://1.example/">
14457 ]>
14458 <b:a xmlns:b="http://2.example/"/>
14459 @@@test:domTree:
14460 document {
14461 document-type {
14462 element-type-definition {
14463 node-name: 'b:a';
14464 attribute-definition {
14465 node-name: 'xmlns:b';
14466 node-value: 'http://1.example/';
14467 }
14468 }
14469 }
14470 element {
14471 prefix: 'b';
14472 local-name: 'a';
14473 namespace-uri: 'http://2.example/';
14474 attribute {
14475 prefix: 'xmlns';
14476 local-name: 'b';
14477 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14478 value: 'http://2.example/';
14479 specified: true;
14480 }
14481 }
14482 }
14483 @@XMLTest:
14484 @@@QName: xp.names.default.5.test
14485 @@@DEnt:
14486 @@@@test:value:
14487 <!DOCTYPE a [
14488 <!ATTLIST a
14489 xmlns:b CDATA "http://1.example/"
14490 b:c CDATA "http://1.example/">
14491 ]>
14492 <a xmlns:b="http://2.example/"/>
14493 @@@test:domTree:
14494 document {
14495 document-type {
14496 element-type-definition {
14497 node-name: 'a';
14498 attribute-definition {
14499 node-name: 'xmlns:b';
14500 text-content: 'http://1.example/';
14501 }
14502 attribute-definition {
14503 node-name: 'b:c';
14504 text-content: 'http://1.example/';
14505 }
14506 }
14507 }
14508 element {
14509 prefix: null;
14510 local-name: 'a';
14511 namespace-uri: null;
14512 attribute {
14513 prefix: 'xmlns';
14514 local-name: 'b';
14515 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14516 value: 'http://2.example/';
14517 specified: true;
14518 }
14519 attribute {
14520 prefix: 'b';
14521 local-name: 'c';
14522 namespace-uri: 'http://2.example/';
14523 specified: false;
14524 }
14525 }
14526 }
14527
14528 @@XMLTest:
14529 @@@QName: xp.names.unique.1.test
14530 @@@DEnt:
14531 @@@@test:value:
14532 <a
14533 xmlns:b="http://2.example/"
14534 xmlns:c="http://2.example/"
14535 b:d=""
14536 c:d=""
14537 />
14538 @@@c:erred: <[[xp|nswf-unique-att-spec-expanded-name]]> { (1, 1)..(6, 2); }
14539 @@XMLTest:
14540 @@@QName: xp.names.unique.2.test
14541 @@@DEnt:
14542 @@@@test:value:
14543 <!DOCTYPE a [
14544 <!ATTLIST a
14545 c:d CDATA ""
14546 >
14547 ]>
14548 <a
14549 xmlns:b="http://2.example/"
14550 xmlns:c="http://2.example/"
14551 b:d=""
14552 />
14553 @@@c:erred: <[[xp|nswf-unique-att-spec-expanded-name]]> { (6, 1)..(10, 2);}
14554 @@XMLTest:
14555 @@@QName: xp.names.unique.3.test
14556 @@@DEnt:
14557 @@@@test:value:
14558 <!DOCTYPE a [
14559 <!ATTLIST a
14560 c:d CDATA "value1"
14561 >
14562 ]>
14563 <a
14564 xmlns:c="http://2.example/"
14565 c:d="value2"
14566 />
14567 @@@test:domTree:
14568 document {
14569 document-type { }
14570 element {
14571 attribute {
14572 prefix: 'xmlns';
14573 local-name: 'c';
14574 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14575 specified: true;
14576 }
14577 attribute {
14578 prefix: 'c';
14579 local-name: 'd';
14580 namespace-uri: 'http://2.example/';
14581 value: 'value2';
14582 specified: true;
14583 }
14584 }
14585 }
14586
14587 @@XMLTest:
14588 @@@QName: xp.names.normalize.1.test
14589 @@@DEnt:
14590 @@@@test:value:
14591 <!DOCTYPE a [
14592 <!ATTLIST a
14593 xmlns NMTOKEN #IMPLIED
14594 >
14595 ]>
14596 <a xmlns=" "/>
14597 @@@test:domTree:
14598 document {
14599 document-type { }
14600 element {
14601 namespace-uri: null;
14602 prefix: null;
14603 local-name: 'a';
14604 }
14605 }
14606 @@XMLTest:
14607 @@@QName: xp.names.normalize.2.test
14608 @@@DEnt:
14609 @@@@test:value:
14610 <!DOCTYPE a [
14611 <!ATTLIST a
14612 xmlns NMTOKEN #IMPLIED
14613 >
14614 ]>
14615 <a xmlns=" about:blank "/>
14616 @@@test:domTree:
14617 document {
14618 document-type { }
14619 element {
14620 namespace-uri: 'about:blank';
14621 prefix: null;
14622 local-name: 'a';
14623 }
14624 }
14625 @@XMLTest:
14626 @@@QName: xp.names.normalize.3.test
14627 @@@DEnt:
14628 @@@@test:value:
14629 <!DOCTYPE a:a [
14630 <!ATTLIST a:a
14631 xmlns:a NMTOKEN #IMPLIED
14632 >
14633 ]>
14634 <a:a xmlns:a=" about:blank "/>
14635 @@@test:domTree:
14636 document {
14637 document-type { }
14638 element {
14639 namespace-uri: 'about:blank';
14640 prefix: 'a';
14641 local-name: 'a';
14642 }
14643 }
14644
14645 @@PerlDef:
14646 my $impl = $Message::DOM::ImplementationRegistry->get_implementation ({
14647 'Core' => '3.0',
14648 'XML' => '3.0',
14649 'XMLVersion' => ['1.0', '1.1'],
14650 });
14651 my $parser = <Class::ManakaiXMLParser>->new ($impl);
14652
14653 for my $test_data (@$TestData) {
14654 $test->start_new_test ($test_data->{uri});
14655 my $doc_ent = $test_data->{entity}->{$test_data->{root_uri}};
14656 my $not_ok;
14657
14658 $parser->dom_config->set_parameter ('error-handler' => sub ($$) {
14659 my (undef, $err) = @_;
14660 my $err_type = $err->type;
14661 if ($test_data->{dom_error}->{$err_type}) {
14662 $test->assert_error_equals
14663 (actual_value => $err,
14664 expected_hash => shift @{$test_data->{dom_error}
14665 ->{$err_type}});
14666 } else { # Uncatched error
14667 warn $err;
14668 unless ($err->severity == <C::c|DOMError.SEVERITY_WARNING>) {
14669 $test->failure_comment ('Unexpected error |'.$err->type.'|');
14670 $not_ok = true;
14671 }
14672 }
14673 return true; # continue as far as possible
14674 });
14675
14676 my $input = {string_data => \$doc_ent->{<Q::test:value>},
14677 system_id => $doc_ent->{<Q::test:uri>},
14678 base_uri => $doc_ent->{<Q::test:baseURI>}};
14679 if ($test_data->{dom_tree}) { # Successful test
14680 try {
14681 my $doc = $parser->parse ($input);
14682 $test->assert_dom_tree_equals
14683 (actual_value => $doc,
14684 expected_hash => $test_data->{dom_tree});
14685 for (values %{$test_data->{dom_error}||{}}) {
14686 if (@$_) {
14687 $test->failure_comment
14688 (@$_.' |DOMError|s of type |'.
14689 $_->[0]->{type}->{value}.'| are not reported');
14690 $not_ok = true;
14691 }
14692 }
14693 $not_ok ? $test->not_ok : $test->ok;
14694 } catch Message::Util::IF::DTException with {
14695 #
14696 } catch Message::DOM::IF::LSException with {
14697 # not_ok
14698 } otherwise {
14699 my $err = shift;
14700 warn $err;
14701 $test->not_ok;
14702 };
14703 } else {
14704 try {
14705 my $doc = $parser->parse ($input);
14706 } catch Message::Util::IF::DTException with {
14707 #
14708 } catch Message::DOM::IF::LSException with {
14709 #
14710 } otherwise {
14711 my $err = shift;
14712 warn $err;
14713 $test->not_ok;
14714 };
14715 for (values %{$test_data->{dom_error}||{}}) {
14716 if (@$_) {
14717 $test->failure_comment
14718 (@$_.' |DOMError|s of type |'.
14719 $_->[0]->{type}->{value}.'| are not reported');
14720 $not_ok = true;
14721 }
14722 }
14723 $not_ok ? $test->not_ok : $test->ok;
14724 }
14725 }
14726
14727 @ResourceDef:
14728 @@QName: getEmptyEntityState
14729 @@rdf:type: DISPerl|InlineCode
14730 @@ForCheck: ManakaiDOM|ForClass
14731 @@PerlDef:
14732 {reptxt => \'', line => 1, column => 1, pos => 0,
14733 is_externally_declared => true, name => $name,
14734 fh => do {
14735 open my $empty, '<', \'';
14736 $empty;
14737 },
14738 close_file => sub { }}
14739
14740 @ResourceDef:
14741 @@QName: getCopyOfEntityState
14742 @@rdf:type: DISPerl|InlineCode
14743 @@ForCheck: ManakaiDOM|ForClass
14744 @@PerlDef:
14745 {%{$self->{$entity_type}->{$entity_name}},
14746 line => 1, column => 1, pos => 0,
14747 fh => do {
14748 require IO::String;
14749 IO::String->new
14750 (${$self->{$entity_type}->{$entity_name}->{reptxt}});
14751 ## TODO: External entities.
14752 },
14753 close_file => sub { }}
14754 ##ManakaiXMLParser
14755
14756 ElementTypeBinding:
14757 @Name: Test
14758 @ElementType:
14759 dis:ResourceDef
14760 @ShadowContent:
14761 @@ForCheck: ManakaiDOM|ForClass
14762 @@rdf:type: test|StandaloneTest
14763
14764 ElementTypeBinding:
14765 @Name: XMLTests
14766 @ElementType:
14767 dis:ResourceDef
14768 @ShadowContent:
14769 @@ForCheck: ManakaiDOM|ForClass
14770 @@rdf:type: test|ParserTestSet
14771
14772 ElementTypeBinding:
14773 @Name: XMLTest
14774 @ElementType:
14775 dis:ResourceDef
14776 @ShadowContent:
14777 @@ForCheck: ManakaiDOM|ForClass
14778 @@rdf:type: test|ParserTest
14779
14780 ElementTypeBinding:
14781 @Name: DEnt
14782 @ElementType:
14783 dis:ResourceDef
14784 @ShadowContent:
14785 @@rdf:type: test|RootEntity
14786
14787 ElementTypeBinding:
14788 @Name: Ent
14789 @ElementType:
14790 dis:ResourceDef
14791 @ShadowContent:
14792 @@rdf:type: test|Entity
14793
14794 ResourceDef:
14795 @QName: xp|get-location-from-token
14796 @rdf:type: DISPerl|BlockCode
14797 @enDesc:
14798 Creates a <IF::DOMCore:DOMLocator> object from a token.
14799 @PerlDef:
14800 my $__d = $token->{type} ne '#EOF'
14801 ? $token->{location}->{char_d}
14802 : 0;
14803 $__d -= $token->{location_d} if $token->{location_d};
14804 $result = {
14805 utf32_offset => $token->{location}->{pos} - $__d,
14806 line_number => $token->{location}->{line},
14807 column_number => $token->{location}->{column} - $__d,
14808 };
14809 $result->{utf32_offset} = 0 if $result->{utf32_offset} < 0;
14810 $result->{column_number} = 0 if $result->{column_number} < 0;
14811 ## 0 or 1, which should be?
14812 @For: ManakaiDOM|ManakaiDOM3
14813
14814 ElementTypeBinding:
14815 @Name: RuleDef
14816 @ElementType:
14817 dis:ResourceDef
14818 @ShadowContent:
14819 @@ForCheck: ManakaiDOM|ForClass
14820 @@rdf:type: Muf2003|RuleDefClass
14821
14822 ElementTypeBinding:
14823 @Name: RuleParam
14824 @ElementType:
14825 dis:ResourceDef
14826 @ShadowContent:
14827 @@rdf:type: Muf2003|RuleParameter
14828
14829 ElementTypeBinding:
14830 @Name: enImplNote
14831 @ElementType:
14832 dis:ImplNote
14833 @ShadowContent:
14834 @@lang:en
14835
14836 ElementTypeBinding:
14837 @Name: WFErrDef
14838 @ElementType:
14839 dis:ResourceDef
14840 @ShadowContent:
14841 @@rdf:type: DOMCore|DOMErrorType
14842 @@For: ManakaiDOM|DOM3
14843 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14844 @@c:severity: c|SEVERITY_FATAL_ERROR
14845
14846 ElementTypeBinding:
14847 @Name: FatalErrDef
14848 @ElementType:
14849 dis:ResourceDef
14850 @ShadowContent:
14851 @@rdf:type: DOMCore|DOMErrorType
14852 @@For: ManakaiDOM|DOM3
14853 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14854 @@c:severity: c|SEVERITY_FATAL_ERROR
14855
14856 ElementTypeBinding:
14857 @Name: NSFatalErrDef
14858 @ElementType:
14859 dis:ResourceDef
14860 @ShadowContent:
14861 @@rdf:type: c|DOMErrorType
14862 @@For: ManakaiDOM|DOM3
14863 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14864 @@c:severity: c|SEVERITY_FATAL_ERROR
14865
14866 ElementTypeBinding:
14867 @Name: NSCErrDef
14868 @ElementType:
14869 dis:ResourceDef
14870 @ShadowContent:
14871 @@rdf:type: c|DOMErrorType
14872 @@For: ManakaiDOM|DOM3
14873 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14874 @@c:severity: c|SEVERITY_FATAL_ERROR
14875
14876 ElementTypeBinding:
14877 @Name: VCErrDef
14878 @ElementType:
14879 dis:ResourceDef
14880 @ShadowContent:
14881 @@rdf:type: c|DOMErrorType
14882 @@For: ManakaiDOM|DOM3
14883 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14884 @@c:severity: c|SEVERITY_ERROR
14885
14886 ElementTypeBinding:
14887 @Name: ErrDef
14888 @ElementType:
14889 dis:ResourceDef
14890 @ShadowContent:
14891 @@rdf:type: c|DOMErrorType
14892 @@For: ManakaiDOM|DOM3
14893 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14894 @@c:severity: c|SEVERITY_ERROR
14895
14896 ElementTypeBinding:
14897 @Name: WarnDef
14898 @ElementType:
14899 dis:ResourceDef
14900 @ShadowContent:
14901 @@rdf:type: c|DOMErrorType
14902 @@For: ManakaiDOM|DOM3
14903 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14904 @@c:severity: c|SEVERITY_WARNING
14905
14906 WFErrDef:
14907 @QName: xp|wf-syntax-error
14908 @enDesc:
14909 The entity does not match to the production rule; it is not
14910 well-formed.
14911 @enMufDef:
14912 |%xp-error-token-type;|%xp-error-token-value
14913 (prefix => { (|}, suffix => {|)}); is not
14914 allowed%xp-error-lines (prefix => { (|}, suffix => {|)});
14915 @ecore:hasParameter:
14916 @@@: xp|error-token
14917 @@enDesc:
14918 The token that is not allowed.
14919
14920 WFErrDef:
14921 @QName: xp|wf-pi-target-is-xml
14922 @enDesc:
14923 A processing instruction has its <CODE::PITarget> of
14924 <XML::xml> (in any case) which is not allowed.
14925 @enMufDef:
14926 Processing instruction target name cannot be |%p
14927 (name => {<Q::xp|name>});|
14928 @ecore:hasParameter:
14929 @@@: xp|error-token
14930 @@enDesc:
14931 The token that contains the name.
14932 @ecore:hasParameter:
14933 @@@: xp|name
14934 @@enDesc:
14935 A string that is specified as target name of the
14936 processing instruction.
14937 @ecore:hasParameter: xp|parent
14938
14939 WFErrDef:
14940 @QName: xp|wf-no-end-tag
14941 @enDesc:
14942 An end-tag is not found.
14943 @enMufDef:
14944 End-tag |</%p (name => {<Q::xp|expected-element-type>});>| is required
14945 @ecore:hasParameter: xp|error-token
14946 @ecore:hasParameter:
14947 @@@: xp|node
14948 @@enDesc:
14949 The element node that is not closed.
14950 @ecore:hasParameter:
14951 @@@: xp|expected-element-type
14952 @@enDesc:
14953 The element type name of the element that is not closed.
14954
14955 WFErrDef:
14956 @QName: xp|wf-unsupported-xml-version
14957 @enDesc:
14958 The XML version specified in the version declaration is not supported.
14959 @enMufDef:
14960 XML version |%p (name => {<Q::infoset|version>});| is not supported
14961 @ecore:hasParameter: xp|bad-token
14962 @ecore:hasParameter:
14963 @@@: xp|parent
14964 @@enDesc:
14965 The document node.
14966 @ecore:hasParameter:
14967 @@@: infoset|version
14968 @@enDesc:
14969 The specified XML version.
14970
14971 WFErrDef:
14972 @QName: xp|wf-malformed-enc-name
14973 @enDesc:
14974 An <XA::encoding> pseudo-attribute value does not match
14975 to the procduction rule <CODE::EncName>.
14976 @enMufDef:
14977 Encoding name |%p (name => {<Q::xp|name>});| is not allowed
14978 @ecore:hasParameter: xp|error-token
14979 @ecore:hasParameter:
14980 @@@: xp|parent
14981 @@enDesc: The document node.
14982 @ecore:hasParameter:
14983 @@@: xp|name
14984 @@enDesc:
14985 The <XA::encoding> value.
14986
14987 WFErrDef:
14988 @QName: xp|wf-malformed-xml-standalone
14989 @enDesc:
14990 An <XA::standalone> pseudo-attribute value is neither <XML::yes>
14991 or <XML::no>.
14992 @enMufDef:
14993 |standalone| pseudo-attribute value |%p (name => {<Q::xp|name>});|
14994 is not allowed
14995 @ecore:hasParameter: xp|error-token
14996 @ecore:hasParameter:
14997 @@@: xp|parent
14998 @@enDesc: The document node.
14999 @ecore:hasParameter:
15000 @@@: xp|name
15001 @@enDesc:
15002 The <XA::standalone> value.
15003
15004 WFErrDef:
15005 @QName: xp|wf-legal-literal-character
15006 @enDesc:
15007 Each character in XML entity must match to the production
15008 rule <CODE::Char - RestrictedChar>.
15009 @enMufDef:
15010 Character %character-code-point
15011 (v => {<Q::xp|character-number>}); is not allowed
15012 @ecore:hasParameter:
15013 @@@: xp|character-number
15014 @@enDesc:
15015 The code position of the character being referred.
15016
15017 WFErrDef:
15018 @QName: xp|wf-invalid-character-in-node-name
15019 @c:errorType:
15020 @@@: wf-invalid-character-in-node-name
15021 @@ContentType: DISCore|String
15022 @enDesc:
15023 If a name contains a character that is not a name character
15024 in the XML version in use, or if the first character of a name
15025 is not a name start character in the XML version in use.
15026
15027 {NOTE::
15028 When an invalid character is encountered in an entity
15029 where a <CODE::Name> is expected, what type of error
15030 is issued is implementation dependent: <Q::xp|wf-syntax-error>,
15031 <Q::xp|wf-pi-target-is-xml> or other error might be reported.
15032 }
15033
15034 {NOTE::
15035 This error type is defined in DOM Level 3 Core and Load and Save
15036 modules and redefined herein for the purpose of XML parser.
15037 }
15038 @enMufDef:
15039 Character %character-code-point
15040 (v => {<Q::xp|character-number>}); is not allowed in name
15041 @ecore:hasParameter: xp|error-token
15042 @ecore:hasParameter:
15043 @@@: xp|character-number
15044 @@enDesc:
15045 The code position of the character being referred.
15046 @ecore:hasParameter:
15047 @@@: infoset|version
15048 @@enDesc:
15049 The version of XML in use.
15050
15051 WFErrDef:
15052 @QName: xp|wf-pes-in-internal-subset
15053 @enDesc:
15054 In the internal subset of the DTD, parameter entity references
15055 <kwd:MUST-NOT> occur within markup declarations.
15056 @enMufDef:
15057 Parameter entity reference |%percent;%param (name => {<Q::xp|name>});;|
15058 cannot occur within a markup declaration
15059 @ecore:hasParameter: xp|error-token
15060 @ecore:hasParameter:
15061 @@@: xp|name
15062 @@enDesc:
15063 The name of the parameter entity.
15064
15065 WFErrDef:
15066 @QName: xp|wf-element-type-match
15067 @enDesc:
15068 The <CODE::Name> in an element's end-tag must match the element type
15069 in the start-tag.
15070 @enMufDef:
15071 End-tag |</%p (name => {<Q::xp|actual-element-type>});>| does
15072 not match to start-tag |<%p (name => {<Q::xp|expected-element-type>});>|
15073 @ecore:hasParameter: xp|error-token
15074 @ecore:hasParameter:
15075 @@@: xp|node
15076 @@enDesc:
15077 The current opening element node.
15078 @ecore:hasParameter:
15079 @@@: xp|expected-element-type
15080 @@enDesc:
15081 The element type name of the current element.
15082 @ecore:hasParameter:
15083 @@@: xp|actual-element-type
15084 @@enDesc:
15085 The <CODE::Name> occurs in the end-tag.
15086
15087 WFErrDef:
15088 @QName: xp|wf-unique-att-spec
15089 @enDesc:
15090 An attribute name <kwd:MUST-NOT> appear more than once in
15091 the same start-tag or empty-element tag.
15092 @enMufDef:
15093 Attribute |%p (name => {<Q::xp|name>});| is specified more
15094 than once in the same tag
15095 @ecore:hasParameter: xp|error-token
15096 @ecore:hasParameter:
15097 @@@: xp|name
15098 @@enDesc:
15099 The name of the attribute.
15100
15101 WFErrDef:
15102 @QName: xp|wf-no-external-entity-references
15103 @enDesc:
15104 Attribute values <kwd:MUST-NOT> contain direct or indirect
15105 entity references to external entities.
15106 @enMufDef:
15107 External entity |%p (name => {<Q::xp|name>});| is referenced
15108 in an attribute value literal
15109 @ecore:hasParameter: xp|error-token
15110 @ecore:hasParameter:
15111 @@@: xp|name
15112 @@enDesc:
15113 The name of the entity.
15114
15115 WFErrDef:
15116 @QName: xp|wf-no-lt-in-attribute-values
15117 @enDesc:
15118 The replacement text of any entity referred to directly or indirectly
15119 in an attribute value literal <kwd:MUST-NOT> contain a
15120 <CHAR::LESS-THAN SIGN>.
15121 @enMufDef:
15122 Entity replacement text cannot contain a
15123 |LESS-THAN SIGN| since it is referenced from an attribute
15124 value literal
15125 @ecore:hasParameter: xp|error-token
15126
15127 WarnDef:
15128 @QName: xp|warning-attribute-definition-ignored
15129 @enDesc:
15130 An attribute definition is ignored because the same attribute
15131 is declared before.
15132 @enMufDef:
15133 Attribute definition for |%p (name => {<Q::xp|name>});| is ignored
15134 @ecore:hasParameter: xp|error-token
15135 @ecore:hasParameter:
15136 @@@: xp|name
15137 @@enDesc:
15138 The name of the attribute.
15139
15140 WFErrDef:
15141 @QName: xp|wf-legal-character
15142 @enDesc:
15143 Characters referred to using character references <kwd:MUST>
15144 match the production for <CODE::Char>.
15145 @enMufDef:
15146 Reference to character %character-code-point
15147 (v => {<Q::xp|character-number>}); is not allowed
15148 @ecore:hasParameter: xp|error-token
15149 @ecore:hasParameter:
15150 @@@: xp|character-number
15151 @@enDesc:
15152 The code position of the character being referred.
15153 @ecore:hasParameter:
15154 @@@: xp|parent
15155 @@enDesc:
15156 The parent node in which the character reference has
15157 occurred, if available.
15158
15159 WFErrDef:
15160 @QName: xp|wf-entity-declared
15161 @enDesc:
15162 {P:: In a document
15163
15164 - without any DTD,
15165
15166 - with only an internal DTD subset that contains no parameter
15167 entity references, or
15168
15169 - with <XML::standalone="yes">,
15170
15171 for an entity reference that does not occur within the external
15172 subset or a parameter entity, the <CODE::Name> given in the
15173 entity reference <kwd:MUST> match the <CODE::Name> does not
15174 occur within the external subset or a parameter entity,
15175 except that five predefined character entities need not
15176 be declared. The declaration of a general entity <kwd:MUST>
15177 precede any reference to it which appears in a default value
15178 in an attribute list declaration.
15179 @enMufDef:
15180 Entity |%p (name => {<Q::xp|name>});| must be declared
15181 in the internal subset
15182 @ecore:hasParameter: xp|error-token
15183 @ecore:hasParameter:
15184 @@@: xp|name
15185 @@enDesc:
15186 The name of the entity.
15187
15188 WFErrDef:
15189 @QName: xp|wf-parsed-entity
15190 @enDesc:
15191 An entity reference <kwd:MUST-NOT> contain the name of an
15192 unparsed entity.
15193 @enMufDef:
15194 Entity |%p (name => {<Q::xp|name>});| is an unparsed entity
15195 @ecore:hasParameter: xp|error-token
15196 @ecore:hasParameter:
15197 @@@: xp|name
15198 @@enDesc:
15199 The name of the entity.
15200
15201 WFErrDef:
15202 @QName: xp|wf-no-recursion
15203 @enDesc:
15204 A parsed entity <kwd:MUST-NOT> contain a recursive reference
15205 to itself, either directly or indirectly.
15206 @enMufDef:
15207 Entity |%p (name => {<Q::xp|name>});| is recursively referenced
15208 @ecore:hasParameter: xp|error-token
15209 @ecore:hasParameter:
15210 @@@: xp|name
15211 @@enDesc:
15212 The name of the entity.
15213
15214 FatalErrDef:
15215 @QName: xp|fatal-xml11-end-of-line-in-xml-declaration
15216 @enDesc:
15217 An end-of-line character <CODE::U+0085> or <CODE::U+2028> is appeared
15218 within an XML declaration or text declaration.
15219 @enMufDef:
15220 End-of-line character %character-code-point
15221 (v => {<Q::xp|character-number>}); cannot be used within the
15222 XML or text declaration
15223 @ecore:hasParameter:
15224 @@@: xp|character-number
15225 @@enDesc:
15226 The code position of the end-of-line character.
15227
15228 ErrDef:
15229 @QName: xp|error-internal-predefined-entity
15230 @enDesc:
15231 A general entity declaration whose <CODE::Name> equals to one
15232 of predefined entities <kwd:MUST> declare it as an internal entity.
15233 @enMufDef:
15234 Entity |%p (name => {<Q::xp|name>});| must be declared as an
15235 internal entity
15236 @ecore:hasParameter: xp|error-token
15237 @ecore:hasParameter:
15238 @@@: xp|name
15239 @@enDesc:
15240 The name of the entity.
15241
15242 ErrDef:
15243 @QName: xp|error-malformed-predefined-entity
15244 @enDesc:
15245 A general entity declaration whose <CODE::Name> equals to one
15246 of predefined entities <kwd:MUST> declare it as a data
15247 character for the entity.
15248 @enMufDef:
15249 Entity declaration for |%p (name => {<Q::xp|name>});|
15250 (replacement text |%p (name => {<Q::xp|replacement-text>});|) is malformed
15251 @ecore:hasParameter: xp|error-token
15252 @ecore:hasParameter:
15253 @@@: xp|name
15254 @@enDesc:
15255 The name of the entity.
15256 @ecore:hasParameter:
15257 @@@: xp|replacement-text
15258 @@enDesc:
15259 The replacement text of the entity declaration.
15260
15261 WarnDef:
15262 @QName: xp|warning-entity-declaration-ignored
15263 @enDesc:
15264 An entity declaration is ignored because the same entity
15265 is declared before.
15266 @enMufDef:
15267 Entity declaration for |%p (name => {<Q::xp|name>});| is ignored
15268 @ecore:hasParameter: xp|error-token
15269 @ecore:hasParameter:
15270 @@@: xp|name
15271 @@enDesc:
15272 The name of the entity.
15273
15274 VCErrDef:
15275 @QName: xp|vc-unique-notation-name
15276 @enDesc:
15277 A <CODE::Name> <kwd:MUST-NOT> be declared in more than
15278 one notation declaration.
15279 @enMufDef:
15280 Notation |%p (name => {<Q::xp|name>});| is already declared
15281 @ecore:hasParameter: xp|error-token
15282 @ecore:hasParameter:
15283 @@@: xp|name
15284 @@enDesc:
15285 The name of the notation.
15286
15287 WarnDef:
15288 @QName: xp|warning-entity-declaration-not-processed
15289 @enDesc:
15290 An entity declaration is not processed because there
15291 is a reference to parameter entity before the declaration
15292 and the entity is not read.
15293 @enMufDef:
15294 Entity declaration for |%p (name => {<Q::xp|name>});| is not processed
15295 @ecore:hasParameter: xp|error-token
15296 @ecore:hasParameter:
15297 @@@: xp|name
15298 @@enDesc:
15299 The name of the entity.
15300
15301 WarnDef:
15302 @QName: xp|warning-attribute-definition-not-processed
15303 @enDesc:
15304 An attribute definition is not processed because there
15305 is a reference to parameter entity before the declaration
15306 and the entity is not read.
15307 @enMufDef:
15308 Attribute definition for |%p (name => {<Q::xp|name>});| is not processed
15309 @ecore:hasParameter: xp|error-token
15310 @ecore:hasParameter:
15311 @@@: xp|name
15312 @@enDesc:
15313 The name of the attribute.
15314
15315 NSFatalErrDef:
15316 @QName: xp|nswf-legal-ncname
15317 @enDesc:
15318 <CODE::Name>s other than element type names and attribute names
15319 <kwd:MUST> be <CODE::NCName>s.
15320 @enMufDef:
15321 <CODE::Name> |%p (name => {<Q::xp|name>});| is not an <CODE::NCName>
15322 @ecore:hasParameter: xp|error-token
15323 @ecore:hasParameter:
15324 @@@: xp|name
15325 @@enDesc:
15326 The name.
15327 @ecore:hasParameter:
15328 @@@: infoset|version
15329 @@enDesc:
15330 The version of XML in use.
15331
15332 NSFatalErrDef:
15333 @QName: xp|nswf-legal-qname
15334 @enDesc:
15335 An element type name or an attribute name <kwd:MUST> be a
15336 <CODE::QName>.
15337 @enMufDef:
15338 <CODE::Name> |%p (name => {<Q::xp|name>});| is not a <CODE::QName>
15339 @ecore:hasParameter: xp|error-token
15340 @ecore:hasParameter:
15341 @@@: xp|name
15342 @@enDesc:
15343 The name.
15344 @ecore:hasParameter:
15345 @@@: infoset|version
15346 @@enDesc:
15347 The version of XML in use.
15348
15349 NSCErrDef:
15350 @QName: xp|nsc-reserved-prefix-xml
15351 @enDesc:
15352 The prefix <XML::xml> <kwd:MUST-NOT> be undeclared or bound
15353 to any namespace name other than <URI::http://www.w3.org/XML/1998/namespace>.
15354 @enMufDef:
15355 Namespace prefix |xml| cannot be bound to namespace
15356 name |%p (name => {<Q::infoset|namespaceName>});|
15357 @ecore:hasParameter: xp|error-token
15358 @ecore:hasParameter:
15359 @@@: infoset|prefix
15360 @@enDesc:
15361 The namespace prefix.
15362 @ecore:hasParameter:
15363 @@@: infoset|namespaceName
15364 @@enDesc:
15365 The namespace name bound to or an empty string for undeclaring.
15366
15367 NSCErrDef:
15368 @QName: xp|nsc-reserved-namespace-name-xml
15369 @enDesc:
15370 Namespace prefixes other than <XML::xml> <kwd:MUST-NOT> be bound
15371 to the namespace name <URI::http://www.w3.org/XML/1998/namespace>.
15372 @enMufDef:
15373 Namespace prefix |%p (name => {<Q::infoset|prefix>});| cannot be
15374 bound to namespace name |http://www.w3.org/XML/1998/namespace|
15375 @enImplNote:
15376 The XMLNames spec does not prohibit the URI bound to
15377 the default namespace (!)
15378 @ecore:hasParameter: xp|error-token
15379 @ecore:hasParameter:
15380 @@@: infoset|prefix
15381 @@enDesc:
15382 The namespace prefix or <DOM::null> for default namespace.
15383 @ecore:hasParameter:
15384 @@@: infoset|namespaceName
15385 @@enDesc:
15386 The namespace name bound to.
15387
15388 NSCErrDef:
15389 @QName: xp|nsc-reserved-prefix-xmlns
15390 @enDesc:
15391 The prefix <XML::xmlns> <kwd:MUST-NOT> be declared or undeclared.
15392 @enMufDef:
15393 Namespace prefix |xmlns| cannot be declared or undeclared
15394 @ecore:hasParameter: xp|error-token
15395 @ecore:hasParameter:
15396 @@@: infoset|prefix
15397 @@enDesc:
15398 The namespace prefix.
15399 @ecore:hasParameter:
15400 @@@: infoset|namespaceName
15401 @@enDesc:
15402 The namespace name bound to or an empty string for undeclaring.
15403
15404 NSCErrDef:
15405 @QName: xp|nsc-reserved-namespace-name-xmlns
15406 @enDesc:
15407 Namespace prefixes <kwd:MUST-NOT> be bound
15408 to the namespace name <URI::http://www.w3.org/2000/xmlns/>.
15409 @enMufDef:
15410 Namespace prefix |%p (name => {<Q::infoset|prefix>});| cannot be
15411 bound to namespace name |http://www.w3.org/2000/xmlns/|
15412 @enImplNote:
15413 The XMLNames spec does not prohibit the URI bound to
15414 the default namespace (!)
15415 @ecore:hasParameter: xp|error-token
15416 @ecore:hasParameter:
15417 @@@: infoset|prefix
15418 @@enDesc:
15419 The namespace prefix or <DOM::null> for default namespace.
15420 @ecore:hasParameter:
15421 @@@: infoset|namespaceName
15422 @@enDesc:
15423 The namespace name bound to.
15424
15425 NSCErrDef:
15426 @QName: xp|nsc-prefix-declared
15427 @enDesc:
15428 A namespace prefix other than <XML::xml> or <XML::xmlns>
15429 <kwd:MUST> have been declared in a namespace declaration
15430 attribute in either the start or empty element tag of the
15431 element where the prefix is used or in an ancestor
15432 element. Furthermore, the attribute value in the innermost
15433 such declaration <kwd:MUST-NOT> be an empty string.
15434 @enMufDef:
15435 Namespace prefix |%p (name => {<Q::infoset|prefix>});| in
15436 qualified name |%p (name => {<Q::xp|name>});| is not declared
15437 @ecore:hasParameter: xp|error-token
15438 @ecore:hasParameter:
15439 @@@: infoset|prefix
15440 @@enDesc:
15441 The namespace prefix.
15442 @ecore:hasParameter:
15443 @@@: xp|name
15444 @@enDesc:
15445 The qualified name.
15446
15447 NSFatalErrDef:
15448 @QName: xp|nswf-empty-namespace-name
15449 @enDesc:
15450 If the XML version of the document is 1.0 and the
15451 normalized value of the prefixed namespace declaration attribute is empty.
15452 @enMufDef:
15453 Namespace |%p (name => {<Q::infoset|prefix>});| cannot be
15454 undeclared in XML 1.0
15455 @ecore:hasParameter: xp|error-token
15456 @ecore:hasParameter:
15457 @@@: infoset|prefix
15458 @@enDesc:
15459 The namespace prefix.
15460 @ecore:hasParameter:
15461 @@@: infoset|namespaceName
15462 @@enDesc:
15463 An empty string.
15464
15465 NSFatalErrDef:
15466 @QName: xp|nswf-unique-att-spec-expanded-name
15467 @enDesc:
15468 No element may have two attributes that have qualified name
15469 with the same local part and with namespace prefixes
15470 that have been bound to namespace names that are identical.
15471 @enMufDef:
15472 Attribute |%p (name => {<Q::infoset|localName>});| in
15473 namespace |%p (name => {<Q::infoset|namespaceName>});| is
15474 attached to the same element more than once (as
15475 |%p (name => {<Q::xp|name>});| and
15476 |%p (name => {<Q::xp|another-attribute-name>});|)
15477 @enImplNote:
15478 The XMLNames spec doesn't mention default attributes
15479 for this constraint...
15480 @ecore:hasParameter: xp|error-token
15481 @ecore:hasParameter:
15482 @@@: infoset|localName
15483 @@enDesc:
15484 The local part of the attribute.
15485 @ecore:hasParameter:
15486 @@@: infoset|namespaceName
15487 @@enDesc:
15488 The namespace URI of the attribute.
15489 @ecore:hasParameter:
15490 @@@: xp|name
15491 @@enDesc:
15492 The name, i.e. a qualified name consist of <Q::infoset:localName>
15493 and <Q::infoset:namespaceName> parameter values.
15494 @ecore:hasParameter:
15495 @@@: xp|another-attribute-name
15496 @@enDesc:
15497 Another attribute qualified name expanded to the same expanded name
15498 as <Q::xp|name>.
15499
15500 XWParam:
15501 @QName: xp|another-attribute-name
15502
15503 XWParam:
15504 @QName: xp|replacement-text
15505 @enDesc:
15506 The replacement text.
15507
15508 XWParam:
15509 @QName: xp|error-token
15510 @enDesc:
15511 The token where the parser found an error.
15512
15513 XWParam:
15514 @QName: xp|name
15515 @enDesc:
15516 A name.
15517
15518 XWParam:
15519 @QName: xp|parent
15520 @enDesc:
15521 The parent node in which the error occurs.
15522
15523 XWParam:
15524 @QName: xp|node
15525 @enDesc:
15526 The current node.
15527
15528 XWParam:
15529 @QName: xp|actual-element-type
15530 @enDesc:
15531 The actual element type name occured in the source.
15532
15533 XWParam:
15534 @QName: xp|expected-element-type
15535 @enDesc:
15536 The element type name expected.
15537
15538 XWParam:
15539 @QName: xp|character-number
15540 @enDesc:
15541 The character code position.
15542
15543 ElementTypeBinding:
15544 @Name: XWParam
15545 @ElementType:
15546 dis:ResourceDef
15547 @ShadowContent:
15548 @@For: =ManakaiDOM|all
15549 @@rdf:type: ecore|Parameter
15550
15551 ElementTypeBinding:
15552 @Name:enMufDef
15553 @ElementType:
15554 ecore:defaultMessage
15555 @ShadowContent:
15556 @@lang:en
15557 @@ContentType:
15558 lang:muf
15559
15560 ResourceDef:
15561 @QName: DOMImpl
15562 @AliasFor: DOMCore|DOMImplementation
15563 @For: ManakaiDOM|DOM
15564
15565 ResourceDef:
15566 @QName: LSInput
15567 @AliasFor: DOMLS|LSInput
15568 @For: ManakaiDOM|DOM
15569
15570 ResourceDef:
15571 @QName: LSParser
15572 @AliasFor: DOMLS|LSParser
15573 @For: ManakaiDOM|DOM
15574
15575 ElementTypeBinding:
15576 @Name: Attr
15577 @ElementType:
15578 dis:ResourceDef
15579 @ShadowContent:
15580 @@rdf:type: DISLang|Attribute
15581 @@ForCheck: !=ManakaiDOM|ManakaiDOM
15582
15583 ElementTypeBinding:
15584 @Name: Get
15585 @ElementType:
15586 dis:ResourceDef
15587 @ShadowContent:
15588 @@rdf:type: DISLang|AttributeGet
15589
15590 ElementTypeBinding:
15591 @Name: Set
15592 @ElementType:
15593 dis:ResourceDef
15594 @ShadowContent:
15595 @@rdf:type: DISLang|AttributeSet
15596
15597 ElementTypeBinding:
15598 @Name: enDesc
15599 @ElementType:
15600 dis:Description
15601 @ShadowContent:
15602 @@lang:en
15603
15604 ElementTypeBinding:
15605 @Name: Method
15606 @ElementType:
15607 dis:ResourceDef
15608 @ShadowContent:
15609 @@rdf:type: DISLang|Method
15610 @@For: !=ManakaiDOM|ManakaiDOM
15611
15612 ElementTypeBinding:
15613 @Name: Return
15614 @ElementType:
15615 dis:ResourceDef
15616 @ShadowContent:
15617 @@rdf:type: DISLang|MethodReturn
15618
15619 ElementTypeBinding:
15620 @Name: Param
15621 @ElementType:
15622 dis:ResourceDef
15623 @ShadowContent:
15624 @@rdf:type: DISLang|MethodParameter
15625
15626 ElementTypeBinding:
15627 @Name: PerlDef
15628 @ElementType:
15629 dis:Def
15630 @ShadowContent:
15631 @@ContentType: lang|Perl
15632
15633 ElementTypeBinding:
15634 @Name: PerlDefC
15635 @ElementType:
15636 dis:Def
15637 @ShadowContent:
15638 @@ContentType: lang|Perl
15639
15640 ElementTypeBinding:
15641 @Name: PropDef
15642 @ElementType:
15643 dis:ResourceDef
15644 @ShadowContent:
15645 @@rdf:type: rdf|Property
15646
15647 ClsDef:
15648 @ClsQName: ManakaiXMLParserExceptionFormatter
15649
15650 @ClsISA: ecore|MUErrorFormatter||ManakaiDOM|Perl
15651
15652 @RuleDef:
15653 @@Name: xp-error-token-type
15654 @@enDesc:
15655 The type of the token the parser is encountered.
15656
15657 @@Method:
15658 @@@Name: after
15659 @@@Param:
15660 @@@@Name: name
15661 @@@@Type: DOMString
15662 @@@@enDesc: The name of the method.
15663 @@@Param:
15664 @@@@Name: p
15665 @@@@Type: DISPerl|HASH
15666 @@@@enDesc: The set of the parameters to the method.
15667 @@@Param:
15668 @@@@Name: o
15669 @@@@Type: DISPerl|HASH
15670 @@@@enDesc: The option value.
15671 @@@Return:
15672 @@@@PerlDef:
15673 $p->{-result} = $o->{<H::xp|error-token>}->{type}
15674 if defined $o->{<H::xp|error-token>}->{type};
15675
15676 @RuleDef:
15677 @@Name: xp-error-token-value
15678 @@enDesc:
15679 The value of the token the parser is encountered, if any.
15680
15681 @@Method:
15682 @@@Name: after
15683 @@@Param:
15684 @@@@Name: name
15685 @@@@Type: DOMString
15686 @@@@enDesc: The name of the method.
15687 @@@Param:
15688 @@@@Name: p
15689 @@@@Type: DISPerl|HASH
15690 @@@@enDesc: The set of the parameters to the method.
15691 @@@Param:
15692 @@@@Name: o
15693 @@@@Type: DISPerl|HASH
15694 @@@@enDesc: The option value.
15695 @@@Return:
15696 @@@@PerlDef:
15697 $p->{-result} = $o->{<H::xp|error-token>}->{value}
15698 if defined $o->{<H::xp|error-token>}->{value};
15699
15700 @RuleDef:
15701 @@Name: xp-error-lines
15702 @@enDesc:
15703 A copy of fragment of the source text that contains the line
15704 where the error occurred, if available.
15705
15706 @@Method:
15707 @@@Name: after
15708 @@@Param:
15709 @@@@Name: name
15710 @@@@Type: DOMString
15711 @@@@enDesc: The name of the method.
15712 @@@Param:
15713 @@@@Name: p
15714 @@@@Type: DISPerl|HASH
15715 @@@@enDesc: The set of the parameters to the method.
15716 @@@Param:
15717 @@@@Name: o
15718 @@@@Type: DISPerl|HASH
15719 @@@@enDesc: The option value.
15720 @@@Return:
15721 @@@@PerlDef:
15722 my $pos = $o-><AG::DOMCore|DOMError.location>
15723 -><AG::DOMCore|DOMLocator.utf32Offset>;
15724 my $src = $o->{<H::ecore|object>}->{entity}->[-1]->{reptxt};
15725 if (defined $src and $pos > -1) {
15726 my $start = $pos;
15727 $start = rindex ($$src, "\x0A", $start - 1) for 0..2;
15728 $start++;
15729 my $end = $pos;
15730 $end = index ($$src, "\x0A", $end + 1) for 0..2;
15731 $end = length $$src if $end < 0;
15732 $p->{-result} = substr $$src, $start, $end - $start;
15733 }
15734
15735 @RuleDef:
15736 @@Name: character-code-point
15737 @@enDesc:
15738 The character code position, in <CODE::U+<VAR::HHHH>> notation.
15739
15740 @@Method:
15741 @@@Name: after
15742 @@@Param:
15743 @@@@Name: name
15744 @@@@Type: DOMString
15745 @@@@enDesc: The name of the method.
15746 @@@Param:
15747 @@@@Name: p
15748 @@@@Type: DISPerl|HASH
15749 @@@@enDesc: The set of the parameters to the method.
15750 @@@Param:
15751 @@@@Name: o
15752 @@@@Type: DISPerl|HASH
15753 @@@@enDesc: The option value.
15754 @@@RuleParam:
15755 @@@@Name: v
15756 @@@@Type: DISPerl|Number
15757 @@@@enDesc:
15758 The name of the error parameter that contains the character code.
15759 @@@Return:
15760 @@@@PerlDef:
15761 $p->{-result} = sprintf 'U+%04X', $o->{$p->{v}};
15762 ##XMLParserExceptionFormatter
15763
15764 ElementTypeBinding:
15765 @Name: CParam
15766 @ElementType:
15767 dis:ResourceDef
15768 @ShadowContent:
15769 @@rdf:type:
15770 @@@@: c|DOMConfigurationParameter
15771 @@@For: ManakaiDOM|DOM
15772 @@rdf:type:
15773 @@@@: DISCore|Property
15774 @@@For: =ManakaiDOM|all
15775 @@For: ManakaiDOM|DOM3
15776 @@For: =ManakaiDOM|all
15777
15778 ElementTypeBinding:
15779 @Name: CParamApp
15780 @ElementType:
15781 dis:ResourceDef
15782 @ShadowContent:
15783 @@rdf:type:
15784 @@@@: c|DOMConfigurationParameterApplication
15785 @@@For: ManakaiDOM|DOM
15786 @@For: ManakaiDOM|DOM3
15787
15788 CParamApp:
15789 @QName: error-handler
15790 @c:domConfigurationParameter: c|error-handler
15791 @c:targetType: xp|ManakaiXMLParser
15792
15793 CParam:
15794 @QName: xp|ls-input-to-input-file
15795 @DOMLS:lsKey:
15796 @@@: i2i
15797 @@For: =ManakaiDOM|all
15798 @Type: ManakaiDOMLSInputToInputFile
15799 @c:targetType: xp|ManakaiXMLParser
15800 @IsSupportRequired: 1
15801 @c:isSupported: 1
15802 @enDesc:
15803 An <IF::LSInput> to Perl filehandle converter.
15804
15805 @Method:
15806 @@rdf:type: c|DOMConfigurationParameterDefaultGetter
15807 @@Param:
15808 @@@Name: name
15809 @@@Type: DOMString
15810 @@@dis:actualType: c|DOMConfigurationParameterName
15811 @@@enDesc: The parameter name.
15812 @@Return:
15813 @@@Type: ManakaiDOMLSInputToInputFile
15814 @@@enDesc:
15815 The default resolver.
15816 @@@PerlDefC:
15817 $r = sub {
15818 my ($self, $input, $errorHandler) = @_;
15819 ## As defined in DOM Level 3 LS |LSInput| interface
15820
15821 my $r = {};
15822
15823 __DEEP{
15824
15825 FH: {
15826 ## 1. |characterStream|
15827 my $v = $input-><AG::LSInput.characterStream>;
15828 if (defined $v) {
15829 $r->{filehandle} = $v;
15830 last FH;
15831 }
15832
15833 ## 2. |byteStream|
15834 $v = $input-><AG::LSInput.byteStream>;
15835 if (defined $v) {
15836 ## TODO: Support byte filehandle
15837 ## |encoding|
15838 ## TODO: How to guess?
15839 return null;
15840 }
15841
15842 ## 3. |stringData|
15843 $v = $input-><AG::LSInput.stringData>;
15844 if (defined $v) {
15845 require IO::String;
15846 $r->{filehandle} = IO::String->new ($v);
15847 last FH;
15848 }
15849
15850 ## 4. |systemId|
15851 ## TODO:
15852 ## resolve relative URI
15853 ## open
15854 ## set document_uri
15855
15856 ## 5. |publicId|
15857 ## The default resolver does not support only-|publicId| input.
15858
15859 return null;
15860 } # FH
15861
15862 DURI: {
15863 last DURI if defined $r->{document_uri};
15864
15865 my $v = $input-><AG::LSInput.systemId>;
15866 if (defined $v) {
15867 $r->{document_uri} = $v;
15868 last DURI;
15869 }
15870
15871 ## TODO: pubid -> pubid URN -> document_uri
15872 } # DURI
15873
15874 BURI: {
15875 last BURI if defined $r->{base_uri};
15876
15877 my $v = $input-><AG::LSInput.baseURI>;
15878 if (defined $v) {
15879 $r->{base_uri} = $v;
15880 last BURI;
15881 }
15882
15883 if (defined $r->{document_uri}) {
15884 $r->{base_uri} = $r->{document_uri};
15885 }
15886 } # BURI
15887
15888 }__;
15889
15890 ## ISSUE: Is |certifiedText| required by parsers?
15891
15892 return $r;
15893 };
15894 @Method:
15895 @@rdf:type: c|DOMConfigurationParameterSetter
15896 @@Param:
15897 @@@Name: name
15898 @@@Type: DOMString
15899 @@@dis:actualType: c|DOMConfigurationParameterName
15900 @@@enDesc: The parameter name.
15901 @@Param:
15902 @@@Name: value
15903 @@@Type: DOMMain|DOMUserData
15904 @@@dis:actualType: ManakaiDOMLSInputToInputFile
15905 @@@enDesc: The new value.
15906 @@Return:
15907 @@@Type: idl|void||ManakaiDOM|all
15908 @@@PerlDefC:
15909 $self->[1]->{<H::xp|ls-input-to-input-file>} = $value;
15910 @@enImplNote:
15911 Implied input processor converts non-blessed code references
15912 into a <Class::ManakaiDOMLSInputToInputFile> object.
15913 @Method:
15914 @@rdf:type: c|DOMConfigurationParameterChecker
15915 @@Param:
15916 @@@Name: name
15917 @@@Type: DOMString
15918 @@@dis:actualType: c|DOMConfigurationParameterName
15919 @@@enDesc: The parameter name.
15920 @@Param:
15921 @@@Name: value
15922 @@@Type: DOMMain|DOMUserData
15923 #@@@dis:actualType: ManakaiDOMLSInputToInputFile
15924 @@@enDesc: The new value.
15925 @@Return:
15926 @@@Type: idl|boolean||ManakaiDOM|all
15927 @@@PerlDefC:
15928 $r = UNIVERSAL::isa ($value, 'CODE') or
15929 UNIVERSAL::isa ($value, <ClassName::ManakaiDOMLSInputToInputFile>);
15930
15931 @@Test:
15932 @@@QName: cp.ls-input-to-input-file.test
15933 @@@PerlDefC:
15934 my $xp;
15935 __CODE{createParserForTest:: $xp => $xp}__;
15936 my $cfg = $xp-><AG::LSInput.domConfig>;
15937
15938 my $cp = <Q::xp|ls-input-to-input-file>;
15939
15940 $test->id ('default');
15941 my $default = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
15942 $test->assert_isa ($default,
15943 <ClassName::ManakaiDOMLSInputToInputFile>);
15944
15945 $test->id ('set');
15946 my $sub1 = sub { };
15947 $cfg-><M::c|DOMConfiguration.setParameter> ($cp => $sub1);
15948 my $sub2 = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
15949 $test->assert_isa ($sub2, <ClassName::ManakaiDOMLSInputToInputFile>);
15950 $test->assert_equals ($sub2, $sub1);
15951
15952 $test->id ('reset');
15953 $cfg-><M::c|DOMConfiguration.setParameter> ($cp => null);
15954 my $sub3 = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
15955 $test->assert_isa ($sub3, <ClassName::ManakaiDOMLSInputToInputFile>);
15956 $test->assert_equals ($sub3, $default);
15957 ##ls-input-to-input-file
15958
15959 ClsDef:
15960 @ClsQName: ManakaiDOMLSInputToInputFile
15961 @enDesc:
15962 An <Class::ManakaiDOMLSInputToInputFile> object is used to covert
15963 a <IF::LSInput> object into a Perl filehandle.
15964
15965 {ISSUE::
15966 In which module this class should be placed?
15967
15968 Better interface name?
15969 }
15970
15971 @enDesc:
15972 @@ddid: perl
15973 @@ForCheck: ManakaiDOM|ManakaiDOM
15974 @@@:
15975 For Perl binding, any parameter that accepts
15976 a <Class::ManakaiDOMLSInputToInputFile> would also accept a Perl code
15977 reference (subroutine reference). The code reference
15978 will be blessed as a <Class::ManakaiDOMLSInputToInputFile> whose
15979 <M::ManakaiDOMLSInputToInputFile.resolveLSInput> method invokes the code.
15980
15981 @ResourceDef:
15982 @@rdf:type: DISLang|InputProcessor
15983 @@rdf:type: DISLang|OutputProcessor
15984 @@PerlDef:
15985 $INPUT = bless $INPUT, <ClassName::ManakaiDOMLSInputToInputFile>
15986 if ref $INPUT eq 'CODE';
15987
15988 @Method:
15989 @@Name: resolveLSInput
15990 @@enDesc:
15991 Converts a <IF::LSInput> into a Perl filehandle.
15992 @@Param:
15993 @@@Name: input
15994 @@@Type: LSInput
15995 @@@enDesc:
15996 The input.
15997 @@Param:
15998 @@@Name: errorHandler
15999 @@@Type: c|DOMErrorHandler
16000 @@@enDesc:
16001 An error handler. If the method encounters an error
16002 or warning, it <kwd:MAY> notify it to application
16003 via this handler.
16004 @@Return:
16005 @@@Type: ManakaiDOMInputFile
16006 @@@enDesc:
16007 A <Class::ManakaiDOMInputFile> object created from <P::input>.
16008 @@@nullCase:
16009 @@@@enDesc:
16010 If the method was unable to resolve the <P::input>.
16011
16012 {ISSUE::
16013 Should we allow the method to throw exceptions?
16014 }
16015 @@@PerlDef:
16016 __DEEP{
16017 $r = $self->($self, $input, $errorHandler);
16018 }__;
16019 @@@enImplNote:
16020 Notet that the input / output processor for <CODE::$input>
16021 and return value might or might not be inserted in
16022 the <Perl::$self> code.
16023 ##LSInputToInputFile
16024
16025 ClsDef:
16026 @ClsQName: ManakaiDOMInputFile
16027 @enDesc:
16028 A set of information on the input, including filehandle.
16029
16030 @enDesc:
16031 @@ddid: perl
16032 @@ForCheck: ManakaiDOM|ManakaiDOM
16033 @@@:
16034 For Perl binding, any parameter that accepts
16035 a <Class::ManakaiDOMInputFile> would also accept a Perl hash reference.
16036 If a hash reference is given to parameter that expects
16037 a <Class::ManakaiDOMInputFile> object, then it
16038 bless the hash with the class.
16039
16040 Each attributes defined
16041 in the class is associated to the hash value with the
16042 key equals to the attribut name. Each method defined in
16043 the class will invoke the code reference retrieved
16044 from the hash by the key equals to the method name.
16045
16046 If there is no value in the hash for an attribute,
16047 then its value is <DOM::null>.
16048
16049 @ResourceDef:
16050 @@rdf:type: DISLang|InputProcessor
16051 @@rdf:type: DISLang|OutputProcessor
16052 @@PerlDef:
16053 $INPUT = bless $INPUT, <ClassName::ManakaiDOMInputFile>
16054 if ref $INPUT eq 'HASH';
16055
16056 @Attr:
16057 @@Name: filehandle
16058 @@Type: DISPerl|filehandle||ManakaiDOM|all
16059 @@enDesc:
16060 The input filehandle.
16061
16062 It <kwd:MUST> be an <Perl::open>ed (and not <Perl::close>d)
16063 filehandle. Note that
16064 it does not have to be associated with an actual file
16065 in the local file system.
16066
16067 It <kwd:MUST> return a character (rather than byte)
16068 by <Perl::getc>.
16069 @@Get:
16070 @@@PerlDef: $r = $self->{filehandle};
16071 @@Set:
16072 @@@PerlDef: $self->{filehandle} = $given;
16073
16074 @Attr:
16075 @@Name: baseURI
16076 @@enDesc:
16077 The base URI of the input.
16078
16079 It <kwd:MUST> be an absolute DOM URI or <DOM::null>.
16080 Otherwise, the result is undefined.
16081 @@Type: DOMString
16082 @@nullCase:
16083 @@@enDesc:
16084 If the base URI is not available.
16085 @@Get:
16086 @@@PerlDef: $r = $self->{base_uri};
16087 @@Set:
16088 @@@PerlDef: $self->{base_uri} = $given;
16089
16090 @Attr:
16091 @@Name: documentURI
16092 @@enDesc:
16093 The URI of the document.
16094
16095 It <kwd:MUST> be an absolute DOM URI or <DOM::null>.
16096 Otherwise, the result is undefined.
16097 @@Type: DOMString
16098 @@nullCase:
16099 @@@enDesc:
16100 If the document URI is not available.
16101 @@Get:
16102 @@@PerlDef: $r = $self->{document_uri};
16103 @@Set:
16104 @@@PerlDef: $self->{document_uri} = $given;
16105
16106 @Method:
16107 @@Name: close
16108 @@enDesc:
16109 Closes the file.
16110
16111 Since when the Perl's destructor is invoked is unreliable,
16112 this method is explicitly called when the file is no longer
16113 in use.
16114
16115 If the <Class::ManakaiDOMInputFile> is given as a hash
16116 reference and whose value for <CODE::close> is not defined,
16117 then the statement <Perl::close $filehandle> is done
16118 (where <Perl::$filehandle> is the <A::ManakaiDOMInputFile.filehandle>
16119 value).
16120 @@Return:
16121 @@@PerlDef:
16122 __DEEP{
16123 if ($self->{close}) {
16124 $self->{close}->($self);
16125 } else {
16126 close $self->{filehandle};
16127 }
16128 }__;
16129 ##ManakaiDOMInputFile
16130
16131
16132

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24