/[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.28 - (show annotations) (download)
Sat Feb 18 07:39:04 2006 UTC (18 years, 9 months ago) by wakaba
Branch: MAIN
Changes since 1.27: +84 -4 lines
++ manakai/t/ChangeLog	18 Feb 2006 07:38:55 -0000
2006-02-18  Wakaba  <wakaba@suika.fam.cx>

	* Makefile (dom-ls.t): New test.

++ manakai/lib/Message/DOM/ChangeLog	18 Feb 2006 07:38:32 -0000
2006-02-18  Wakaba  <wakaba@suika.fam.cx>

	* XMLParser.dis (ManakaiDOMXMLParser): Implements |DOMLS:ParseString10|
	feature.

	* DOMCore.dis (c:LSPARSER_NOT_FOUND_ERR): New exception type.

	* DOMLS.dis (DOMLS:ParseString): New (moved from |SimpleLS.dis|).
	(DOMImplementationLS.createLSParser): Implemented.
	(DOMImplementationLS.createLSInput): Revised.
	(LSInput): Note on relationship with |GenericLS| is added.

	* SimpleLS.dis (DOMLS:ParseString): Removed (moved to |SimpleLS.dis|).

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/17 15:06:33 $
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: DOMLS|LSFeature30
225 @f:implements: DOMLS|ParseString10
226 @enImplNote:
227 @@ddid: dtdfeature
228 @@@:
229 {TODO::
230 Once DTD validation is implemented, add <Q::f:implements>
231 for XML-DTD-feature.
232 }
233
234 @DISLang:role: gls|ParserRole
235
236 @enDesc:
237 Note that the <Class::ManakaiXMLParser> reports any XML errors
238 (syntax errors and / or well-formedness constraint errors)
239 via the <IF::DOMCore:error-handler> registered to
240 the <A::DOMLS:LSParser.domConfig> object. Each error has
241 its <A::DOMCore:DOMError.severity>, either <C::DOMCore:SEVERITY_ERROR>
242 or <C::DOMCore:SEVERITY_FATAL_ERROR>. However, their semantics
243 are slight different from the ones of <QUOTE::error> and
244 <QUOTE::fatal error> in XML; in this implemenetation,
245 <C::DOMCore:SEVERITY_ERROR> implies that the parsing process
246 can effectively be continued to detect more errors while
247 <C::DOMCore:SEVERITY_FATAL_ERROR> implies that the error
248 is serious so that the result document tree and any errors
249 might be far from the ones obtained when the error would not
250 be found.
251
252 @Test:
253 @@QName: GLSImpl.createGLSParser.LS.test
254 @@enDesc:
255 Since there is at least one implementation of the feature (i.e.
256 this class), the <M::gls|GLSImplementation.createGLSParser>
257 must not throw an exception.
258 @@PerlDef:
259 my $impl;
260 __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
261
262 my $p = $impl-><M::gls|GLSImplementation.createGLSParser>
263 ({LS => '3.0'});
264
265 $test->assert_isa ($p, <IFName::LSParser>);
266 @Test:
267 @@QName: GLSImpl.createGLSParser.ParseXMLString.test
268 @@enDesc:
269 Since there is at least one implementation of the feature (i.e.
270 this class), the <M::gls|GLSImplementation.createGLSParser>
271 must not throw an exception.
272 @@PerlDef:
273 my $impl;
274 __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
275
276 my $p = $impl-><M::gls|GLSImplementation.createGLSParser>
277 ({<Q::fe|ParseXMLString> => '1.0'});
278
279 $test->assert_not_null ($p);
280 @Test:
281 @@QName: GLSImpl.createGLSParser.LS.ParseXMLString.test
282 @@enDesc:
283 Since there is at least one implementation of the feature (i.e.
284 this class), the <M::gls|GLSImplementation.createGLSParser>
285 must not throw an exception.
286 @@PerlDef:
287 my $impl;
288 __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
289
290 my $p = $impl-><M::gls|GLSImplementation.createGLSParser>
291 ({LS => '3.0', <Q::fe|ParseXMLString> => '1.0'});
292
293 $test->assert_isa ($p, <IFName::LSParser>);
294
295 @Test:
296 @@QName: DOMImplLS.createLSParser.1.test
297 @@enDesc:
298 Since there is at least one implementation of the feature (i.e.
299 this class), the <M::gls|GLSImplementation.createGLSParser>
300 must not throw an exception.
301 @@PerlDef:
302 my $impl;
303 __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
304
305 my $p = $impl-><M::DOMLS|DOMImplementationLS.createLSParser>
306 (<C::DOMLS|DOMImplementationLS.MODE_SYNCHRONOUS>);
307 $test->assert_isa ($p, <IFName::LSParser>);
308 @enImplNote:
309 @@ddid: lsparsertext
310 @@@:
311 Future version should add test:
312 @@QName: DOMImplLS.createLSParser.2.test
313 @@enDesc:
314 Since there is at least one implementation of the feature (i.e.
315 this class), the <M::gls|GLSImplementation.createGLSParser>
316 must not throw an exception.
317 @@PerlDef:
318 my $impl;
319 __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
320
321 my $p = $impl-><M::DOMLS|DOMImplementationLS.createLSParser>
322 (<C::DOMLS|DOMImplementationLS.MODE_SYNCHRONOUS>,
323 <Q::xml-dtd:>);
324 $test->assert_isa ($p, <IFName::LSParser>);
325
326 @Test:
327 @@QName: Perl.open.utf8.strref.1.test
328 @@enDesc:
329 Does PerlIO works as intended?
330 @@PerlDef:
331 my $s = qq<\x{3001}\x0A\x{10001}>;
332 #open my $a, '<'.':utf8', \$s;
333 require IO::String;
334 my $a = IO::String->new ($s);
335 $test->assert_num_equals
336 (actual_value => ord getc $a,
337 expected_value => 0x3001);
338 $test->assert_num_equals
339 (actual_value => ord getc $a,
340 expected_value => 0x000A);
341 $test->assert_num_equals
342 (actual_value => ord getc $a,
343 expected_value => 0x10001);
344 $a->ungetc (0x10001);
345 $test->assert_num_equals
346 (actual_value => ord getc $a,
347 expected_value => 0x10001);
348 $test->assert_null (getc $a);
349 close $a;
350 @Test:
351 @@QName: Perl.open.8859.strref.2.test
352 @@enDesc:
353 Does PerlIO works as intended?
354 @@PerlDef:
355 my $s = qq<\x{0080}\x0A\x{00A9}>;
356 #open my $a, '<', \$s;
357 require IO::String;
358 my $a = IO::String->new ($s);
359 $test->assert_num_equals
360 (actual_value => ord getc $a,
361 expected_value => 0x0080);
362 $test->assert_num_equals
363 (actual_value => ord getc $a,
364 expected_value => 0x000A);
365 $test->assert_num_equals
366 (actual_value => ord getc $a,
367 expected_value => 0x00A9);
368 $a->ungetc (0x00A9);
369 $test->assert_num_equals
370 (actual_value => ord getc $a,
371 expected_value => 0x00A9);
372 $test->assert_null (getc $a);
373 close $a;
374
375 @Attr:
376 @@Name: domConfig
377 @@enDesc:
378 The configuration of the parser.
379
380 @@Get:
381 @@@Type: DOMCore|DOMConfiguration
382 @@@enDesc: The DOM configuration object.
383 @@@PerlDef:
384 __CODE{DOMCore|getConfigObject::
385 $target => $self,
386 $targetHash => $self,
387 $targetType => {<ClassName::xp|ManakaiXMLParser>},
388 $result => $r,
389 }__;
390
391 @Attr:
392 @@ForCheck: ManakaiDOM|ForClass
393 @@Name: async
394 @@enDesc:
395 Whether the parser is asynchronous or not.
396 @@Type: idl|boolean||ManakaiDOM|all
397 @@Get:
398 @@@FalseCase:
399 @@@@enDesc:
400 The parser does not in asynchronous mode.
401 @@@PerlDef: \
402 @@Test:
403 @@@QName: XMLParser.async.test
404 @@@PerlDef:
405 my $xp;
406 __CODE{createParserForTest:: $xp => $xp}__;
407
408 $test->assert_false ($xp-><AG::DOMLS|LSParser.async>);
409
410 @Attr:
411 @@ForCheck: ManakaiDOM|ForClass
412 @@Name: busy
413 @@enDesc:
414 Whether the parser is currently busy loading a document or not.
415 @@Type: idl|boolean||ManakaiDOM|all
416 @@Get:
417 @@@TrueCase:
418 @@@@enDesc:
419 The parser is currently busy.
420 @@@FalseCase:
421 @@@@enDesc:
422 The parser is not busy.
423 @@@PerlDef:
424 $r = $self->{<H::DOMLS|busy>};
425
426 @enImplNote:
427 @@ddid: abort
428 @@@:
429 {ISSUE::
430 LSParser.abort:
431
432 Is it required to support even in synchronous mode?
433 }
434
435 {TODO::
436 LSParser.filter
437 }
438
439 @ResourceDef:
440 @@QName: createParserForTest
441 @@ForCheck: ManakaiDOM|ForClass
442 @@rdf:type: DISPerl|BlockCode
443 @@PerlDef:
444 require Message::DOM::GenericLS;
445 $xp = <Class::ManakaiXMLParser>
446 ->new (<Class::gls|ManakaiGLSImplementation>->_new, '');
447
448 @Method:
449 @@ManakaiDOM:isForInternal:1
450 @@ForCheck: ManakaiDOM|ForClass
451 @@Operator: DISPerl|NewMethod
452 @@enDesc:
453 Creates a new instance of the object.
454 @@Param:
455 @@@Name: impl
456 @@@Type: gls|GLSImplementation
457 @@@enDesc:
458 The implementation from which the parser is created.
459 @@Param:
460 @@@Name: features
461 @@@Type: DOMString
462 @@@dis:actualType: f|FeaturesString
463 @@@enDesc:
464 The set of features requested for the parser.
465 @@Return:
466 @@@Type: DOMMain|DOMObject
467 @@@dis:actualType: LSParser
468 @@@enDesc:
469 The newly created parser.
470 @@@PerlDef:
471 $r = bless {
472 <H::DOMCore:implementation> => $impl,
473 }, $self;
474
475 @Method:
476 @@Name: parseURI
477 @@enDesc:
478 Parses an XML document identified by a DOM URI.
479
480 It is equivalent to <M::.parse> method with its <P::input>
481 parameter set to a <IF::LSInput> object whose
482 <A::LSInput.systemId> set to <P::uri>.
483 @@Param:
484 @@@Name: uri
485 @@@Type: DOMString
486 @@@enDesc:
487 The DOM URI of the XML document to be read.
488 @@Return:
489 @@@Type: Document
490 @@@enDesc:
491 The newly created and populated <IF::Document> node.
492 @@@dx:raises:
493 @@@@@: ManakaiDOMLS|MDOMLS_BUSY
494 @@@@enDesc:
495 If <A::LSParser.busy> is <DOM::true>.
496 @@@dx:raises:
497 @@@@@: DOMLS|PARSE_ERR
498 @@@@enDesc:
499 If the <IF::LSParser> was unable to load the document.
500 @@@PerlDef:
501 __DEEP{
502 $r = $self-><M::LSParser.parse> ({system_id => $uri});
503 }__;
504
505 @Method:
506 @@Name: parse
507 @@enDesc:
508 Parses an XML document from a resource identified
509 by a <IF::LSInput>.
510 @@Param:
511 @@@Name: input
512 @@@Type: LSInput
513 @@@enDesc:
514 The <IF::LSInput> from which the source of the document
515 is to be read.
516 @@Return:
517 @@@Type: Document
518 @@@enDesc:
519 The newly created and populated <IF::Document> node.
520 @@@dx:raises:
521 @@@@@: ManakaiDOMLS|MDOMLS_BUSY
522 @@@@enDesc:
523 If the <A::LSParser.busy> is <DOM::true>.
524 @@@dx:raises:
525 @@@@@: DOMLS|PARSE_ERR
526 @@@@enDesc:
527 If the <IF::LSParser> was unable to load the document.
528 @@@PerlDef:
529 if ($self->{<H::DOMLS|busy>}) {
530 __EXCEPTION{ManakaiDOMLS|MDOMLS_BUSY}__;
531 }
532 local $self->{<H::DOMLS|busy>} = true;
533
534 my $in;
535 __DEEP{
536 $self->{parser_cfg} = $self-><AG::LSParser.domConfig>;
537 ## Parser's |domConfig| object.
538 $self->{in_in} = $self->{parser_cfg}
539 -><M::c|DOMConfiguration.getParameter>
540 (<Q::xp|ls-input-to-input-file>);
541 $in = $self->{in_in}-><M::ManakaiDOMLSInputToInputFile.resolveLSInput>
542 ($input,
543 $self->{parser_cfg}
544 -><M::c|DOMConfiguration.getParameter>
545 ('error-handler'));
546 }__;
547 unless (defined $in) {
548 __c|ERROR{DOMLS|no-input-specified::
549 MDOMX:param-name => 'input',
550 }__;
551 __CODE{ParseError}__;
552 }
553
554 require IO::Handle;
555
556 $self->{char} = [];
557 $self->{token} = [];
558 $self->{entity} = [{
559 fh => $in-><AG::ManakaiDOMInputFile.filehandle>,
560 base_uri => $in-><AG::ManakaiDOMInputFile.baseURI>,
561 doc_uri => $in-><AG::ManakaiDOMInputFile.documentURI>,
562 line => 1,
563 column => 1,
564 pos => 0,
565 close_file => sub { $in-><M::ManakaiDOMInputFile.close> },
566 reptxt => \'',
567 is_external_entity => true,
568 }];
569 ## Entity stack.
570 $self->{location} = $self->{entity}->[-1];
571 ## Parsing location object as required by DPG.
572 ## It must always be equal to |{entity}->[-1]|.
573 $self->{entity_char} = [];
574 ## Stack for |{char}| stacks analog to |{entity}| stack.
575 $self->{entity_token} = [];
576 ## Stack for |{token}| stacks analog to |{entity}| stack.
577 $self->{xml_version} = '1.0';
578 ## Document XML version: either |1.0| or |1.1|.
579 $self->{standalone} = false;
580 ## True iff |standalone=yes| is explicitly specified.
581 $self->{has_xref} = false;
582 ## There is an unread external entity.
583 $self->{dont_process} = false;
584 ## So, don't process |ENTITY| and |ATTLIST| declarations.
585 $self->{general_entity} = {
586 lt => {is_predefined => true},
587 gt => {is_predefined => true},
588 amp => {is_predefined => true},
589 quot => {is_predefined => true},
590 apos => {is_predefined => true},
591 };
592 ## Declared general entities.
593 $self->{param_entity} = {};
594 ## Declared parameter entities.
595 $self->{attr} = {};
596 # $self->{attr}->{$element_type_name}->{$attr_name} = $attr_def
597 ## Declared attributes.
598
599 __DEEP{
600 $r = $self->{<H::c|implementation>}-><M::DOMImpl.createDocument>;
601 $self->{doc} = $r;
602 ## |Document| object.
603 CORE::delete $self->{docx};
604 ## |DocumentXDoctype| object (if necessary).
605 $self->{doc_cfg} = $r-><AG::Document.domConfig>;
606 ## |Document|'s configuration.
607 CORE::delete $self->{dtdef};
608 ## |DocumentTypeDefinition| object (if created).
609 CORE::delete $self->{dtdecl};
610 ## |DocumentTypeDeclaration| object (if created).
611
612 $r-><AS::Document.strictErrorChecking> (false);
613 ## NOTE: Any checks such as |Name| validity done by
614 ## methods on DOM nodes are disabled. It might result
615 ## in creating an ill-formed DOM tree when parser
616 ## errors are traped by |error-handler|.
617 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
618 (<Q::cfg|entity-reference-read-only> => false);
619 ## NOTE: Turn this configuration parameter off is required
620 ## because entity reference subtree is created by
621 ## the parser rather than |createEntityReference|'s
622 ## cloning. Parser's |cfg:entity-reference-read-only|
623 ## configuration parameter controls whether generated
624 ## subtree is then marked as read-only or not.
625 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
626 (<Q::cfg|clone-entity-reference-subtree> => true);
627 ## NOTE: Turn this configuration parameter on makes
628 ## entity reference subtrees in attribute default values
629 ## cloned as is into default attribute node subtrees.
630 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
631 (<Q::cfg|dtd-default-attributes> => false);
632 ## NOTE: Don't create DTD default attributes by
633 ## |createElementNS| method.
634 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
635 ('error-handler' => sub {
636 my (undef, $err) = @_;
637 return ($err-><AG::c|DOMError.severity> !=
638 <C::c|DOMError.SEVERITY_FATAL_ERROR>);
639 })
640 unless $Message::DOM::XMLParser::DEBUG;
641 ## NOTE: The default error handler in manakai |wanr|s error
642 ## description.
643
644 ## Document entity -> |Document| node
645 $self->_parse_DocumentEntity;
646
647 for (@{$self->{entity}}) {
648 $_->{close_file}->();
649 ## NOTE: There should be only the document entity.
650 }
651
652 ## Replacement tree for general |Entity| nodes
653 my @ent = values %{$self->{general_entity}};
654 for my $ent (@ent) {
655 if (exists $ent->{has_replacement_text}) {
656 my $ent_name = $ent->{name};
657 $self->{entity} = [<Code::getCopyOfEntityState::
658 $entity_type = 'general_entity',
659 $entity_name = $ent_name>];
660 $self->{location} = $self->{entity}->[-1];
661 $self->{token} = [];
662 $self->{char} = [];
663 local $ent->{is_opened} = true;
664 ## TODO: External entity support
665 $self->_parse_InternalGeneralParsedEntity ($ent->{node});
666 $ent->{node}-><AS::x|Entity.hasReplacementTree> (true);
667 $self->{entity}->[-1]->{close_file}->();
668 ## ISSUE: Should errors detected by this phase result
669 ## in |DOMLS:PARSE_ERR| exception thrown?
670 }
671 ## TODO: Read-only if configuration (for all entities)
672 }
673
674 ## Turns flags to their default value
675 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
676 (<Q::cfg|entity-reference-read-only> => null);
677 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
678 (<Q::cfg|clone-entity-reference-subtree> => null);
679 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
680 (<Q::cfg|dtd-default-attributes> => null);
681 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
682 ('error-handler' => null);
683 $r-><AS::Document.strictErrorChecking> (true);
684 }__;
685
686 @Method:
687 @@Name: shiftChar
688 @@ManakaiDOM:isForInternal:1
689 @@ForCheck: ManakaiDOM|ForClass
690 @@enDesc:
691 Returns the next character.
692 @@Return:
693 @@@Type: idl|long||ManakaiDOM|all
694 @@@enDesc:
695 The code position number of the next character, if any,
696 or <CODE::-1>.
697 @@@PerlDef:
698 if (@{$self->{char}}) {
699 $r = shift @{$self->{char}};
700 } else {
701 GETCHAR: {
702 no warnings 'closed'; # getc() on closed filehandle warning
703 my $ent = $self->{entity}->[-1];
704 my $char = getc $ent->{fh};
705
706 if (defined $char and length $char) {
707 $ent->{pos}++;
708 $r = ord $char;
709 if ($r == 0x000A) {
710 $ent->{line}++;
711 $ent->{column} = 1;
712 } elsif ($r == 0x000D) {
713 my $next_char = getc $ent->{fh};
714 if ($next_char eq "\x0A") {
715 if ($ent->{is_external_entity}) {
716 $ent->{pos}++;
717 $ent->{line}++;
718 $ent->{column} = 1;
719 $r = 0x000A; # ^ U+000D U+000A -> U+000A ^
720 } else { # Internal entity
721 $ent->{column}++;
722 ## Line number will be increased by next |shiftChar|.
723 $ent->{fh}->ungetc (0x000A);
724 #$r = 0x000D; # ^ U+000D U+000A -> U+000D ^ U+000A
725 # no change
726 }
727 } elsif ($next_char eq "\x85") {
728 if ($self->{xml_version} eq '1.1') {
729 if ($ent->{is_external_entity}) {
730 if ($ent->{no_xml11_eol}) {
731 my $location = {
732 utf32_offset => $ent->{pos} - 1,
733 line_number => $ent->{line},
734 column_number => $ent->{column},
735 };
736 my $continue = __c|ERROR{
737 xp|fatal-xml11-end-of-line-in-xml-declaration::
738 c|location => {$location},
739 xp|character-number => {$r},
740 }__;
741 unless ($continue) {
742 __CODE{ParseError}__;
743 }
744 } # no_xml11_eol
745 $ent->{pos}++;
746 $ent->{line}++;
747 $ent->{column} = 1;
748 $r = 0x000A; # ^ U+000D U+0085 -> U+000A ^
749 } else { # internal entity
750 $ent->{column}++;
751 ## Line number will be increased by next |shiftChar|.
752 $ent->{fh}->ungetc (0x0085);
753 #$r = 0x000D; # ^ U+000D U+0085 -> U+000D ^ U+0085
754 # no change
755 }
756 } else { # XML 1.0
757 ## |no_xml11_eol| will be tested later.
758 $ent->{column}++;
759 ## Line number will be increased by next |shiftChar|.
760 $ent->{fh}->ungetc (0x0085);
761 $r = 0x000A if $ent->{is_external_entity};
762 # external: ^ U+000D U+0085 -> U+000A ^ U+0085
763 # internal: ^ U+000D U+0085 -> U+000D ^ U+0085 (as is)
764 }
765 } else { # neither U+000A nor U+0085
766 $ent->{line}++;
767 $ent->{column} = 1;
768 $ent->{fh}->ungetc (ord $next_char);
769 $r = 0x000A if $ent->{is_external_entity};
770 # external: ^ U+000D _ -> U+000A ^ _
771 # internal: ^ U+000D _ -> U+000D ^ _ (as is)
772 }
773 } elsif ($r == 0x0085 or $r == 0x2028) {
774 if ($ent->{no_xml11_eol}) {
775 my $location = {
776 utf32_offset => $ent->{pos} - 1,
777 line_number => $ent->{line},
778 column_number => $ent->{column},
779 };
780 my $continue = __c|ERROR{
781 xp|fatal-xml11-end-of-line-in-xml-declaration::
782 c|location => {$location},
783 xp|character-number => {$r},
784 }__;
785 unless ($continue) {
786 __CODE{ParseError}__;
787 }
788 } # no_xml11_eol
789 $r = 0x000A if $self->{xml_version} eq '1.1' and
790 $ent->{is_external_entity};
791 ## Even in XML 1.0 it increases the line number.
792 $ent->{line}++;
793 $ent->{column} = 1;
794 } elsif (
795 not ((0x0020 <= $r and $r <= 0x007E) or
796 (0x00A0 <= $r and $r <= 0xD7FF) or
797 (0xE000 <= $r and $r <= 0xFFFD) or
798 (0x10000 <= $r and $r <= 0x10FFFF)) and
799 $r != 0x0009 and
800 not (($self->{xml_version} eq '1.0' or
801 not $ent->{is_external_entity}) and
802 (0x007F <= $r and $r <= 0x009F)) and
803 not ($self->{xml_version} eq '1.1' and
804 not $ent->{is_external_entity} and
805 0x0001 <= $r and $r <= 0x001F)
806 ) {
807 my $location = {
808 utf32_offset => $ent->{pos} - 1,
809 line_number => $ent->{line},
810 column_number => $ent->{column},
811 };
812 my $continue = __c|ERROR{xp|wf-legal-literal-character::
813 c|location => {$location},
814 xp|character-number => {$r},
815 }__;
816 unless ($continue) {
817 __CODE{ParseError}__;
818 }
819 $ent->{column}++;
820 } else { # XML |Char|
821 $ent->{column}++;
822 }
823 } else {
824 $r = -1;
825 }
826 } # GETCHAR
827 }
828
829 @Method:
830 @@ManakaiDOM:isForInternal: 1
831 @@Operator: ManakaiDOM|MUErrorHandler
832 @@enDesc:
833 When a <IF::ecore|ErrorInterface||ManakaiDOM|Perl> is <Perl::report>ed,
834 then this method is invoked.
835
836 The method calls the <cfg::DOMCore|error-handler> if the error is of
837 <IF::DOMCore|DOMError>. Otherwise, the error is re-thrown so that
838 corresponding <Perl::catch> clause, if any, can catch the error.
839 @@Param:
840 @@@Name: err
841 @@@Type: ecore|ErrorInterface||ManakaiDOM|Perl
842 @@@enDesc:
843 The reported error object.
844 @@Return:
845 @@@Type: DISPerl|Any
846 @@@enDesc:
847 If the <P::err> is a <IF::DOMCore|DOMError>, then the return value
848 of the error handler.
849
850 {NOTE:: If the error is thrown, the method never returns.
851 }
852 @@@nullCase:
853 @@@@enDesc:
854 No error handler.
855 @@@PerlDef:
856 if ($err->isa (<IFName::DOMCore|DOMError||ManakaiDOM|ManakaiDOM>)) {
857 __DEEP{
858 A: {
859 my $cfg = $self-><AG::LSParser.domConfig>;
860 my $h = $cfg-><M::DOMCore|DOMConfiguration.getParameter>
861 ('error-handler');
862 $r = $h-><M::DOMCore|DOMErrorHandler.handleError> ($err);
863 } # A
864 }__;
865 } else {
866 $err-><M::ecore|ErrorInterface||ManakaiDOM|Perl.throw>;
867 }
868
869 @DISPerl:dpgDef:
870
871 /*
872 XML Document Entity
873
874 document := prolog element *Misc
875 - *Char RestrictedChar *Char ;; [1]
876 */
877 rule DocumentEntity : standalone {
878 /*
879 prolog := XMLDecl? *Misc [doctypedecl *Misc] ;; [22]
880 */
881 ?lexmode DocumentStart;
882
883 my $doc;
884 lang:Perl {
885 $doc = $self->{doc};
886 }
887
888 ~? (XDO) {
889 ?lexmode XMLDeclarationOrPI;
890 lang:Perl {
891 $self->{entity}->[-1]->{no_xml11_eol} = true;
892 }
893 ~ (S) { // XML declaration
894 &_XMLDeclaration_ ($doc => $doc);
895 ~ (PIC2) {
896 ?lexmode DocumentProlog;
897 } else {
898 ?lexmode DocumentProlog;
899 }
900 } (NameChar) { // Processing instruction whose target begins with |xml|
901 my $target_token;
902 lang:Perl ($v => $token.value) {
903 $target_token = $token;
904 $target_token->{value} = 'xml'.$target_token->{value};
905 $self->{entity}->[-1]->{no_xml11_eol} = false;
906 }
907 ?lexmode PINmtoken;
908 ~? (Nmtoken) {
909 lang:Perl ($v => $token.value) {
910 $target_token->{value} .= $v;
911 }
912 ?lexmode PIName;
913 }
914 lang:Perl {
915 $target_token->{type} = 'Name';
916 $target_token->{location_d} += 3; # 'xml'
917 unshift @{$self->{token}}, $token;
918 $token = $target_token;
919 }
920 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
921 ~ (PIC) {
922 ?lexmode DocumentProlog;
923 } else {
924 ?lexmode DocumentProlog;
925 }
926 } else {
927 lang:Perl {
928 $self->{entity}->[-1]->{no_xml11_eol} = false;
929 }
930 }
931 } else {
932 ?lexmode 'DocumentProlog';
933 }
934
935 // *Misc
936 ~* (CDO) {
937 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
938
939 ~ (MDC) {
940 ?lexmode DocumentProlog;
941 } else {
942 ?lexmode DocumentProlog;
943 }
944 } (PIO) {
945 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
946
947 ~ (PIC) {
948 ?lexmode 'DocumentProlog';
949 } else {
950 ?lexmode DocumentProlog;
951 }
952 } (S) {
953 //
954 }
955
956 // doctypedecl
957 ~? (MDO) {
958 &_DocumentTypeDeclaration_ ($doc => $doc);
959
960 ~ (MDC) {
961 ?lexmode DocumentMisc;
962 } else {
963 ?lexmode DocumentMisc;
964 }
965 } else {
966 ?lexmode DocumentMisc;
967 }
968
969 lang:Perl {
970 $self->{doc}-><AS::Document.allDeclarationsProcessed> (true)
971 unless $self->{dont_process};
972 }
973
974 // *Misc
975 ~* (CDO) {
976 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
977
978 ~ (MDC) {
979 ?lexmode DocumentMisc;
980 } else {
981 ?lexmode DocumentMisc;
982 }
983 } (PIO) {
984 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
985
986 ~ (PIC) {
987 ?lexmode 'DocumentMisc';
988 } else {
989 ?lexmode DocumentMisc;
990 }
991 } (S) {
992 //
993 }
994
995 // Document element
996 ~ (STAGO) {
997 &Element_ ($doc => $doc, $parent => $doc)
998 : unshift-current-token;
999 ~ (TAGC) {
1000 ?lexmode DocumentEnd;
1001 } else {
1002 ?lexmode DocumentEnd;
1003 }
1004 } else {
1005 ?lexmode 'DocumentEnd';
1006 }
1007
1008 // *Misc
1009 ~* (CDO) {
1010 &_CommentDeclaration_ ($doc => $doc, $parent => $doc);
1011
1012 ~ (MDC) {
1013 ?lexmode DocumentEnd;
1014 } else {
1015 ?lexmode DocumentEnd;
1016 }
1017 } (PIO) {
1018 &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
1019 ~ (PIC) {
1020 ?lexmode 'DocumentEnd';
1021 } else {
1022 ?lexmode DocumentEnd;
1023 }
1024 } (S) {
1025 //
1026 }
1027
1028 ~ (#EOF) { }
1029 } // DocumentEntity
1030
1031 /*
1032 Internal General Parsed Entity
1033
1034 An internal general parsed entity is well-formed if its
1035 replacement text matches the production labeled |content|.
1036 */
1037 rule InternalGeneralParsedEntity ($ent) : standalone {
1038 ?lexmode ElementContent;
1039
1040 my $ns;
1041 lang:Perl {
1042 $ns = {
1043 xml => <Q::xml:>,
1044 xmlns => <Q::xmlns:>,
1045 };
1046 }
1047
1048 &content ($parent => $ent, $ns => $ns);
1049
1050 ~ (#EOF) { }
1051 } // InternalGeneralParsedEntity
1052
1053 /*
1054 XML Declaration
1055
1056 XMLDecl := '<?xml' VersionInfo
1057 [EncodingDecl]
1058 [SDDecl]
1059 [S] '?>' ;; [23]
1060
1061 NOTE: XML declaration is optional in XML 1.0
1062 while it is required in XML 1.1.
1063 */
1064 rule _XMLDeclaration_ {
1065 // ~ (XDO) { }
1066 ?lexmode XMLDeclaration;
1067 //lang:Perl {
1068 // $self->{entity}->[-1]->{no_xml11_eol} = true;
1069 //}
1070 //~ (S) { }
1071
1072 ~ (Name == 'version') {
1073 ~? (S) { }
1074 ~ (VI) { }
1075 ~? (S) { }
1076
1077 my $ver;
1078 my $bad_token;
1079
1080 ~ (LIT) {
1081 ?lexmode AttributeValueLiteral;
1082
1083 ~ (STRING) {
1084 lang:Perl ($version => $token.value) {
1085 $ver = $version;
1086 $bad_token = $token;
1087 }
1088 }
1089
1090 ~ (LIT) {
1091 ?lexmode XMLDeclaration;
1092 }
1093 } (LITA) {
1094 ?lexmode AttributeValueLiteralA;
1095
1096 ~ (STRING) {
1097 lang:Perl ($version => $token.value) {
1098 $ver = $version;
1099 $bad_token = $token;
1100 }
1101 }
1102
1103 ~ (LITA) {
1104 ?lexmode XMLDeclaration;
1105 }
1106 }
1107
1108 lang:Perl : has-error {
1109 unless ($ver eq '1.0' or $ver eq '1.1') {
1110 my $location;
1111 __CODE{xp|get-location-from-token::
1112 $token => {$bad_token},
1113 $result => {$location},
1114 }__;
1115 my $continue = __DOMCore:ERROR{xp|wf-unsupported-xml-version::
1116 DOMCore|location => {$location},
1117 xp|parent => {$self->{doc}},
1118 infoset|version => {$ver},
1119 xp|error-token => {$bad_token},
1120 }__;
1121 unless ($continue) {
1122 __CODE{ParseError}__;
1123 }
1124 }
1125 $self->{doc}-><AS::Document.xmlVersion> ($ver);
1126 $self->{xml_version} = $ver;
1127 }
1128
1129 ~? (S) { }
1130 }
1131
1132 ~? (Name == 'encoding') {
1133 ~? (S) { }
1134 ~ (VI) { }
1135 ~? (S) { }
1136
1137 my $ver;
1138 my $bad_token;
1139
1140 ~ (LIT) {
1141 ?lexmode AttributeValueLiteral;
1142
1143 ~ (STRING) {
1144 lang:Perl ($version => $token.value) {
1145 $ver = $version;
1146 $bad_token = $token;
1147 }
1148 }
1149
1150 ~ (LIT) {
1151 ?lexmode XMLDeclaration;
1152 }
1153 } (LITA) {
1154 ?lexmode AttributeValueLiteralA;
1155
1156 ~ (STRING) {
1157 lang:Perl ($version => $token.value) {
1158 $ver = $version;
1159 $bad_token = $token;
1160 }
1161 }
1162
1163 ~ (LITA) {
1164 ?lexmode XMLDeclaration;
1165 }
1166 }
1167
1168 lang:Perl : has-error {
1169 unless ($ver =~ /\A[A-Za-z][A-Za-z0-9._-]*\z/) {
1170 my $location;
1171 __CODE{xp|get-location-from-token::
1172 $token => {$bad_token},
1173 $result => {$location},
1174 }__;
1175 my $continue = __DOMCore:ERROR{xp|wf-malformed-enc-name::
1176 DOMCore|location => {$location},
1177 xp|parent => {$self->{doc}},
1178 xp|name => {$ver},
1179 xp|error-token => {$bad_token},
1180 }__;
1181 unless ($continue) {
1182 __CODE{ParseError}__;
1183 }
1184 }
1185 $self->{doc}-><AS::Document.xmlEncoding> ($ver);
1186 }
1187
1188 ~? (S) { }
1189 }
1190
1191 ~? (Name == 'standalone') {
1192 ~? (S) { }
1193 ~ (VI) { }
1194 ~? (S) { }
1195
1196 my $ver;
1197 my $bad_token;
1198
1199 ~ (LIT) {
1200 ?lexmode AttributeValueLiteral;
1201
1202 ~ (STRING) {
1203 lang:Perl ($version => $token.value) {
1204 $ver = $version;
1205 $bad_token = $token;
1206 }
1207 }
1208
1209 ~ (LIT) {
1210 ?lexmode XMLDeclaration;
1211 }
1212 } (LITA) {
1213 ?lexmode AttributeValueLiteralA;
1214
1215 ~ (STRING) {
1216 lang:Perl ($version => $token.value) {
1217 $ver = $version;
1218 $bad_token = $token;
1219 }
1220 }
1221
1222 ~ (LITA) {
1223 ?lexmode XMLDeclaration;
1224 }
1225 }
1226
1227 lang:Perl : has-error {
1228 unless ($ver eq 'yes' or $ver eq 'no') {
1229 my $location;
1230 __CODE{xp|get-location-from-token::
1231 $token => {$bad_token},
1232 $result => {$location},
1233 }__;
1234 my $continue = __DOMCore:ERROR{xp|wf-malformed-xml-standalone::
1235 DOMCore|location => {$location},
1236 xp|parent => {$self->{doc}},
1237 xp|name => {$ver},
1238 xp|error-token => {$bad_token},
1239 }__;
1240 unless ($continue) {
1241 __CODE{ParseError}__;
1242 }
1243 }
1244 if ($ver eq 'yes') {
1245 $self->{doc}-><AS::Document.xmlStandalone> (true);
1246 $self->{standalone} = true;
1247 }
1248 }
1249
1250 ~? (S) { }
1251 }
1252
1253 ~ (PIC1) {
1254 lang:Perl {
1255 $self->{entity}->[-1]->{no_xml11_eol} = false;
1256 }
1257 } else {
1258 lang:Perl {
1259 $self->{entity}->[-1]->{no_xml11_eol} = false;
1260 }
1261 }
1262
1263 // ~ (PIC2) { }
1264 } // _XMLDeclaration_
1265
1266 /*
1267 Comment Declaration
1268
1269 Comment := '<!--' *(Char - '-' / '-' (Char - '-'))
1270 '-->' ;; [15]
1271 */
1272 rule _CommentDeclaration_ ($doc, $parent) {
1273 ?lexmode 'CommentDeclaration';
1274
1275 ~? (STRING) {
1276 lang:Perl ($data => $token.value) {
1277 my $com = $doc-><M::Document.createComment> ($data);
1278 $parent-><M::Node.appendChild> ($com);
1279 }
1280 } else {
1281 lang:Perl {
1282 my $com = $doc-><M::Document.createComment> ('');
1283 $parent-><M::Node.appendChild> ($com);
1284 }
1285 }
1286
1287 ~ (COM) {
1288 ?lexmode MarkupDeclaration;
1289 } else {
1290 ?lexmode MarkupDeclaration;
1291 }
1292
1293 // ~ (MDC) { }
1294 } // _CommentDeclaration
1295
1296 rule _CommentDeclarationDTD {
1297 ?lexmode CommentDeclaration;
1298
1299 ~? (STRING) {
1300 //
1301 }
1302
1303 ~ (COM) {
1304 ?lexmode MarkupDeclaration;
1305 } else {
1306 ?lexmode MarkupDeclaration;
1307 }
1308
1309 ~ (MDC) {
1310 ?lexmode DTD;
1311 } else {
1312 ?lexmode DTD;
1313 }
1314 } // _CommentDeclarationDTD
1315
1316 /*
1317 Processing Instruction
1318
1319 PI := '<?' PITarget [S *Char - *Char '?>' *Char]
1320 '?>' ;; [16]
1321 */
1322 rule _ProcessingInstruction_ ($doc, $parent) {
1323 ?lexmode 'PIName';
1324
1325 my $pi;
1326
1327 ~ (Name) {
1328 lang:Perl ($name => $token.value) : has-error {
1329 if (lc $name eq 'xml') {
1330 my $location;
1331 __CODE{xp|get-location-from-token::
1332 $token => {$token},
1333 $result => {$location},
1334 }__;
1335 my $continue = __DOMCore:ERROR{xp|wf-pi-target-is-xml::
1336 xp|name => {$name},
1337 DOMCore|location => {$location},
1338 xp|parent => {$parent},
1339 }__;
1340 unless ($continue) {
1341 __CODE{ParseError}__;
1342 }
1343 }
1344 __CODE{checkNCName:: $name => $name}__;
1345
1346 $pi = $doc-><M::Document.createProcessingInstruction>
1347 ($name);
1348 }
1349 } else {
1350 lang:Perl {
1351 $pi = $doc-><M::Document.createProcessingInstruction> ('#INVALID');
1352 }
1353 }
1354
1355 ~? (S) {
1356 ?lexmode 'PIData';
1357
1358 my $tdata;
1359
1360 ~? (DATA) {
1361 lang:Perl ($data => $token.value) {
1362 $tdata = $data;
1363 }
1364 } else {
1365 lang:Perl {
1366 $tdata = '';
1367 }
1368 }
1369
1370 lang:Perl {
1371 $pi-><AS::Node.nodeValue> ($tdata);
1372 }
1373 }
1374
1375 lang:Perl {
1376 $parent-><M::Node.appendChild> ($pi);
1377 }
1378
1379 // ~ (PIC) { }
1380 } // _ProcessingInstruction_
1381
1382 /*
1383 Processing instruction in DTD
1384 */
1385 rule _ProcessingInstructionDTD ($doc, $doctype) {
1386 ?lexmode 'PIName';
1387
1388 my $pi;
1389
1390 ~ (Name) {
1391 lang:Perl ($name => $token.value) : has-error {
1392 if (lc $name eq 'xml') {
1393 my $location;
1394 __CODE{xp|get-location-from-token::
1395 $token => {$token},
1396 $result => {$location},
1397 }__;
1398 my $continue = __DOMCore:ERROR{xp|wf-pi-target-is-xml::
1399 xp|name => {$name},
1400 DOMCore|location => {$location},
1401 xp|parent => {$doctype},
1402 }__;
1403 unless ($continue) {
1404 __CODE{ParseError}__;
1405 }
1406 }
1407 __CODE{checkNCName:: $name => $name}__;
1408
1409 $pi = $doc-><M::Document.createProcessingInstruction>
1410 ($name);
1411 }
1412 } else {
1413 lang:Perl {
1414 $pi = $doc-><M::Document.createProcessingInstruction> ('#INVALID');
1415 }
1416 }
1417
1418 ~? (S) {
1419 ?lexmode 'PIData';
1420
1421 my $tdata;
1422
1423 ~? (DATA) {
1424 lang:Perl ($data => $token.value) {
1425 $tdata = $data;
1426 }
1427 } else {
1428 lang:Perl {
1429 $tdata = '';
1430 }
1431 }
1432
1433 lang:Perl {
1434 $pi-><AS::Node.nodeValue> ($tdata);
1435 }
1436 }
1437
1438 lang:Perl {
1439 $doctype-><M::Node.appendChild> ($pi);
1440 }
1441
1442 ~ (PIC) {
1443 ?lexmode DTD;
1444 } else {
1445 ?lexmode DTD;
1446 }
1447 } // _ProcessingInstructionDTD
1448
1449 /*
1450 Element content parsing mode
1451
1452 element := EmptyElemTag /
1453 STag content ETag ;; [39]
1454 content := (CharData / element / Reference / CDSect /
1455 PI / Comment) ;; [43]
1456 */
1457 rule Element_ ($doc, $parent, $ns) : standalone {
1458 ?lexmode 'ElementContent';
1459
1460 my $node; // Current "parent" node
1461 my $nodes; // Node stack (w/o $current_node)
1462 my $type; // Current "parent" element type QName
1463 my $types; // Element type stack (w/o $current_type)
1464 //my $ns; // Current in-scope namespace bindings
1465 my $nses; // Namespace binding stack (w/o $current_ns)
1466
1467 lang:Perl {
1468 $node = $parent;
1469 $nodes = [];
1470 $type = '';
1471 $types = [];
1472 $ns ||= {
1473 xml => <Q::xml:>,
1474 xmlns => <Q::xmlns:>,
1475 };
1476 $nses = [];
1477 }
1478
1479 ~* : name => CONTENT
1480 (CharData) {
1481 // Character data
1482 lang:Perl ($data => $token.value) {
1483 $node-><M::Node.appendChild>
1484 ($doc-><M::Document.createTextNode> ($data));
1485 }
1486 } (STAGO) {
1487 // Start tag or empty element tag
1488
1489 ?lexmode 'StartTag';
1490
1491 ~ (Name) {
1492 my $attrs;
1493 lang:Perl ($name => $token.value) : has-error {
1494 __CODE{checkQName:: $name => $name}__;
1495 push @{$types}, $type;
1496 $type = $name;
1497 $attrs = {};
1498 }
1499
1500 ~? (S) {
1501 &AttributeSpecificationList
1502 ($doc => $doc, $attrs => $attrs);
1503 }
1504
1505 my $el;
1506
1507 /*
1508 Note that this implementation does not perform
1509 attribute value tokenization (but does white space
1510 normalization common to attribute types) and
1511 construct the tree as is. DOM Level 3 Core spec
1512 is unclear on this point. With tokenization,
1513 entity references cannot be preserved.
1514
1515 The manakai Node.nodeValue and Attr.value attributes
1516 do tokenization according to attribute types.
1517 */
1518
1519 /*
1520 ISSUE: Should |xml:id| attribute be typed?
1521 */
1522
1523 lang:Perl {
1524 push @{$nses}, $ns;
1525 $ns = {%$ns};
1526
1527 ## Default attributes
1528 DA: for my $atqname (%{$self->{attr}->{$type}}) {
1529 next DA unless $self->{attr}->{$type}->{$atqname};
1530 next DA if exists $attrs->{$atqname}; # specified
1531 my $dtype = $self->{attr}->{$type}->{$atqname}
1532 -><AG::ATDef.defaultType>;
1533 next DA unless $dtype == <C::ATDef.EXPLICIT_DEFAULT> or
1534 $dtype == <C::ATDef.FIXED_DEFAULT>;
1535 $attrs->{$atqname} = {is_default => true, nodes => []};
1536 for (@{$self->{attr}->{$type}->{$atqname}
1537 -><AG::Node.childNodes>}) {
1538 push @{$attrs->{$atqname}->{nodes}},
1539 $_-><M::Node.cloneNode> (true);
1540 }
1541 }
1542
1543 my %gattr;
1544 my %lattr;
1545 for my $atqname (keys %$attrs) {
1546 my ($pfx, $lname) = split /:/, $atqname;
1547 $attrs->{$atqname}->{def} = $self->{attr}->{$type}->{$atqname};
1548 if (defined $lname) { ## Global attribute
1549 if ($pfx eq 'xmlns') {
1550 my $nsuri = $attrs->{$atqname}->{is_default}
1551 ? $attrs->{$atqname}->{def}-><AG::Node.nodeValue>
1552 : $attrs->{$atqname}->{value};
1553 if (not $attrs->{$atqname}->{is_default} and
1554 $attrs->{$atqname}->{def}) {
1555 my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;
1556 if ({
1557 <C::ATDef.ID_ATTR> => true,
1558 <C::ATDef.IDREF_ATTR> => true,
1559 <C::ATDef.IDREFS_ATTR> => true,
1560 <C::ATDef.ENTITY_ATTR> => true,
1561 <C::ATDef.ENTITIES_ATTR> => true,
1562 <C::ATDef.NMTOKEN_ATTR> => true,
1563 <C::ATDef.NMTOKENS_ATTR> => true,
1564 <C::ATDef.NOTATION_ATTR> => true,
1565 <C::ATDef.ENUMERATION_ATTR> => true,
1566 }->{$dt}) {
1567 ## Tokenization (XML 1 3.3.3)
1568 for ($nsuri) {
1569 s/^\x20+//;
1570 s/\x20+\z//;
1571 s/\x20+/ /g;
1572 }
1573 }
1574 }
1575 if ($lname eq 'xml' and
1576 $nsuri ne <Q::xml:>) {
1577 my $location;
1578 __CODE{xp|get-location-from-token::
1579 $token => $token,
1580 $result => $location,
1581 }__;
1582 my $continue = __c|ERROR{xp|nsc-reserved-prefix-xml::
1583 c|location => {$location},
1584 xp|token => {$token},
1585 infoset|prefix => {$lname},
1586 infoset|namespaceName => {$nsuri},
1587 }__;
1588 unless ($continue) {
1589 __CODE{ParseError}__;
1590 }
1591 } elsif ($lname eq 'xmlns') {
1592 my $location;
1593 __CODE{xp|get-location-from-token::
1594 $token => $token,
1595 $result => $location,
1596 }__;
1597 my $continue = __c|ERROR{xp|nsc-reserved-prefix-xmlns::
1598 c|location => {$location},
1599 xp|token => {$token},
1600 infoset|prefix => {$lname},
1601 infoset|namespaceName => {$nsuri},
1602 }__;
1603 unless ($continue) {
1604 __CODE{ParseError}__;
1605 }
1606 }
1607 if ($nsuri eq '') {
1608 if ($self->{xml_version} eq '1.0') {
1609 my $location;
1610 __CODE{xp|get-location-from-token::
1611 $token => $token,
1612 $result => $location,
1613 }__;
1614 my $continue = __c|ERROR{xp|nswf-empty-namespace-name::
1615 c|location => {$location},
1616 xp|token => {$token},
1617 infoset|namespaceName => {$nsuri},
1618 infoset|prefix => {$lname},
1619 }__;
1620 unless ($continue) {
1621 __CODE{ParseError}__;
1622 }
1623 }
1624 } elsif ($nsuri eq <Q::xml:> and
1625 $lname ne 'xml') {
1626 my $location;
1627 __CODE{xp|get-location-from-token::
1628 $token => $token,
1629 $result => $location,
1630 }__;
1631 my $continue = __c|ERROR{
1632 xp|nsc-reserved-namespace-name-xml::
1633 c|location => {$location},
1634 xp|token => {$token},
1635 infoset|prefix => {$lname},
1636 infoset|namespaceName => {$nsuri},
1637 }__;
1638 unless ($continue) {
1639 __CODE{ParseError}__;
1640 }
1641 } elsif ($nsuri eq <Q::xmlns:>) {
1642 my $location;
1643 __CODE{xp|get-location-from-token::
1644 $token => $token,
1645 $result => $location,
1646 }__;
1647 my $continue = __c|ERROR{
1648 xp|nsc-reserved-namespace-name-xmlns::
1649 c|location => {$location},
1650 xp|token => {$token},
1651 infoset|prefix => {$lname},
1652 infoset|namespaceName => {$nsuri},
1653 }__;
1654 unless ($continue) {
1655 __CODE{ParseError}__;
1656 }
1657 }
1658 $ns->{$lname} = $nsuri;
1659 delete $ns->{$lname} unless length $ns->{$lname};
1660 }
1661 $gattr{$pfx}->{$lname} = $attrs->{$atqname};
1662 } else { ## Local attribute
1663 if ($pfx eq 'xmlns') {
1664 $ns->{''} = $attrs->{xmlns}->{is_default}
1665 ? $attrs->{xmlns}->{def}-><AG::Node.nodeValue>
1666 : $attrs->{xmlns}->{value};
1667 if (not $attrs->{$atqname}->{is_default} and
1668 $attrs->{$atqname}->{def}) {
1669 my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;
1670 if ({
1671 <C::ATDef.ID_ATTR> => true,
1672 <C::ATDef.IDREF_ATTR> => true,
1673 <C::ATDef.IDREFS_ATTR> => true,
1674 <C::ATDef.ENTITY_ATTR> => true,
1675 <C::ATDef.ENTITIES_ATTR> => true,
1676 <C::ATDef.NMTOKEN_ATTR> => true,
1677 <C::ATDef.NMTOKENS_ATTR> => true,
1678 <C::ATDef.NOTATION_ATTR> => true,
1679 <C::ATDef.ENUMERATION_ATTR> => true,
1680 }->{$dt}) {
1681 ## Tokenization (XML 1 3.3.3)
1682 for ($ns->{''}) {
1683 s/^\x20+//;
1684 s/\x20+\z//;
1685 s/\x20+/ /g;
1686 }
1687 }
1688 }
1689 unless ($ns->{''}) {
1690 delete $ns->{''};
1691 } elsif ($ns->{''} eq <Q::xml:>) {
1692 my $location;
1693 __CODE{xp|get-location-from-token::
1694 $token => $token,
1695 $result => $location,
1696 }__;
1697 my $continue = __c|ERROR{
1698 xp|nsc-reserved-namespace-name-xml::
1699 c|location => {$location},
1700 xp|token => {$token},
1701 infoset|prefix => {null},
1702 infoset|namespaceName => {<Q::xml:>},
1703 }__;
1704 unless ($continue) {
1705 __CODE{ParseError}__;
1706 }
1707 } elsif ($ns->{''} eq <Q::xmlns:>) {
1708 my $location;
1709 __CODE{xp|get-location-from-token::
1710 $token => $token,
1711 $result => $location,
1712 }__;
1713 my $continue = __c|ERROR{
1714 xp|nsc-reserved-namespace-name-xmlns::
1715 c|location => {$location},
1716 xp|token => {$token},
1717 infoset|prefix => {null},
1718 infoset|namespaceName => {<Q::xmlns:>},
1719 }__;
1720 unless ($continue) {
1721 __CODE{ParseError}__;
1722 }
1723 }
1724 } else {
1725 $lattr{$pfx} = $attrs->{$atqname};
1726 }
1727 }
1728 }
1729
1730 my ($pfx, $lname) = split /:/, $type;
1731 my $nsuri;
1732 if (defined $lname) { ## Prefixed namespace
1733 if (defined $ns->{$pfx}) {
1734 $nsuri = $ns->{$pfx};
1735 } else {
1736 my $location;
1737 __CODE{xp|get-location-from-token::
1738 $token => $token,
1739 $result => $location,
1740 }__;
1741 my $continue = __c|ERROR{xp|nsc-prefix-declared::
1742 c|location => {$location},
1743 xp|token => {$token},
1744 infoset|prefix => {$pfx},
1745 xp|name => {$type},
1746 }__;
1747 unless ($continue) {
1748 __CODE{ParseError}__;
1749 }
1750 }
1751 } else { ## Default namespace
1752 $nsuri = $ns->{''};
1753 }
1754
1755 $el = $doc-><M::Document.createElementNS>
1756 ($nsuri, $type);
1757
1758 if ($attrs->{xmlns}) {
1759 my $attr = $doc-><M::Document.createAttributeNS>
1760 (<Q::xmlns:>, 'xmlns');
1761 for (@{$attrs->{xmlns}->{nodes}}) {
1762 $attr-><M::Node.appendChild> ($_);
1763 }
1764 if ($attrs->{xmlns}->{def}) {
1765 __CODE{t|setAttrType::
1766 $attr => $attr,
1767 $type => {$attrs->{xmlns}->{def}-><AG::ATDef.declaredType>},
1768 }__;
1769 }
1770 $el-><M::Element.setAttributeNodeNS> ($attr);
1771 $attr-><AS::t|Attr.specified> (false)
1772 if $attrs->{xmlns}->{is_default};
1773 }
1774
1775 for my $lname (keys %lattr) {
1776 my $attr = $doc-><M::Document.createAttributeNS>
1777 (null, $lname);
1778 for (@{$lattr{$lname}->{nodes}}) {
1779 $attr-><M::Node.appendChild> ($_);
1780 }
1781 if ($attrs->{$lname}->{def}) {
1782 __CODE{t|setAttrType::
1783 $attr => $attr,
1784 $type => {$attrs->{$lname}->{def}-><AG::ATDef.declaredType>},
1785 }__;
1786 }
1787 $el-><M::Element.setAttributeNodeNS> ($attr);
1788 $attr-><AS::t|Attr.specified> (false)
1789 if $attrs->{$lname}->{is_default};
1790 }
1791
1792 for my $pfx (keys %gattr) {
1793 LN: for my $lname (keys %{$gattr{$pfx}}) {
1794 my $name = $pfx.':'.$lname;
1795 unless (defined $ns->{$pfx}) {
1796 my $location;
1797 __CODE{xp|get-location-from-token::
1798 $token => $token,
1799 $result => $location,
1800 }__;
1801 my $continue = __c|ERROR{xp|nsc-prefix-declared::
1802 c|location => {$location},
1803 xp|token => {$token},
1804 xp|name => {$name},
1805 infoset|prefix => {$pfx},
1806 }__;
1807 unless ($continue) {
1808 __CODE{ParseError}__;
1809 }
1810 }
1811 my $attr = $el-><M::Element.getAttributeNodeNS>
1812 ($ns->{$pfx}, $lname);
1813 if ($attr) {
1814 my $another_name = $attr-><AG::Node.nodeName>;
1815 if ($name ne $another_name) {
1816 my $location;
1817 __CODE{xp|get-location-from-token::
1818 $token => $token,
1819 $result => $location,
1820 }__;
1821 my $continue = __c|ERROR{
1822 xp|nswf-unique-att-spec-expanded-name::
1823 c|location => {$location},
1824 xp|token => {$token},
1825 xp|another-attribute-name => {$another_name},
1826 xp|name => {$name},
1827 infoset|namespaceName => {$ns->{$pfx}},
1828 infoset|localName => {$lname},
1829 }__;
1830 unless ($continue) {
1831 __CODE{ParseError}__;
1832 }
1833 unless ($attr-><AG::t|Attr.specified>) {
1834 ## It is a default attribute
1835 $attr = $doc-><M::Document.createAttributeNS>
1836 ($ns->{$pfx}, $name);
1837 } else {
1838 ## It is a specified attribute
1839 next LN;
1840 }
1841 } else { ## There is default attribute
1842 $attr = $doc-><M::Document.createAttributeNS>
1843 ($ns->{$pfx}, $name);
1844 }
1845 } else {
1846 $attr = $doc-><M::Document.createAttributeNS>
1847 ($ns->{$pfx}, $name);
1848 }
1849 for (@{$gattr{$pfx}->{$lname}->{nodes}}) {
1850 $attr-><M::Node.appendChild> ($_);
1851 }
1852 if ($gattr{$pfx}->{$lname}->{def}) {
1853 __CODE{t|setAttrType::
1854 $attr => $attr,
1855 $type => {$gattr{$pfx}->{$lname}
1856 ->{def}-><AG::ATDef.declaredType>},
1857 }__;
1858 }
1859 $el-><M::Element.setAttributeNodeNS> ($attr);
1860 $attr-><AS::t|Attr.specified> (false)
1861 if $gattr{$pfx}->{$lname}->{is_default};
1862 } # PFX
1863 }
1864
1865 $node-><M::Node.appendChild> ($el);
1866 }
1867
1868 ~ (TAGC) {
1869 lang:Perl {
1870 push @{$nodes}, $node;
1871 $node = $el;
1872 }
1873 ?lexmode ElementContent;
1874 } (NESTC) {
1875 my $is_docel;
1876 lang:Perl {
1877 $ns = pop @{$nses};
1878 $type = pop @{$types};
1879 $is_docel = (@{$types} == 0);
1880 }
1881
1882 if-true ($is_docel) {
1883 return;
1884 }
1885
1886 ~ (TAGC) {
1887 ?lexmode ElementContent;
1888 } else {
1889 ?lexmode ElementContent;
1890 }
1891 } else {
1892 ?lexmode ElementContent;
1893 }
1894 } else {
1895 ?lexmode ElementContent;
1896 }
1897
1898 } (ETAGO) {
1899 // End tag
1900
1901 ?lexmode 'EndTag';
1902
1903 my $is_docel;
1904
1905 ~ (Name) {
1906 // No NCName & QName check (it must match to start-tag)
1907 lang:Perl ($name => $token.value) : has-error {
1908 if ($name eq $type) {
1909 $type = pop @{$types};
1910 if ($type eq '') {
1911 $is_docel = true;
1912 }
1913 $node = pop @{$nodes};
1914 $ns = pop @{$nses};
1915 } else {
1916 my $location;
1917 __CODE{xp|get-location-from-token::
1918 $token => $token,
1919 $result => $location,
1920 }__;
1921 my $continue = __DOMCore:ERROR{xp|wf-element-type-match::
1922 DOMCore:location => {$location},
1923 xp|token => {$token},
1924 xp|expected-element-type => {$type},
1925 xp|actual-element-type => {$name},
1926 xp|node => {$node},
1927 }__;
1928 unless ($continue) {
1929 __CODE{ParseError}__;
1930 }
1931 }
1932 }
1933 }
1934
1935 ~? (S) { }
1936
1937 if-true ($is_docel) {
1938 lang:Perl : has-error {
1939 if (@{$types}) {
1940 my $location;
1941 __CODE{xp|get-location-from-token::
1942 $token => $token,
1943 $result => $location,
1944 }__;
1945 for my $type (reverse @{$types}) {
1946 my $continue = __DOMCore:ERROR{xp|wf-no-end-tag::
1947 DOMCore:location => {$location},
1948 xp|token => {$token},
1949 xp|expected-element-type => {$type},
1950 xp|node => {$node},
1951 }__;
1952 unless ($continue) {
1953 __CODE{ParseError}__;
1954 }
1955 $node = shift @{$nodes};
1956 }
1957 }
1958 }
1959 return;
1960 }
1961
1962 ~ (TAGC) {
1963 ?lexmode ElementContent;
1964 } else {
1965 ?lexmode 'ElementContent';
1966 }
1967
1968 } (HCRO) {
1969 &_HexadecimalCharacterReference_
1970 ($doc => $doc, $parent => $node);
1971
1972 ~ (REFC) {
1973 ?lexmode 'ElementContent';
1974 } else {
1975 ?lexmode ElementContent;
1976 }
1977 } (CRO) {
1978 &_NumericCharacterReference_
1979 ($doc => $doc, $parent => $node);
1980
1981 ~ (REFC) {
1982 ?lexmode 'ElementContent';
1983 } else {
1984 ?lexmode ElementContent;
1985 }
1986 } (ERO) {
1987 &_GeneralEntityReferenceEC
1988 ($doc => $doc, $parent => $node, $ns => $ns);
1989 } (CDO) {
1990 &_CommentDeclaration_ ($doc => $doc, $parent => $node);
1991
1992 ~ (MDC) {
1993 ?lexmode ElementContent;
1994 } else {
1995 ?lexmode ElementContent;
1996 }
1997 } (CDSO) {
1998 &_CDATASection_ ($doc => $doc, $parent => $node);
1999
2000 ~ (MSE) {
2001 ?lexmode 'ElementContent';
2002 } else {
2003 ?lexmode ElementContent;
2004 }
2005 } (PIO) {
2006 &_ProcessingInstruction_ ($doc => $doc, $parent => $node);
2007
2008 ~ (PIC) {
2009 ?lexmode 'ElementContent';
2010 } else {
2011 ?lexmode ElementContent;
2012 }
2013 }
2014
2015 ~ (#NONE) { }
2016 } // Element_
2017
2018 /*
2019 content := [CharData]
2020 *((element / Reference / CDSect / PI / Comment) [CharData])
2021 */
2022 rule content ($parent, $ns) {
2023 // ?lexmode ElementContent;
2024
2025 my $doc;
2026 lang:Perl {
2027 $doc = $self->{doc};
2028 }
2029
2030 ~* (CharData) {
2031 lang:Perl ($data => $token.value) {
2032 $parent-><M::Node.appendChild>
2033 ($self->{doc}-><M::Document.createTextNode> ($data));
2034 }
2035 } (STAGO) {
2036 &Element_ ($doc => $doc, $parent => $parent, $ns => $ns)
2037 : unshift-current-token;
2038 ~ (TAGC) {
2039 ?lexmode ElementContent;
2040 } else {
2041 ?lexmode ElementContent;
2042 }
2043 } (HCRO) {
2044 &_HexadecimalCharacterReference_
2045 ($doc => $doc, $parent => $parent);
2046
2047 ~ (REFC) {
2048 ?lexmode 'ElementContent';
2049 } else {
2050 ?lexmode ElementContent;
2051 }
2052 } (CRO) {
2053 &_NumericCharacterReference_
2054 ($doc => $doc, $parent => $parent);
2055
2056 ~ (REFC) {
2057 ?lexmode 'ElementContent';
2058 } else {
2059 ?lexmode ElementContent;
2060 }
2061 } (ERO) {
2062 &_GeneralEntityReferenceEC
2063 ($doc => $doc, $parent => $parent, $ns => $ns);
2064 } (CDO) {
2065 &_CommentDeclaration_ ($doc => $doc, $parent => $parent);
2066
2067 ~ (MDC) {
2068 ?lexmode ElementContent;
2069 } else {
2070 ?lexmode ElementContent;
2071 }
2072 } (CDSO) {
2073 &_CDATASection_ ($doc => $doc, $parent => $parent);
2074
2075 ~ (MSE) {
2076 ?lexmode 'ElementContent';
2077 } else {
2078 ?lexmode ElementContent;
2079 }
2080 } (PIO) {
2081 &_ProcessingInstruction_ ($doc => $doc, $parent => $parent);
2082
2083 ~ (PIC) {
2084 ?lexmode 'ElementContent';
2085 } else {
2086 ?lexmode ElementContent;
2087 }
2088 }
2089 } // content
2090
2091 rule AttributeSpecificationList ($doc, $attrs)
2092 : standalone
2093 {
2094 ?lexmode 'StartTag';
2095
2096 my $i;
2097 lang:Perl {
2098 $i = 0;
2099 }
2100
2101 ~* (Name) {
2102 my $atqname;
2103 lang:Perl ($name => $token.value) : has-error {
2104 __CODE{checkQName:: $name => $name}__;
2105 $atqname = $name;
2106 }
2107
2108 my $vals;
2109 lang:Perl : has-error {
2110 if ($attrs->{$atqname}) {
2111 my $location;
2112 __CODE{xp|get-location-from-token::
2113 $token => $token,
2114 $result => $location,
2115 }__;
2116 my $continue = __DOMCore:ERROR{xp|wf-unique-att-spec::
2117 DOMCore:location => {$location},
2118 xp|token => {$token},
2119 xp|name => {$atqname},
2120 }__;
2121 unless ($continue) {
2122 __CODE{ParseError}__;
2123 }
2124 }
2125
2126 $vals = $attrs->{$atqname} = {
2127 nodes => [],
2128 value => '',
2129 index => $i++,
2130 };
2131 }
2132
2133 ~? (S) { }
2134 ~ (VI) { }
2135 ~? (S) { }
2136
2137 ~ (LIT) {
2138 &_AttributeValueSpecification_
2139 ($doc => $doc, $vals => $vals);
2140
2141 ~ (LIT) {
2142 ?lexmode StartTag;
2143 } else {
2144 ?lexmode StartTag;
2145 }
2146 } (LITA) {
2147 &_AttributeValueSpecificationA_
2148 ($doc => $doc, $vals => $vals);
2149
2150 ~ (LITA) {
2151 ?lexmode StartTag;
2152 } else {
2153 ?lexmode StartTag;
2154 }
2155 }
2156 } (S) : separator : terminator? { }
2157 } // AttributeSpecificationList
2158
2159 rule _AttributeValueSpecification_ ($doc, $vals) {
2160 // ~ (LIT) { }
2161 ?lexmode 'AttributeValueLiteral';
2162
2163 ~* (STRING) {
2164 lang:Perl ($value => $token.value) {
2165 $value =~ s/[\x09\x0A\x0D]/ /g;
2166 my $text = $doc-><M::Document.createTextNode> ($value);
2167 push @{$vals->{nodes}}, $text;
2168 $vals->{value} .= $value;
2169 }
2170 } (HCRO) {
2171 &_HexadecimalCharacterReferenceV_
2172 ($doc => $doc, $vals => $vals);
2173
2174 ~ (REFC) {
2175 ?lexmode AttributeValueLiteral;
2176 } else {
2177 ?lexmode AttributeValueLiteral;
2178 }
2179 } (CRO) {
2180 &_NumericCharacterReferenceV_
2181 ($doc => $doc, $vals => $vals);
2182
2183 ~ (REFC) {
2184 ?lexmode AttributeValueLiteral;
2185 } else {
2186 ?lexmode AttributeValueLiteral;
2187 }
2188 } (ERO) {
2189 // TODO: Attribute value normalization
2190 &_GeneralEntityReferenceV_
2191 ($doc => $doc, $vals => $vals);
2192
2193 ~ (REFC) {
2194 ?lexmode AttributeValueLiteral;
2195 } else {
2196 ?lexmode AttributeValueLiteral;
2197 }
2198 }
2199
2200 // ~ (LIT) { } (LITA) { }
2201 } // _AttributeValueSpecification_
2202
2203 rule _AttributeValueSpecificationA_ ($doc, $vals) {
2204 // ~ (LITA) { }
2205 ?lexmode 'AttributeValueLiteralA';
2206
2207 ~* (STRING) {
2208 lang:Perl ($value => $token.value) {
2209 $value =~ s/[\x09\x0A\x0D]/ /g;
2210 my $text = $doc-><M::Document.createTextNode> ($value);
2211 push @{$vals->{nodes}}, $text;
2212 $vals->{value} .= $value;
2213 }
2214 } (HCRO) {
2215 &_HexadecimalCharacterReferenceV_
2216 ($doc => $doc, $vals => $vals);
2217
2218 ~ (REFC) {
2219 ?lexmode AttributeValueLiteralA;
2220 } else {
2221 ?lexmode AttributeValueLiteralA;
2222 }
2223 } (CRO) {
2224 &_NumericCharacterReferenceV_
2225 ($doc => $doc, $vals => $vals);
2226
2227 ~ (REFC) {
2228 ?lexmode AttributeValueLiteralA;
2229 } else {
2230 ?lexmode AttributeValueLiteralA;
2231 }
2232 } (ERO) {
2233 // TODO: Attribute value normalization
2234 &_GeneralEntityReferenceV_
2235 ($doc => $doc, $vals => $vals);
2236
2237 ~ (REFC) {
2238 ?lexmode AttributeValueLiteralA;
2239 } else {
2240 ?lexmode AttributeValueLiteralA;
2241 }
2242 }
2243
2244 // ~ (LITA) { }
2245 } // _AttributeValueSpecificationA_
2246
2247 /*
2248 Parsing replacement text of an entity referenced in
2249 an attribute value specification.
2250 */
2251 rule AttributeValueLiteralE_ ($parent, $vals)
2252 : recursive
2253 {
2254 // ?lexmode AttributeValueLiteralE;
2255
2256 ~* (STRING) {
2257 lang:Perl ($value => $token.value) {
2258 $value =~ s/[\x09\x0A\x0D]/ /g;
2259 my $text = $self->{doc}-><M::Document.createTextNode> ($value);
2260 $parent-><M::Node.appendChild> ($text);
2261 $vals->{value} .= $value;
2262 }
2263 } (HCRO) {
2264 &_HexadecimalCharacterReferenceAE_
2265 ($parent => $parent, $vals => $vals);
2266
2267 ~ (REFC) {
2268 ?lexmode AttributeValueLiteralE;
2269 } else {
2270 ?lexmode AttributeValueLiteralE;
2271 }
2272 } (CRO) {
2273 &_NumericCharacterReferenceAE_
2274 ($parent => $parent, $vals => $vals);
2275
2276 ~ (REFC) {
2277 ?lexmode AttributeValueLiteralE;
2278 } else {
2279 ?lexmode AttributeValueLiteralE;
2280 }
2281 } (ERO) {
2282 &_GeneralEntityReferenceAE_ ($parent => $parent, $vals => $vals);
2283
2284 ~ (REFC) {
2285 ?lexmode AttributeValueLiteralE;
2286 } else {
2287 ?lexmode AttributeValueLiteralE;
2288 }
2289 } (#INVALID == '<') {
2290 lang:Perl : has-error {
2291 my $location;
2292 __CODE{xp|get-location-from-token::
2293 $token => $token,
2294 $result => $location,
2295 }__;
2296 my $continue = __DOMCore:ERROR{xp|wf-no-lt-in-attribute-values::
2297 c|location => {$location},
2298 xp|token => {$token},
2299 }__;
2300 unless ($continue) {
2301 __CODE{ParseError}__;
2302 }
2303
2304 my $text = $self->{doc}-><M::Document.createTextNode> ('<');
2305 $parent-><M::Node.appendChild> ($text);
2306 $vals->{value} .= '<';
2307 }
2308 }
2309
2310 // ~ (#EOF) { }
2311 } // AttributeValueLiteralE_
2312
2313 /*
2314 CDATA Section Content Parsing Mode
2315 */
2316 rule _CDATASection_ ($doc, $parent) {
2317 ?lexmode 'CDATASectionContent';
2318
2319 my $cdata;
2320
2321 ~? (CData) {
2322 lang:Perl ($data => $token.value) {
2323 $cdata = $data;
2324 }
2325 } else {
2326 lang:Perl {
2327 $cdata = '';
2328 }
2329 }
2330
2331 lang:Perl {
2332 my $cdsect = $doc-><M::Document.createCDATASection>
2333 ($cdata);
2334 $parent-><M::Node.appendChild> ($cdsect);
2335 }
2336
2337 // ~ (MSE) { }
2338 } // _CDATASection_
2339
2340 rule _NumericCharacterReference_ ($doc, $parent) {
2341 ?lexmode 'NumericCharacterReference';
2342
2343 ~ (NUMBER) {
2344 lang:Perl ($num => $token.value) : has-error {
2345 $num += 0;
2346 unless (
2347 ($self->{xml_version} eq '1.0' and
2348 ((0x0020 <= $num and $num <= 0xD7FF) or
2349 (0xE000 <= $num and $num <= 0xFFFD) or
2350 (0x10000 <= $num and $num <= 0x10FFFF) or
2351 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2352 ($self->{xml_version} eq '1.1' and
2353 ((0x0001 <= $num and $num <= 0xD7FF) or
2354 (0xE000 <= $num and $num <= 0xFFFD) or
2355 (0x10000 <= $num and $num <= 0x10FFFF)))
2356 ) {
2357 my $location;
2358 __CODE{xp|get-location-from-token::
2359 $token => $token,
2360 $result => $location,
2361 }__;
2362 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2363 DOMCore:location => {$location},
2364 xp|token => {$token},
2365 xp|character-number => {$num},
2366 xp|parent => {$parent},
2367 }__;
2368 unless ($continue) {
2369 __CODE{ParseError}__;
2370 }
2371 }
2372 my $ncr = $doc-><M::Document.createTextNode> (chr $num);
2373 $parent-><M::Node.appendChild> ($ncr);
2374 }
2375 }
2376
2377 // ~ (REFC) { }
2378 } // _NumericCharacterReference_
2379
2380 rule _NumericCharacterReferenceV_ ($doc, $vals) {
2381 ?lexmode 'NumericCharacterReference';
2382
2383 ~ (NUMBER) {
2384 lang:Perl ($num => $token.value) : has-error {
2385 $num += 0;
2386 unless (
2387 ($self->{xml_version} eq '1.0' and
2388 ((0x0020 <= $num and $num <= 0xD7FF) or
2389 (0xE000 <= $num and $num <= 0xFFFD) or
2390 (0x10000 <= $num and $num <= 0x10FFFF) or
2391 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2392 ($self->{xml_version} eq '1.1' and
2393 ((0x0001 <= $num and $num <= 0xD7FF) or
2394 (0xE000 <= $num and $num <= 0xFFFD) or
2395 (0x10000 <= $num and $num <= 0x10FFFF)))
2396 ) {
2397 my $location;
2398 __CODE{xp|get-location-from-token::
2399 $token => $token,
2400 $result => $location,
2401 }__;
2402 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2403 DOMCore:location => {$location},
2404 xp|token => {$token},
2405 xp|character-number => {$num},
2406 }__;
2407 unless ($continue) {
2408 __CODE{ParseError}__;
2409 }
2410 }
2411 my $ncr = $doc-><M::Document.createTextNode>
2412 (my $char = chr $num);
2413 push @{$vals->{nodes}}, $ncr;
2414 $vals->{value} .= $char;
2415 }
2416 }
2417
2418 // ~ (REFC) { }
2419 } // _NumericCharacterReferenceV_
2420
2421 /*
2422 Numeric character reference in the replacement text
2423 of the entity referenced in an attribute value specification
2424 */
2425 rule _NumericCharacterReferenceAE_ ($parent, $vals)
2426 {
2427 ?lexmode NumericCharacterReference;
2428
2429 ~ (NUMBER) {
2430 lang:Perl ($num => $token.value) : has-error {
2431 $num += 0;
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 }__;
2453 unless ($continue) {
2454 __CODE{ParseError}__;
2455 }
2456 }
2457 my $ncr = $self->{doc}-><M::Document.createTextNode>
2458 (my $char = chr $num);
2459 $parent-><M::Node.appendChild> ($ncr);
2460 $vals->{value} .= $char;
2461 }
2462 }
2463
2464 // ~ (REFC) { }
2465 } // _NumericCharacterReferenceAE_
2466
2467 rule _NumericCharacterReferenceEV_ ($vals)
2468 {
2469 ?lexmode 'NumericCharacterReference';
2470
2471 ~ (NUMBER) {
2472 lang:Perl ($num => $token.value) : has-error {
2473 $num += 0;
2474 unless (
2475 ($self->{xml_version} eq '1.0' and
2476 ((0x0020 <= $num and $num <= 0xD7FF) or
2477 (0xE000 <= $num and $num <= 0xFFFD) or
2478 (0x10000 <= $num and $num <= 0x10FFFF) or
2479 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2480 ($self->{xml_version} eq '1.1' and
2481 ((0x0001 <= $num and $num <= 0xD7FF) or
2482 (0xE000 <= $num and $num <= 0xFFFD) or
2483 (0x10000 <= $num and $num <= 0x10FFFF)))
2484 ) {
2485 my $location;
2486 __CODE{xp|get-location-from-token::
2487 $token => $token,
2488 $result => $location,
2489 }__;
2490 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2491 DOMCore:location => {$location},
2492 xp|token => {$token},
2493 xp|character-number => {$num},
2494 }__;
2495 unless ($continue) {
2496 __CODE{ParseError}__;
2497 }
2498 }
2499 push @{$vals}, chr $num;
2500 }
2501 }
2502
2503 // ~ (REFC) { }
2504 } // _NumericCharacterReferenceEV_
2505
2506 rule _HexadecimalCharacterReference_ ($doc, $parent) {
2507 ?lexmode 'HexadecimalCharacterReference';
2508
2509 ~ (Hex) {
2510 lang:Perl ($v => $token.value) : has-error {
2511 my $num = hex $v;
2512 unless (
2513 ($self->{xml_version} eq '1.0' and
2514 ((0x0020 <= $num and $num <= 0xD7FF) or
2515 (0xE000 <= $num and $num <= 0xFFFD) or
2516 (0x10000 <= $num and $num <= 0x10FFFF) or
2517 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2518 ($self->{xml_version} eq '1.1' and
2519 ((0x0001 <= $num and $num <= 0xD7FF) or
2520 (0xE000 <= $num and $num <= 0xFFFD) or
2521 (0x10000 <= $num and $num <= 0x10FFFF)))
2522 ) {
2523 my $location;
2524 __CODE{xp|get-location-from-token::
2525 $token => $token,
2526 $result => $location,
2527 }__;
2528 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2529 DOMCore:location => {$location},
2530 xp|token => {$token},
2531 xp|character-number => {$num},
2532 xp|parent => {$parent},
2533 }__;
2534 unless ($continue) {
2535 __CODE{ParseError}__;
2536 }
2537 }
2538 my $ncr = $doc-><M::Document.createTextNode>
2539 (chr $num);
2540 $parent-><M::Node.appendChild> ($ncr);
2541 }
2542 }
2543
2544 // ~ (REFC) { }
2545 } // _HexadecimalCharacterReference_
2546
2547 rule _HexadecimalCharacterReferenceV_ ($doc, $vals) {
2548 ?lexmode 'HexadecimalCharacterReference';
2549
2550 ~ (Hex) {
2551 lang:Perl ($v => $token.value) : has-error {
2552 my $num = hex $v;
2553 unless (
2554 ($self->{xml_version} eq '1.0' and
2555 ((0x0020 <= $num and $num <= 0xD7FF) or
2556 (0xE000 <= $num and $num <= 0xFFFD) or
2557 (0x10000 <= $num and $num <= 0x10FFFF) or
2558 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2559 ($self->{xml_version} eq '1.1' and
2560 ((0x0001 <= $num and $num <= 0xD7FF) or
2561 (0xE000 <= $num and $num <= 0xFFFD) or
2562 (0x10000 <= $num and $num <= 0x10FFFF)))
2563 ) {
2564 my $location;
2565 __CODE{xp|get-location-from-token::
2566 $token => $token,
2567 $result => $location,
2568 }__;
2569 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2570 DOMCore:location => {$location},
2571 xp|token => {$token},
2572 xp|character-number => {$num},
2573 }__;
2574 unless ($continue) {
2575 __CODE{ParseError}__;
2576 }
2577 }
2578 my $ncr = $doc-><M::Document.createTextNode>
2579 (my $char = chr $num);
2580 push @{$vals->{nodes}}, $ncr;
2581 $vals->{value} .= $char;
2582 }
2583 }
2584
2585 // ~ (REFC) { }
2586 } // _HexadecimalCharacterReferenceV_
2587
2588 /*
2589 Hexadecimal character reference in the replacement text
2590 of the entity referenced in an attribute value literal
2591 */
2592 rule _HexadecimalCharacterReferenceAE_ ($parent, $vals)
2593 {
2594 ?lexmode HexadecimalCharacterReference;
2595
2596 ~ (Hex) {
2597 lang:Perl ($v => $token.value) : has-error {
2598 my $num = hex $v;
2599 unless (
2600 ($self->{xml_version} eq '1.0' and
2601 ((0x0020 <= $num and $num <= 0xD7FF) or
2602 (0xE000 <= $num and $num <= 0xFFFD) or
2603 (0x10000 <= $num and $num <= 0x10FFFF) or
2604 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2605 ($self->{xml_version} eq '1.1' and
2606 ((0x0001 <= $num and $num <= 0xD7FF) or
2607 (0xE000 <= $num and $num <= 0xFFFD) or
2608 (0x10000 <= $num and $num <= 0x10FFFF)))
2609 ) {
2610 my $location;
2611 __CODE{xp|get-location-from-token::
2612 $token => $token,
2613 $result => $location,
2614 }__;
2615 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2616 DOMCore:location => {$location},
2617 xp|token => {$token},
2618 xp|character-number => {$num},
2619 }__;
2620 unless ($continue) {
2621 __CODE{ParseError}__;
2622 }
2623 }
2624 my $ncr = $self->{doc}-><M::Document.createTextNode>
2625 (my $char = chr $num);
2626 $parent-><M::Node.appendChild> ($ncr);
2627 $vals->{value} .= $char;
2628 }
2629 }
2630
2631 // ~ (REFC) { }
2632 } // _HexadecimalCharacterReferenceAE_
2633
2634 rule _HexadecimalCharacterReferenceEV_ ($vals) {
2635 ?lexmode HexadecimalCharacterReference;
2636
2637 ~ (Hex) {
2638 lang:Perl ($v => $token.value) : has-error {
2639 my $num = hex $v;
2640 unless (
2641 ($self->{xml_version} eq '1.0' and
2642 ((0x0020 <= $num and $num <= 0xD7FF) or
2643 (0xE000 <= $num and $num <= 0xFFFD) or
2644 (0x10000 <= $num and $num <= 0x10FFFF) or
2645 $num == 0x9 or $num == 0xA or $num == 0xD)) or
2646 ($self->{xml_version} eq '1.1' and
2647 ((0x0001 <= $num and $num <= 0xD7FF) or
2648 (0xE000 <= $num and $num <= 0xFFFD) or
2649 (0x10000 <= $num and $num <= 0x10FFFF)))
2650 ) {
2651 my $location;
2652 __CODE{xp|get-location-from-token::
2653 $token => $token,
2654 $result => $location,
2655 }__;
2656 my $continue = __DOMCore:ERROR{xp|wf-legal-character::
2657 DOMCore:location => {$location},
2658 xp|token => {$token},
2659 xp|character-number => {$num},
2660 }__;
2661 unless ($continue) {
2662 __CODE{ParseError}__;
2663 }
2664 }
2665 push @{$vals}, chr $num;
2666 }
2667 }
2668
2669 // ~ (REFC) { }
2670 } // _HexadecimalCharacterReferenceEV_
2671
2672 /*
2673 General entity reference in element's content
2674 */
2675 rule _GeneralEntityReferenceEC ($doc, $parent, $ns)
2676 : recursive
2677 {
2678 ?lexmode 'EntityReference';
2679
2680 ~ (Name == 'lt') {
2681 lang:Perl {
2682 $parent-><M::Node.appendChild>
2683 ($self->{doc}-><M::Document.createTextNode> ('<'));
2684 }
2685 } (Name == 'gt') {
2686 lang:Perl {
2687 $parent-><M::Node.appendChild>
2688 ($self->{doc}-><M::Document.createTextNode> ('>'));
2689 }
2690 } (Name == 'amp') {
2691 lang:Perl {
2692 $parent-><M::Node.appendChild>
2693 ($self->{doc}-><M::Document.createTextNode> ('&'));
2694 }
2695 } (Name == 'quot') {
2696 lang:Perl {
2697 $parent-><M::Node.appendChild>
2698 ($self->{doc}-><M::Document.createTextNode> ('"'));
2699 }
2700 } (Name == 'apos') {
2701 lang:Perl {
2702 $parent-><M::Node.appendChild>
2703 ($self->{doc}-><M::Document.createTextNode> ("'"));
2704 }
2705 } (Name) {
2706 my $er;
2707 lang:Perl ($name => $token.value) : has-error {
2708 __CODE{checkNCName:: $name => $name}__;
2709
2710 $er = $doc-><M::Document.createEntityReference>
2711 ($name);
2712 $er-><AS::Node.textContent> ('');
2713 ## NOTE: When document entity (and entities referenced directly
2714 ## or indirectly from it) is parsed, no general entity
2715 ## node have its replacement tree. During general
2716 ## entity node collection construction, however,
2717 ## some entity node has replacement tree.
2718 $parent-><M::Node.appendChild> ($er);
2719
2720 my $ent = $self->{general_entity}->{$name};
2721 if (not $ent) { # no entity declaration
2722 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2723 my $location;
2724 __CODE{xp|get-location-from-token::
2725 $token => {$token},
2726 $result => {$location},
2727 }__;
2728 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2729 xp|error-token => {$token},
2730 c|location => {$location},
2731 xp|name => {$name},
2732 }__;
2733 unless ($continue) {
2734 __CODE{ParseError}__;
2735 }
2736 } # Otherwise VC error
2737 push @{$self->{entity}}, <Code::getEmptyEntityState::
2738 $name = $name>;
2739 $er-><AS::x|EntityReference.isExpanded> (false);
2740
2741 } else { # there IS entity declaration
2742 if (($self->{standalone} or not $self->{has_xref}) and
2743 $ent->{is_externally_declared} and
2744 not $self->{entity}->[-1]->{is_externally_declared}) {
2745 my $location;
2746 __CODE{xp|get-location-from-token::
2747 $token => {$token},
2748 $result => {$location},
2749 }__;
2750 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2751 xp|error-token => {$token},
2752 c|location => {$location},
2753 xp|name => {$name},
2754 }__;
2755 unless ($continue) {
2756 __CODE{ParseError}__;
2757 }
2758 }
2759 $er-><AS::x|EntityReference.isExpanded>
2760 ($ent->{has_replacement_text});
2761 push @{$self->{entity}}, <Code::getCopyOfEntityState::
2762 $entity_type = 'general_entity',
2763 $entity_name = $name>;
2764
2765 if (defined $ent->{notation}) {
2766 my $location;
2767 __CODE{xp|get-location-from-token::
2768 $token => {$token},
2769 $result => {$location},
2770 }__;
2771 my $continue = __c|ERROR{xp|wf-parsed-entity::
2772 xp|error-token => {$token},
2773 c|location => {$location},
2774 xp|name => {$name},
2775 }__;
2776 unless ($continue) {
2777 __CODE{ParseError}__;
2778 }
2779 } # if unparsed entity
2780
2781 if ($ent->{is_opened}) {
2782 my $location;
2783 __CODE{xp|get-location-from-token::
2784 $token => {$token},
2785 $result => {$location},
2786 }__;
2787 my $continue = __c|ERROR{xp|wf-no-recursion::
2788 xp|error-token => {$token},
2789 c|location => {$location},
2790 xp|name => {$name},
2791 }__;
2792 unless ($continue) {
2793 __CODE{ParseError}__;
2794 }
2795 open my $empty, '<', \'';
2796 $self->{entity}->[-1]->{fh} = $empty;
2797 $er-><AS::x|EntityReference.isExpanded> (false);
2798 } # recursive
2799 $ent->{is_opened} = true;
2800 } # entity declared
2801 $self->{location} = $self->{entity}->[-1];
2802 push @{$self->{entity_token}}, $self->{token};
2803 $self->{token} = [];
2804 push @{$self->{entity_char}}, $self->{char};
2805 $self->{char} = [];
2806 }
2807
2808 ?lexmode ElementContent;
2809 &content ($doc => $doc, $parent => $er, $ns => $ns);
2810 ~ (#EOF) { }
2811 lang:Perl {
2812 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2813 ->{is_opened} = false
2814 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2815 $self->{token} = pop @{$self->{entity_token}};
2816 $self->{char} = pop @{$self->{entity_char}};
2817 pop (@{$self->{entity}})->{close_file}->();
2818 $self->{location} = $self->{entity}->[-1];
2819 }
2820
2821 // TODO: Set read-only flag
2822
2823 ?lexmode EntityReference;
2824 ?requires-next-token;
2825 }
2826
2827 ~ (REFC) {
2828 ?lexmode ElementContent;
2829 } else {
2830 ?lexmode ElementContent;
2831 }
2832 } // _GeneralEntityReferenceEC
2833
2834 /*
2835 General entity reference in an attribute value literal
2836 */
2837 rule _GeneralEntityReferenceV_ ($vals) {
2838 ?lexmode EntityReference;
2839
2840 ~ (Name == 'lt') {
2841 lang:Perl {
2842 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2843 ('<');
2844 $vals->{value} .= '<';
2845 }
2846 } (Name == 'gt') {
2847 lang:Perl {
2848 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2849 ('>');
2850 $vals->{value} .= '>';
2851 }
2852 } (Name == 'amp') {
2853 lang:Perl {
2854 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2855 ('&');
2856 $vals->{value} .= '&';
2857 }
2858 } (Name == 'quot') {
2859 lang:Perl {
2860 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2861 ('"');
2862 $vals->{value} .= '"';
2863 }
2864 } (Name == 'apos') {
2865 lang:Perl {
2866 push @{$vals->{nodes}}, $self->{doc}-><M::Document.createTextNode>
2867 ("'");
2868 $vals->{value} .= "'";
2869 }
2870 } (Name) {
2871 my $er;
2872 lang:Perl ($name => $token.value) : has-error {
2873 __CODE{checkNCName:: $name => $name}__;
2874
2875 $er = $self->{doc}-><M::Document.createEntityReference> ($name);
2876 $er-><AS::Node.textContent> ('');
2877 ## NOTE: When document entity (and entities referenced directly
2878 ## or indirectly from it) is parsed, no general entity
2879 ## node have its replacement tree. During general
2880 ## entity node collection construction, however,
2881 ## some entity node has replacement tree.
2882 my $ent = $self->{general_entity}->{$name};
2883 if (not $ent) { # no entity declaration
2884 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2885 my $location;
2886 __CODE{xp|get-location-from-token::
2887 $token => {$token},
2888 $result => {$location},
2889 }__;
2890 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2891 xp|error-token => {$token},
2892 c|location => {$location},
2893 xp|name => {$name},
2894 }__;
2895 unless ($continue) {
2896 __CODE{ParseError}__;
2897 }
2898 } # Otherwise VC error
2899 push @{$self->{entity}}, <Code::getEmptyEntityState::
2900 $name = $name>;
2901 $er-><AS::x|EntityReference.isExpanded> (false);
2902
2903 } else { # there IS entity declaration
2904 if (($self->{standalone} or not $self->{has_xref}) and
2905 $ent->{is_externally_declared} and
2906 not $self->{entity}->[-1]->{is_externally_declared}) {
2907 my $location;
2908 __CODE{xp|get-location-from-token::
2909 $token => {$token},
2910 $result => {$location},
2911 }__;
2912 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2913 xp|error-token => {$token},
2914 c|location => {$location},
2915 xp|name => {$name},
2916 }__;
2917 unless ($continue) {
2918 __CODE{ParseError}__;
2919 }
2920 }
2921
2922 if ($ent->{is_external_entity}) {
2923 my $location;
2924 __CODE{xp|get-location-from-token::
2925 $token => {$token},
2926 $result => {$location},
2927 }__;
2928 my $continue = __c|ERROR{xp|wf-no-external-entity-references::
2929 xp|error-token => {$token},
2930 c|location => {$location},
2931 xp|name => {$name},
2932 }__;
2933 unless ($continue) {
2934 __CODE{ParseError}__;
2935 }
2936 ## NOTE: |xp:wf-parsed-entity| is not checked
2937 } # if external entity
2938
2939 $er-><AS::x|EntityReference.isExpanded>
2940 ($ent->{has_replacement_text});
2941 push @{$self->{entity}}, <Code::getCopyOfEntityState::
2942 $entity_type = 'general_entity',
2943 $entity_name = $name>;
2944
2945 if ($ent->{is_opened}) {
2946 my $location;
2947 __CODE{xp|get-location-from-token::
2948 $token => {$token},
2949 $result => {$location},
2950 }__;
2951 my $continue = __c|ERROR{xp|wf-no-recursion::
2952 xp|error-token => {$token},
2953 c|location => {$location},
2954 xp|name => {$name},
2955 }__;
2956 unless ($continue) {
2957 __CODE{ParseError}__;
2958 }
2959 open my $empty, '<', \'';
2960 $self->{entity}->[-1]->{fh} = $empty;
2961 $er-><AS::x|EntityReference.isExpanded> (false);
2962 } # recursive
2963 $ent->{is_opened} = true;
2964 }
2965 push @{$vals->{nodes}}, $er;
2966 $self->{location} = $self->{entity}->[-1];
2967 push @{$self->{entity_token}}, $self->{token};
2968 $self->{token} = [];
2969 push @{$self->{entity_char}}, $self->{char};
2970 $self->{char} = [];
2971 }
2972
2973 ?lexmode AttributeValueLiteralE;
2974 &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);
2975 ~ (#EOF) { }
2976 lang:Perl {
2977 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2978 ->{is_opened} = false
2979 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2980 $self->{token} = pop @{$self->{entity_token}};
2981 $self->{char} = pop @{$self->{entity_char}};
2982 pop (@{$self->{entity}})->{close_file}->();
2983 $self->{location} = $self->{entity}->[-1];
2984 }
2985
2986 // TODO: Set read-only flag
2987
2988 ?lexmode EntityReference;
2989 ?requires-next-token;
2990 }
2991
2992 // ~ (REFC) { }
2993 } // _GeneralEntityReferenceV_
2994
2995 /*
2996 General entity reference in the replacement text
2997 of the entity referenced in an attribute value literal
2998 */
2999 rule _GeneralEntityReferenceAE_ ($parent, $vals)
3000 {
3001 ?lexmode EntityReference;
3002
3003 ~ (Name == 'lt') {
3004 lang:Perl {
3005 $parent-><M::Node.appendChild>
3006 ($self->{doc}-><M::Document.createTextNode> ('<'));
3007 $vals->{value} .= '<';
3008 }
3009 } (Name == 'gt') {
3010 lang:Perl {
3011 $parent-><M::Node.appendChild>
3012 ($self->{doc}-><M::Document.createTextNode> ('>'));
3013 $vals->{value} .= '>';
3014 }
3015 } (Name == 'amp') {
3016 lang:Perl {
3017 $parent-><M::Node.appendChild>
3018 ($self->{doc}-><M::Document.createTextNode> ('&'));
3019 $vals->{value} .= '&';
3020 }
3021 } (Name == 'quot') {
3022 lang:Perl {
3023 $parent-><M::Node.appendChild>
3024 ($self->{doc}-><M::Document.createTextNode> ('"'));
3025 $vals->{value} .= '"';
3026 }
3027 } (Name == 'apos') {
3028 lang:Perl {
3029 $parent-><M::Node.appendChild>
3030 ($self->{doc}-><M::Document.createTextNode> ("'"));
3031 $vals->{value} .= "'";
3032 }
3033 } (Name) {
3034 my $er;
3035 lang:Perl ($name => $token.value) : has-error {
3036 __CODE{checkNCName:: $name => $name}__;
3037
3038 $er = $self->{doc}-><M::Document.createEntityReference> ($name);
3039 $er-><AS::Node.textContent> ('');
3040 ## NOTE: When document entity (and entities referenced directly
3041 ## or indirectly from it) is parsed, no general entity
3042 ## node have its replacement tree. During general
3043 ## entity node collection construction, however,
3044 ## some entity node has replacement tree.
3045 my $ent = $self->{general_entity}->{$name};
3046 if (not $ent) { # no entity declaration
3047 if ($self->{standalone} or not $self->{has_xref}) { # WFC error
3048 my $location;
3049 __CODE{xp|get-location-from-token::
3050 $token => {$token},
3051 $result => {$location},
3052 }__;
3053 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
3054 xp|error-token => {$token},
3055 c|location => {$location},
3056 xp|name => {$name},
3057 }__;
3058 unless ($continue) {
3059 __CODE{ParseError}__;
3060 }
3061 } # Otherwise VC error
3062 push @{$self->{entity}}, <Code::getEmptyEntityState::
3063 $name = $name>;
3064 $er-><AS::x|EntityReference.isExpanded> (false);
3065
3066 } else { # there IS entity declaration
3067 if (($self->{standalone} or not $self->{has_xref}) and
3068 $ent->{is_externally_declared} and
3069 not $self->{entity}->[-1]->{is_externally_declared}) {
3070 my $location;
3071 __CODE{xp|get-location-from-token::
3072 $token => {$token},
3073 $result => {$location},
3074 }__;
3075 my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
3076 xp|error-token => {$token},
3077 c|location => {$location},
3078 xp|name => {$name},
3079 }__;
3080 unless ($continue) {
3081 __CODE{ParseError}__;
3082 }
3083 }
3084
3085 if ($ent->{is_external_entity}) {
3086 my $location;
3087 __CODE{xp|get-location-from-token::
3088 $token => {$token},
3089 $result => {$location},
3090 }__;
3091 my $continue = __c|ERROR{xp|wf-no-external-entity-references::
3092 xp|error-token => {$token},
3093 c|location => {$location},
3094 xp|name => {$name},
3095 }__;
3096 unless ($continue) {
3097 __CODE{ParseError}__;
3098 }
3099 ## NOTE: |xp:wf-parsed-entity| is not checked
3100 } # if external entity
3101
3102 $er-><AS::x|EntityReference.isExpanded>
3103 ($ent->{has_replacement_text});
3104 push @{$self->{entity}}, <Code::getCopyOfEntityState::
3105 $entity_type = 'general_entity',
3106 $entity_name = $name>;
3107
3108 if ($ent->{is_opened}) {
3109 my $location;
3110 __CODE{xp|get-location-from-token::
3111 $token => {$token},
3112 $result => {$location},
3113 }__;
3114 my $continue = __c|ERROR{xp|wf-no-recursion::
3115 xp|error-token => {$token},
3116 c|location => {$location},
3117 xp|name => {$name},
3118 }__;
3119 unless ($continue) {
3120 __CODE{ParseError}__;
3121 }
3122 open my $empty, '<', \'';
3123 $self->{entity}->[-1]->{fh} = $empty;
3124 $er-><AS::x|EntityReference.isExpanded> (false);
3125 } # recursive
3126 $ent->{is_opened} = true;
3127 }
3128 $parent-><M::Node.appendChild> ($er);
3129 $self->{location} = $self->{entity}->[-1];
3130 push @{$self->{entity_token}}, $self->{token};
3131 $self->{token} = [];
3132 push @{$self->{entity_char}}, $self->{char};
3133 $self->{char} = [];
3134 }
3135
3136 ?lexmode AttributeValueLiteralE;
3137 &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);
3138 ~ (#EOF) { }
3139 lang:Perl {
3140 $self->{general_entity}->{$self->{entity}->[-1]->{name}}
3141 ->{is_opened} = false
3142 if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
3143 $self->{token} = pop @{$self->{entity_token}};
3144 $self->{char} = pop @{$self->{entity_char}};
3145 pop (@{$self->{entity}})->{close_file}->();
3146 $self->{location} = $self->{entity}->[-1];
3147 }
3148
3149 // TODO: Set read-only flag
3150
3151 ?lexmode EntityReference;
3152 ?requires-next-token;
3153 }
3154
3155 // ~ (REFC) { }
3156 } // _GeneralEntityReferenceAE_
3157
3158 /*
3159 General Entity Reference in Literal Entity Value in Entity Declaration
3160 */
3161 rule _GeneralEntityReferenceEV_ ($vals) {
3162 ?lexmode 'EntityReference';
3163
3164 ~ (Name) {
3165 lang:Perl ($name => $token.value) {
3166 __CODE{checkNCName:: $name => $name}__;
3167 push @$vals, $name;
3168 }
3169 /*
3170 WFCs such as Entity Declared are not checked
3171 <http://www.w3.org/TR/xml11/#bypass>
3172
3173 Note that violation to the Parsed Entity WFC is an error
3174 rather than fatal error here.
3175 */
3176 }
3177
3178 // No expansion
3179
3180 // ~ (REFC) { }
3181 } // _GeneralEntityReferenceEV_
3182
3183 /*
3184 Document Type Declaration
3185 */
3186 rule _DocumentTypeDeclaration_ ($doc) {
3187 ?lexmode MarkupDeclaration;
3188
3189 ~ (Name == 'DOCTYPE') { }
3190
3191 ~ (S) { }
3192
3193 // Document type name
3194 my $name;
3195 ~ (Name) {
3196 lang:Perl ($v => $token.value) {
3197 __CODE{checkQName:: $name => $v}__;
3198 $name = $v;
3199 }
3200 }
3201
3202 my $node;
3203 my $decl;
3204 lang:Perl {
3205 $self->{docx} = $self->{doc}
3206 -><M::Node.getFeature> (<Q::fe:XDoctype>, '3.0');
3207 $node = $self->{docx}-><M::DocumentXDoctype.createDocumentTypeDefinition>
3208 ($name);
3209 $decl = $self->{dtdecl} = $node-><M::Node.getFeature>
3210 (<Q::fe:XDoctypeDeclaration>, '3.0');
3211 }
3212
3213 my $has_extid;
3214 ~? (S) {
3215 ~? (Name == 'PUBLIC') {
3216 ~ (S) { }
3217
3218 &PubidLiteral ($decl => $decl);
3219
3220 ~ (S) { }
3221
3222 &SystemLiteral ($decl => $decl);
3223
3224 ~? (S) { }
3225
3226 lang:Perl {
3227 $self->{has_xref} = true;
3228 $has_extid = true;
3229 }
3230 } (Name == 'SYSTEM') {
3231 ~ (S) { }
3232
3233 &SystemLiteral ($decl => $decl);
3234
3235 ~? (S) { }
3236
3237 lang:Perl {
3238 $self->{has_xref} = true;
3239 $has_extid = true;
3240 }
3241 }
3242 }
3243
3244 lang:Perl {
3245 $self->{dtdef} = $node;
3246 $self->{doc}-><M::Node.appendChild> ($node);
3247 $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
3248 ('schema-type' => <Q::xml-dtd:>);
3249 ## ISSUE: Should default schema language information be
3250 ## preserved by some other flag?
3251 }
3252
3253 ~? (DSO) {
3254 &InternalSubset ($doc => $doc, $doctype => $node);
3255
3256 ~ (DSC) {
3257 ?lexmode MarkupDeclaration;
3258 } else {
3259 ?lexmode MarkupDeclaration;
3260 }
3261
3262 ~? (S) { }
3263 }
3264
3265 // TODO: Read and process external subset if any.
3266 lang:Perl {
3267 $self->{dont_process} = true if $has_extid;
3268 }
3269
3270 // ~ (MDC) { }
3271 } // _DocumentTypeDeclaration_
3272
3273 /*
3274 Public Identifier Literal
3275 */
3276 rule PubidLiteral ($decl) {
3277 my $pubid;
3278 my $pubid_token;
3279 ~ (LIT) {
3280 ?lexmode SystemLiteral;
3281
3282 ~? (STRING) {
3283 lang:Perl ($v => $token.value) {
3284 $pubid = $v;
3285 $pubid_token = $token;
3286 }
3287 }
3288
3289 ~ (LIT) {
3290 ?lexmode MarkupDeclaration;
3291 } else {
3292 ?lexmode MarkupDeclaration;
3293 }
3294 } (LITA) {
3295 ?lexmode SystemLiteralA;
3296
3297 ~? (STRING) {
3298 lang:Perl ($v => $token.value) {
3299 $pubid = $v;
3300 $pubid_token = $token;
3301 }
3302 }
3303
3304 ~ (LITA) {
3305 ?lexmode MarkupDeclaration;
3306 } else {
3307 ?lexmode MarkupDeclaration;
3308 }
3309 }
3310
3311 if-true ($pubid_token) {
3312 lang:Perl : has-error {
3313 if ($pubid =~ m{[^\x20\x0D\x0Aa-zA-Z0-9'()+,./:=?;!*#\@\$_%-]}s) {
3314 my $location;
3315 __CODE{xp|get-location-from-token::
3316 $token => {$pubid_token},
3317 $result => {$location},
3318 }__;
3319 ## Should this be other (new) error type?
3320 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
3321 xp|error-token => {$token},
3322 c|location => {$location},
3323 }__;
3324 unless ($continue) {
3325 __CODE{ParseError}__;
3326 }
3327 }
3328
3329 ## NOTE: U+0009 is syntactically illegal.
3330 $pubid =~ s/[\x09\x0A\x0D\x20]+/\x20/gs;
3331 $pubid =~ s/\A\x20//s;
3332 $pubid =~ s/\x20\z//s;
3333 ## NOTE: Bare attribute name is written.
3334 $decl->public_id ($pubid);
3335 }
3336 }
3337 } // PubidLiteral
3338
3339 /*
3340 System Identifier Literal
3341 */
3342 rule SystemLiteral ($decl) {
3343 ~ (LIT) {
3344 ?lexmode SystemLiteral;
3345 &_SystemLiteral ($decl => $decl);
3346 } (LITA) {
3347 ?lexmode SystemLiteralA;
3348 &_SystemLiteral ($decl => $decl);
3349 }
3350 } // SystemLiteral
3351
3352 /*
3353 System Identifier Literal Content
3354 */
3355 rule _SystemLiteral ($decl) {
3356 // LIT or LITA
3357
3358 ~? (STRING) {
3359 lang:Perl ($v => $token.value) {
3360 ## NOTE: Bare attribute name is written.
3361 $decl->system_id ($v);
3362 }
3363 }
3364
3365 ~ (LIT) {
3366 ?lexmode MarkupDeclaration;
3367 } (LITA) {
3368 ?lexmode MarkupDeclaration;
3369 } else {
3370 ?lexmode MarkupDeclaration;
3371 }
3372 } // _SystemLiteral
3373
3374 /*
3375 DTD Internal Subset
3376
3377 intSubset := *(markupdecl / DeclSep) ;; [28b]
3378 */
3379 rule InternalSubset ($doc, $doctype) {
3380 ?lexmode DTD;
3381
3382 ~* (MDO) {
3383 ?lexmode MarkupDeclaration;
3384
3385 ~ (Name == 'ELEMENT') {
3386 &_ElementDeclaration ($doc => $doc);
3387 } (Name == 'ATTLIST') {
3388 &_AttlistDeclaration ($doc => $doc, $doctype => $doctype);
3389 } (Name == 'ENTITY') {
3390 &_EntityDeclaration ($doc => $doc);
3391 } (Name == 'NOTATION') {
3392 &_NotationDeclaration ($doc => $doc);
3393 }
3394 } (S) {
3395 //
3396 } (CDO) {
3397 &_CommentDeclarationDTD ($doc => $doc);
3398 } (PIO) {
3399 &_ProcessingInstructionDTD ($doc => $doc, $doctype => $doctype);
3400 } (PERO) {
3401 ?lexmode EntityReference;
3402
3403 lang:Perl {
3404 $self->{has_xref} = true;
3405 $self->{dont_process} = true;
3406 }
3407
3408 ~ (Name) {
3409 // TODO: __CODE{checkNCName:: $name => $name}__;
3410
3411 }
3412
3413 ~ (REFC) {
3414 ?lexmode DTD;
3415 } else {
3416 ?lexmode DTD;
3417 }
3418 }
3419 } // InternalSubset
3420
3421 rule _ElementDeclaration ($doc) {
3422 // ~ (MDO) { }
3423 // ?lexmode MarkupDeclaration
3424 // ~ (Name == 'Element') { }
3425
3426 ~ (S) { }
3427
3428 ~ (Name) {
3429 // TODO: __CODE{checkQName:: $name => $name}__;
3430
3431 }
3432
3433 ?lexmode ElementDeclaration;
3434
3435 ~ (S) { }
3436
3437 // contentspec
3438 ~ (MGO) {
3439 &_ContentModel ($doc => $doc);
3440 } (Name == 'EMPTY') {
3441
3442 } (Name == 'ANY') {
3443
3444 }
3445
3446 ~? (S) { }
3447
3448 ~ (MDC) {
3449 ?lexmode DTD;
3450 } else {
3451 ?lexmode DTD;
3452 }
3453 } // _ElementDeclaration
3454
3455 rule _ContentModel ($doc) {
3456 // ~ (MGO) { }
3457
3458 ~? (S) { }
3459
3460 ~ (Name) {
3461 // Element content model
3462 &_ModelGroup ($doc => $doc)
3463 : unshift-current-token;
3464
3465 ~? (OPT) {
3466
3467 } (REP) {
3468
3469 } (PLUS) {
3470
3471 }
3472
3473 } (MDO) {
3474 &_ModelGroup ($doc => $doc)
3475 : unshift-current-token;
3476
3477 ~? (OPT) {
3478
3479 } (REP) {
3480
3481 } (PLUS) {
3482
3483 }
3484
3485 } (PCDATA) {
3486 // Mixed content declaration
3487 ~? (S) { }
3488
3489 ~* (OR) {
3490 ~? (S) { }
3491
3492 ~ (Name) {
3493 // TODO: Name & QName check
3494
3495 }
3496
3497 ~? (S) { }
3498 }
3499
3500 ~ (MGC) { }
3501
3502 ~? (REP) {
3503
3504 } else {
3505 // TODO: error if |Name|
3506 }
3507
3508
3509 }
3510 } // _ContentModel
3511
3512 rule _ModelGroup ($doc)
3513 : standalone
3514 : recursive
3515 {
3516 // ~ (MGO) { }
3517 // ~? (S) { }
3518
3519 &ContentParticle ($doc => $doc);
3520
3521 ~? (S) { }
3522
3523 ~? (OR) {
3524 ~? (S) { }
3525
3526 &ContentParticle ($doc => $doc);
3527
3528 ~? (S) { }
3529
3530 ~* (OR) {
3531 ~? (S) { }
3532
3533 &ContentParticle ($doc => $doc);
3534
3535 ~? (S) { }
3536 }
3537
3538 } (SEQ) {
3539 ~? (S) { }
3540
3541 &ContentParticle ($doc => $doc);
3542
3543 ~? (S) { }
3544
3545 ~* (SEQ) {
3546 ~? (S) { }
3547
3548 &ContentParticle ($doc => $doc);
3549
3550 ~? (S) { }
3551 }
3552
3553 }
3554
3555 ~ (MGC) { }
3556 } // _ModelGroup
3557
3558 rule ContentParticle ($doc) {
3559 ~ (Name) {
3560 // TODO: Name & QName check
3561
3562 } (MGO) {
3563 ~? (S) { }
3564
3565 &_ModelGroup ($doc => $doc);
3566 }
3567
3568 ~? (OPT) {
3569
3570 } (REP) {
3571
3572 } (PLUS) {
3573
3574 }
3575 } // ContentParticle
3576
3577 /*
3578 Attribute list declaration
3579 */
3580 rule _AttlistDeclaration ($doc, $doctype) {
3581 // ~ (MDO) { }
3582 // ~ (Name == 'ATTLIST') { }
3583
3584 ?lexmode AttlistDeclaration;
3585
3586 ~ (S) { }
3587
3588 my $name;
3589 ~ (Name) {
3590 lang:Perl ($v => $token.value) {
3591 __CODE{checkQName:: $name => $v}__;
3592 $name = $v;
3593 }
3594 } else {
3595 lang:Perl { $name = '#ILLEGAL' }
3596 }
3597
3598 my $docxd;
3599 my $et;
3600 lang:Perl {
3601 $et = $doctype-><M::DTDef.getElementTypeDefinitionNode> ($name);
3602 unless ($et) {
3603 $docxd = $doc-><M::Node.getFeature> (<Q::fe:XDoctype>, '3.0');
3604 $et = $docxd-><M::DocumentXDoctype.createElementTypeDefinition>
3605 ($name);
3606 $doctype-><M::DTDef.setElementTypeDefinitionNode> ($et)
3607 unless $name eq '#ILLEGAL';
3608 }
3609 }
3610
3611 ~? (S) { }
3612
3613 ~* (Name) {
3614 my $at;
3615 lang:Perl ($v => $token.value) : has-error {
3616 __CODE{checkQName:: $name => $v}__;
3617 $docxd ||= $doc-><M::Node.getFeature>
3618 (<Q::fe:XDoctype>, '3.0');
3619 $at = $docxd-><M::DocumentXDoctype.createAttributeDefinition> ($v);
3620 if (exists $et-><AG::ETDef.attributeDefinitions>->{$v}) {
3621 my $location;
3622 __CODE{xp|get-location-from-token::
3623 $token => {$token},
3624 $result => {$location},
3625 }__;
3626 my $continue = __c|ERROR{xp|warning-attribute-definition-ignored::
3627 xp|error-token => {$token},
3628 c|location => {$location},
3629 xp|name => {$v},
3630 }__;
3631 unless ($continue) {
3632 __CODE{ParseError}__;
3633 }
3634 } elsif ($self->{dont_process} and not $self->{standalone}) {
3635 my $location;
3636 __CODE{xp|get-location-from-token::
3637 $token => {$token},
3638 $result => {$location},
3639 }__;
3640 my $continue = __c|ERROR{
3641 xp|warning-attribute-definition-not-processed::
3642 xp|error-token => {$token},
3643 c|location => {$location},
3644 xp|name => {$v},
3645 }__;
3646 unless ($continue) {
3647 __CODE{ParseError}__;
3648 }
3649 } else {
3650 $et-><M::ETDef.setAttributeDefinitionNode> ($at);
3651 $self->{attr}->{$name}->{$v} = $at;
3652 }
3653 }
3654
3655 ~ (S) { }
3656
3657 // AttType
3658 ~ (Name == 'NOTATION') {
3659 ~ (S) { }
3660
3661 my $kwd;
3662 lang:Perl {
3663 $at-><AS::ATDef.declaredType> (<C::ATDef.NOTATION_ATTR>);
3664 $kwd = $at-><AG::ATDef.allowedTokens>;
3665 }
3666
3667 ~ (EGO) {
3668 ~? (S) { }
3669
3670 ~+ (Name) {
3671 lang:Perl ($v => $token.value) : has-error {
3672 __CODE{checkNCName:: $name => $v}__;
3673 push @$kwd, $v;
3674 }
3675
3676 ~? (S) { }
3677 } (OR) : separator {
3678 ~? (S) { }
3679 }
3680
3681 ~ (EGC) { }
3682 }
3683
3684 } (Name) {
3685 my $type;
3686 lang:Perl ($v => $token.value) : has-error {
3687 my $map = {
3688 CDATA => <C::ATDef.CDATA_ATTR>,
3689 ID => <C::ATDef.ID_ATTR>,
3690 IDREF => <C::ATDef.IDREF_ATTR>,
3691 IDREFS => <C::ATDef.IDREFS_ATTR>,
3692 ENTITY => <C::ATDef.ENTITY_ATTR>,
3693 ENTITIES => <C::ATDef.ENTITIES_ATTR>,
3694 NMTOKEN => <C::ATDef.NMTOKEN_ATTR>,
3695 NMTOKENS => <C::ATDef.NMTOKENS_ATTR>,
3696 };
3697 if ($map->{$v}) {
3698 $at-><AS::ATDef.declaredType> ($map->{$v});
3699 } else {
3700 ## TODO: Exception
3701 }
3702 }
3703
3704 } (EGO) {
3705 ?lexmode Enumeration;
3706
3707 ~? (S) { }
3708
3709 my $kwd;
3710 lang:Perl {
3711 $at-><AS::ATDef.declaredType> (<C::ATDef.ENUMERATION_ATTR>);
3712 $kwd = $at-><AG::ATDef.allowedTokens>;
3713 }
3714
3715 ~+ (Nmtoken) {
3716 lang:Perl ($v => $token.value) {
3717 push @$kwd, $v;
3718 }
3719
3720 ~? (S) { }
3721 } (OR) : separator {
3722 ~? (S) { }
3723 }
3724
3725 ~ (EGC) {
3726 ?lexmode AttlistDeclaration;
3727 } else {
3728 ?lexmode AttlistDeclaration;
3729 }
3730
3731 }
3732
3733 ~ (S) { }
3734
3735 // DefaultDecl
3736 ~ (RNI) {
3737 ~ (Name == 'REQUIRED') {
3738 lang:Perl {
3739 $at-><AS::ATDef.defaultType> (<C::ATDef.REQUIRED_DEFAULT>);
3740 }
3741 } (Name == 'IMPLIED') {
3742 lang:Perl {
3743 $at-><AS::ATDef.defaultType> (<C::ATDef.IMPLIED_DEFAULT>);
3744 }
3745 } (Name == 'FIXED') {
3746 ~ (S) { }
3747
3748 lang:Perl {
3749 $at-><AS::ATDef.defaultType> (<C::ATDef.FIXED_DEFAULT>);
3750 }
3751
3752 ~ (LIT) {
3753 my $vals;
3754 lang:Perl {
3755 $vals = {nodes => [], value => ''};
3756 }
3757
3758 &_AttributeValueSpecification_ ($doc => $doc, $vals => $vals);
3759
3760 lang:Perl {
3761 for (@{$vals->{nodes}}) {
3762 $at-><M::Node.appendChild> ($_);
3763 }
3764 }
3765
3766 ~ (LIT) {
3767 ?lexmode AttlistDeclaration;
3768 } else {
3769 ?lexmode AttlistDeclaration;
3770 }
3771 } (LITA) {
3772 my $vals;
3773 lang:Perl {
3774 $vals = {nodes => [], value => ''};
3775 }
3776
3777 &_AttributeValueSpecificationA_ ($doc => $doc, $vals => $vals);
3778
3779 lang:Perl {
3780 for (@{$vals->{nodes}}) {
3781 $at-><M::Node.appendChild> ($_);
3782 }
3783 }
3784
3785 ~ (LITA) {
3786 ?lexmode AttlistDeclaration;
3787 } else {
3788 ?lexmode AttlistDeclaration;
3789 }
3790 }
3791 }
3792
3793 } (LIT) {
3794 my $vals;
3795 lang:Perl {
3796 $at-><AS::ATDef.defaultType> (<C::ATDef.EXPLICIT_DEFAULT>);
3797 $vals = {nodes => [], value => ''};
3798 }
3799
3800 &_AttributeValueSpecification_ ($doc => $doc, $vals => $vals);
3801
3802 lang:Perl {
3803 for (@{$vals->{nodes}}) {
3804 $at-><M::Node.appendChild> ($_);
3805 }
3806 }
3807
3808 ~ (LIT) {
3809 ?lexmode AttlistDeclaration;
3810 } else {
3811 ?lexmode AttlistDeclaration;
3812 }
3813 } (LITA) {
3814 my $vals;
3815 lang:Perl {
3816 $at-><AS::ATDef.defaultType> (<C::ATDef.EXPLICIT_DEFAULT>);
3817 $vals = {nodes => [], value => ''};
3818 }
3819
3820 &_AttributeValueSpecificationA_ ($doc => $doc, $vals => $vals);
3821
3822 lang:Perl {
3823 for (@{$vals->{nodes}}) {
3824 $at-><M::Node.appendChild> ($_);
3825 }
3826 }
3827
3828 ~ (LITA) {
3829 ?lexmode AttlistDeclaration;
3830 } else {
3831 ?lexmode AttlistDeclaration;
3832 }
3833 }
3834
3835 } (S) : separator : terminator? {
3836 //
3837 }
3838
3839 ~ (MDC) {
3840 ?lexmode DTD;
3841 } else {
3842 ?lexmode DTD;
3843 }
3844 } // _AttlistDeclaration
3845
3846 /*
3847 Entity Declaration
3848 */
3849 rule _EntityDeclaration ($doc) {
3850 // ~ (MDO) { }
3851 // ~ (Name == ENTITY) { }
3852
3853 ~ (S) { }
3854
3855 my $is_param_entity;
3856 my $decl;
3857 lang:Perl {
3858 $decl = {
3859 name => '#ILLEGAL',
3860 reptxt => \'',
3861 is_external_entity => false,
3862 document_uri => $self->{location}->{document_uri},
3863 base_uri => $self->{location}->{base_uri},
3864 };
3865 }
3866
3867 ~? (PERO) {
3868 ~ (S) { }
3869 lang:Perl {
3870 $is_param_entity = $decl->{is_param_entity} = true;
3871 }
3872 }
3873
3874 /*
3875 TODO: Set |$decl->{is_externally_declared}| flag
3876 and |Entity.isExternallyDeclared| attribute
3877 for entity declarations in external subset or
3878 in parameter entity.
3879 */
3880
3881 ~ (Name) {
3882 lang:Perl ($v => $token.value) {
3883 __CODE{checkNCName:: $name => $v}__;
3884 $decl->{name} = $v;
3885 }
3886 }
3887
3888 my $node;
3889 lang:Perl {
3890 $node =
3891 $decl->{node} = $self->{docx}-><M::DocumentXDoctype.createGeneralEntity>
3892 ($decl->{name});
3893 ## TODO: Parameter entity...
3894 }
3895
3896 ~ (S) { }
3897
3898 ~ (LIT) {
3899 &_EntityValue ($doc => $doc, $decl => $decl);
3900 } (LITA) {
3901 &_EntityValueA ($doc => $doc, $decl => $decl);
3902 } (Name == 'PUBLIC') {
3903 ~ (S) { }
3904
3905 &PubidLiteral ($decl => $node);
3906
3907 ~ (S) { }
3908
3909 &SystemLiteral ($decl => $node);
3910
3911 lang:Perl {
3912 $decl->{is_external_entity} = true;
3913 }
3914 } (Name == 'SYSTEM') {
3915 ~ (S) { }
3916
3917 &SystemLiteral ($decl => $node);
3918
3919 lang:Perl {
3920 $decl->{is_external_entity} = true;
3921 }
3922 }
3923
3924 ~? (S) {
3925 ~? (Name == 'NDATA') {
3926 if-true ($is_param_entity) {
3927 lang:Perl : has-error {
3928 my $location;
3929 __CODE{xp|get-location-from-token::
3930 $token => {$token},
3931 $result => {$location},
3932 }__;
3933 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
3934 xp|error-token => {$token},
3935 c|location => {$location},
3936 }__;
3937 unless ($continue) {
3938 __CODE{ParseError}__;
3939 }
3940 }
3941 }
3942
3943 ~ (S) { }
3944
3945 ~ (Name) {
3946 lang:Perl ($v => $token.value) : has-error {
3947 __CODE{checkNCName:: $name => $v}__;
3948 $decl->{notation} = $v;
3949 $decl->{node}-><AG::x|Entity.notationName> ($v);
3950 }
3951 }
3952
3953 ~? (S) { }
3954 }
3955 }
3956
3957 lang:Perl : has-error {
3958 if ($self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}
3959 ->{$decl->{name}}) {
3960 ## Predefined entity
3961 if (not $decl->{is_param_entity} and
3962 {lt => true, gt => true, amp => true,
3963 quot => true, apos => true}->{$decl->{name}}) {
3964 if ($decl->{is_external_entity}) {
3965 my $location;
3966 __CODE{xp|get-location-from-token::
3967 $token => {$token},
3968 $result => {$location},
3969 }__;
3970 my $continue = __c|ERROR{xp|error-internal-predefined-entity::
3971 xp|error-token => {$token},
3972 c|location => {$location},
3973 xp|name => {$decl->{name}},
3974 }__;
3975 unless ($continue) {
3976 __CODE{ParseError}__;
3977 }
3978 } elsif (
3979 not ({gt => true, apos => true, quot => true}->{$decl->{name}} and
3980 ${$decl->{reptxt}} eq {
3981 gt => '>', apos => "'", quot => '"',
3982 }->{$decl->{name}}) and
3983 not (${$decl->{reptxt}} =~ /\A&#0*@{[{
3984 lt => '60', gt => '62', amp => '38',
3985 apos => '39', quot => '34',
3986 }->{$decl->{name}}]};\z/) and
3987 not (${$decl->{reptxt}} =~ /\A&#x0*(?:(?i)@{[{
3988 lt => '3C', gt => '3E', amp => '26',
3989 apos => '27', quot => '22',
3990 }->{$decl->{name}}]});\z/)
3991 ) {
3992 ## NOTE: See "SuikaWiki - Predefined Entities"
3993 ## "http://suika.fam.cx/gate/2005/sw/%E5%AE%9A%E7%BE%A9%E6%B8%88%E5%AE%9F%E4%BD%93".
3994 my $location;
3995 __CODE{xp|get-location-from-token::
3996 $token => {$token},
3997 $result => {$location},
3998 }__;
3999 my $continue = __c|ERROR{xp|error-malformed-predefined-entity::
4000 xp|error-token => {$token},
4001 c|location => {$location},
4002 xp|name => {$decl->{name}},
4003 xp|replacement-text => {${$decl->{reptxt}}},
4004 }__;
4005 unless ($continue) {
4006 __CODE{ParseError}__;
4007 }
4008 }
4009 $self->{dtdecl}->{<H::mn:node>}->{{
4010 lt => <H::d|hasLtDeclaration>,
4011 gt => <H::d|hasGtDeclaration>,
4012 amp => <H::d|hasAmpDeclaration>,
4013 apos => <H::d|hasAposDeclaration>,
4014 quot => <H::d|hasQuotDeclaration>,
4015 }->{$decl->{name}}} = true;
4016 } else { ## Dupulicating declaration
4017 my $location;
4018 __CODE{xp|get-location-from-token::
4019 $token => {$token},
4020 $result => {$location},
4021 }__;
4022 my $continue = __c|ERROR{xp|warning-entity-declaration-ignored::
4023 xp|error-token => {$token},
4024 c|location => {$location},
4025 xp|name => {$decl->{name}},
4026 }__;
4027 unless ($continue) {
4028 __CODE{ParseError}__;
4029 }
4030 }
4031 } elsif ($self->{dont_process} and not $self->{standalone}) {
4032 ## TODO: |standalone| and parameter entities??
4033 my $location;
4034 __CODE{xp|get-location-from-token::
4035 $token => {$token},
4036 $result => {$location},
4037 }__;
4038 my $continue = __c|ERROR{xp|warning-entity-declaration-not-processed::
4039 xp|error-token => {$token},
4040 c|location => {$location},
4041 xp|name => {$decl->{name}},
4042 }__;
4043 unless ($continue) {
4044 __CODE{ParseError}__;
4045 }
4046 } else {
4047 $self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}
4048 ->{$decl->{name}} = $decl;
4049 $self->{dtdef}-><M::DTDef.setGeneralEntityNode> ($decl->{node})
4050 unless $decl->{is_param_entity};
4051 }
4052 }
4053
4054 ~ (MDC) {
4055 ?lexmode DTD;
4056 } else {
4057 ?lexmode DTD;
4058 }
4059 } // _EntityDeclaration
4060
4061 /*
4062 Notation Declaration
4063 */
4064 rule _NotationDeclaration {
4065 // ~ (MDO) { }
4066 // ~ (Name == NOTATION) { }
4067
4068 ~ (S) { }
4069
4070 my $name;
4071 ~ (Name) {
4072 lang:Perl ($v => $token.value) : has-error {
4073 __CODE{checkNCName:: $name => $v}__;
4074 $name = $v;
4075 }
4076 } else {
4077 lang:Perl {
4078 $name = '#INVALID';
4079 }
4080 }
4081
4082 ~ (S) { }
4083
4084 lang:Perl {
4085 $decl = $self->{docx}-><M::DocumentXDoctype.createNotation> ($name);
4086 }
4087
4088 ~ (Name == 'PUBLIC') {
4089 ~ (S) { }
4090
4091 &PubidLiteral ($decl => $decl);
4092
4093 ~? (S) {
4094 ~? (LIT) {
4095 ?lexmode SystemLiteral;
4096 &_SystemLiteral ($decl => $decl);
4097
4098 ~? (S) { }
4099 } (LITA) {
4100 ?lexmode SystemLiteralA;
4101 &_SystemLiteral ($decl => $decl);
4102
4103 ~? (S) { }
4104 }
4105 }
4106 } (Name == 'SYSTEM') {
4107 ~ (S) { }
4108
4109 &SystemLiteral ($decl => $decl);
4110
4111 ~? (S) { }
4112 }
4113
4114 lang:Perl : has-error {
4115 if ($self->{dtdef}-><M::DTDef.getNotationNode> ($name)) {
4116 ## Dupulication
4117 my $location;
4118 __CODE{xp|get-location-from-token::
4119 $token => {$token},
4120 $result => {$location},
4121 }__;
4122 my $continue = __c|ERROR{xp|vc-unique-notation-name::
4123 xp|error-token => {$token},
4124 c|location => {$location},
4125 xp|name => {$name},
4126 }__;
4127 unless ($continue) {
4128 __CODE{ParseError}__;
4129 }
4130 } else {
4131 $self->{dtdef}-><M::DTDef.setNotationNode> ($decl);
4132 }
4133 }
4134
4135 ~ (MDC) {
4136 ?lexmode DTD;
4137 } else {
4138 ?lexmode DTD;
4139 }
4140 } // _NotationDeclaration
4141
4142 rule _EntityValue ($decl) {
4143 ?lexmode EntityValue;
4144
4145 my $vals;
4146 my $reptxt;
4147 lang:Perl {
4148 $vals = [];
4149 $reptxt = '';
4150 }
4151
4152 ~* (STRING) {
4153 lang:Perl ($v => $token.value) {
4154 $reptxt .= $v;
4155 }
4156 } (PERO) {
4157 ?lexmode EntityReference;
4158
4159 lang:Perl {
4160 $self->{has_xref} = true;
4161 $self->{dont_process} = true;
4162 }
4163
4164 // TODO: Expand or wferror if internal subset
4165
4166 ~ (Name) {
4167
4168 // Note that external subset and parameter entities are not supported
4169 lang:Perl ($name => $token.value) : has-error {
4170 __CODE{checkNCName:: $name => $name}__;
4171 my $location;
4172 __CODE{xp|get-location-from-token::
4173 $token => {$token},
4174 $result => {$location},
4175 }__;
4176 my $continue = __c|ERROR{xp|wf-pes-in-internal-subset::
4177 xp|error-token => {$token},
4178 c|location => {$location},
4179 xp|name => {$name},
4180 }__;
4181 unless ($continue) {
4182 __CODE{ParseError}__;
4183 }
4184 }
4185 }
4186
4187 ~ (REFC) {
4188 ?lexmode EntityValue;
4189 } else {
4190 ?lexmode EntityValue;
4191 }
4192 } (HCRO) {
4193 &_HexadecimalCharacterReferenceEV_ ($vals => $vals);
4194
4195 lang:Perl {
4196 $reptxt .= $vals->[-1];
4197 }
4198
4199 ~ (REFC) {
4200 ?lexmode EntityValue;
4201 } else {
4202 ?lexmode EntityValue;
4203 }
4204 } (CRO) {
4205 &_NumericCharacterReferenceEV_ ($vals => $vals);
4206
4207 lang:Perl {
4208 $reptxt .= $vals->[-1];
4209 }
4210
4211 ~ (REFC) {
4212 ?lexmode EntityValue;
4213 } else {
4214 ?lexmode EntityValue;
4215 }
4216 } (ERO) {
4217 &_GeneralEntityReferenceEV_ ($vals => $vals);
4218
4219 lang:Perl {
4220 $reptxt .= '&' . $vals->[-1] . ';';
4221 }
4222
4223 ~ (REFC) {
4224 ?lexmode EntityValue;
4225 } else {
4226 ?lexmode EntityValue;
4227 }
4228 }
4229
4230 ~ (LIT) {
4231 ?lexmode MarkupDeclaration;
4232 } (LITA) {
4233 ?lexmode MarkupDeclaration;
4234 } else {
4235 ?lexmode MarkupDeclaration;
4236 }
4237
4238 lang:Perl {
4239 $decl->{reptxt} = \$reptxt;
4240 $decl->{has_replacement_text} = true;
4241 }
4242 } // _EntityValue
4243
4244 rule _EntityValueA ($decl) {
4245 ?lexmode EntityValueA;
4246
4247 my $vals;
4248 my $reptxt;
4249 lang:Perl {
4250 $vals = [];
4251 $reptxt = '';
4252 }
4253
4254 ~* (STRING) {
4255 lang:Perl ($v => $token.value) {
4256 $reptxt .= $v;
4257 }
4258 } (PERO) {
4259 ?lexmode EntityReference;
4260
4261 lang:Perl {
4262 $self->{has_xref} = true;
4263 $self->{dont_process} = true;
4264 }
4265
4266 // TODO: implement this
4267 ~ (Name) {
4268
4269 // Note that external subset and parameter entities are not supported
4270 lang:Perl ($name => $token.value) : has-error {
4271 __CODE{checkNCName:: $name => $name}__;
4272 my $location;
4273 __CODE{xp|get-location-from-token::
4274 $token => {$token},
4275 $result => {$location},
4276 }__;
4277 my $continue = __c|ERROR{xp|wf-pes-in-internal-subset::
4278 xp|error-token => {$token},
4279 c|location => {$location},
4280 xp|name => {$name},
4281 }__;
4282 unless ($continue) {
4283 __CODE{ParseError}__;
4284 }
4285 }
4286 }
4287
4288 ~ (REFC) {
4289 ?lexmode EntityValueA;
4290 } else {
4291 ?lexmode EntityValueA;
4292 }
4293 } (HCRO) {
4294 &_HexadecimalCharacterReferenceEV_ ($vals => $vals);
4295
4296 lang:Perl {
4297 $reptxt .= $vals->[-1];
4298 }
4299
4300
4301 ~ (REFC) {
4302 ?lexmode EntityValueA;
4303 } else {
4304 ?lexmode EntityValueA;
4305 }
4306 } (CRO) {
4307 &_NumericCharacterReferenceEV_ ($vals => $vals);
4308
4309 lang:Perl {
4310 $reptxt .= $vals->[-1];
4311 }
4312
4313 ~ (REFC) {
4314 ?lexmode EntityValueA;
4315 } else {
4316 ?lexmode EntityValueA;
4317 }
4318 } (ERO) {
4319 &_GeneralEntityReferenceEV_ ($vals => $vals);
4320
4321 lang:Perl {
4322 $reptxt .= '&' . $vals->[-1] . ';';
4323 }
4324
4325 ~ (REFC) {
4326 ?lexmode EntityValueA;
4327 } else {
4328 ?lexmode EntityValueA;
4329 }
4330 }
4331
4332 ~ (LITA) {
4333 ?lexmode MarkupDeclaration;
4334 } else {
4335 ?lexmode MarkupDeclaration;
4336 }
4337
4338 lang:Perl {
4339 $decl->{reptxt} = \$reptxt;
4340 $decl->{has_replacement_text} = true;
4341 }
4342 } // _EntityValueA
4343
4344
4345 /*
4346 XML Name
4347 */
4348 lexmode NameChar {
4349 $NameStartChar10 := [
4350 '_' ':'
4351 // Letter
4352 // BaseChar
4353 U+0041..U+005A U+0061..U+007A U+00C0..U+00D6
4354 U+00D8..U+00F6 U+00F8..U+00FF U+0100..U+0131
4355 U+0134..U+013E U+0141..U+0148 U+014A..U+017E
4356 U+0180..U+01C3 U+01CD..U+01F0 U+01F4..U+01F5
4357 U+01FA..U+0217 U+0250..U+02A8 U+02BB..U+02C1
4358 U+0386 U+0388..U+038A U+038C U+038E..U+03A1
4359 U+03A3..U+03CE U+03D0..U+03D6 U+03DA U+03DC
4360 U+03DE U+03E0 U+03E2..U+03F3 U+0401..U+040C
4361 U+040E..U+044F U+0451..U+045C U+045E..U+0481
4362 U+0490..U+04C4 U+04C7..U+04C8 U+04CB..U+04CC
4363 U+04D0..U+04EB U+04EE..U+04F5 U+04F8..U+04F9
4364 U+0531..U+0556 U+0559 U+0561..U+0586
4365 U+05D0..U+05EA U+05F0..U+05F2 U+0621..U+063A
4366 U+0641..U+064A U+0671..U+06B7 U+06BA..U+06BE
4367 U+06C0..U+06CE U+06D0..U+06D3 U+06D5
4368 U+06E5..U+06E6 U+0905..U+0939 U+093D
4369 U+0958..U+0961 U+0985..U+098C U+098F..U+0990
4370 U+0993..U+09A8 U+09AA..U+09B0 U+09B2
4371 U+09B6..U+09B9 U+09DC..U+09DD U+09DF..U+09E1
4372 U+09F0..U+09F1 U+0A05..U+0A0A U+0A0F..U+0A10
4373 U+0A13..U+0A28 U+0A2A..U+0A30 U+0A32..U+0A33
4374 U+0A35..U+0A36 U+0A38..U+0A39 U+0A59..U+0A5C
4375 U+0A5E U+0A72..U+0A74 U+0A85..U+0A8B U+0A8D
4376 U+0A8F..U+0A91 U+0A93..U+0AA8 U+0AAA..U+0AB0
4377 U+0AB2..U+0AB3 U+0AB5..U+0AB9 U+0ABD U+0AE0
4378 U+0B05..U+0B0C U+0B0F..U+0B10 U+0B13..U+0B28
4379 U+0B2A..U+0B30 U+0B32..U+0B33 U+0B36..U+0B39
4380 U+0B3D U+0B5C..U+0B5D U+0B5F..U+0B61
4381 U+0B85..U+0B8A U+0B8E..U+0B90 U+0B92..U+0B95
4382 U+0B99..U+0B9A U+0B9C U+0B9E..U+0B9F
4383 U+0BA3..U+0BA4 U+0BA8..U+0BAA U+0BAE..U+0BB5
4384 U+0BB7..U+0BB9 U+0C05..U+0C0C U+0C0E..U+0C10
4385 U+0C12..U+0C28 U+0C2A..U+0C33 U+0C35..U+0C39
4386 U+0C60..U+0C61 U+0C85..U+0C8C U+0C8E..U+0C90
4387 U+0C92..U+0CA8 U+0CAA..U+0CB3 U+0CB5..U+0CB9
4388 U+0CDE U+0CE0..U+0CE1 U+0D05..U+0D0C
4389 U+0D0E..U+0D10 U+0D12..U+0D28 U+0D2A..U+0D39
4390 U+0D60..U+0D61 U+0E01..U+0E2E U+0E30
4391 U+0E32..U+0E33 U+0E40..U+0E45 U+0E81..U+0E82
4392 U+0E84 U+0E87..U+0E88 U+0E8A U+0E8D
4393 U+0E94..U+0E97 U+0E99..U+0E9F U+0EA1..U+0EA3
4394 U+0EA5 U+0EA7 U+0EAA..U+0EAB U+0EAD..U+0EAE
4395 U+0EB0 U+0EB2..U+0EB3 U+0EBD U+0EC0..U+0EC4
4396 U+0F40..U+0F47 U+0F49..U+0F69 U+10A0..U+10C5
4397 U+10D0..U+10F6 U+1100 U+1102..U+1103
4398 U+1105..U+1107 U+1109 U+110B..U+110C
4399 U+110E..U+1112 U+113C U+113E U+1140 U+114C
4400 U+114E U+1150 U+1154..U+1155 U+1159
4401 U+115F..U+1161 U+1163 U+1165 U+1167 U+1169
4402 U+116D..U+116E U+1172..U+1173 U+1175 U+119E
4403 U+11A8 U+11AB U+11AE..U+11AF U+11B7..U+11B8
4404 U+11BA U+11BC..U+11C2 U+11EB U+11F0 U+11F9
4405 U+1E00..U+1E9B U+1EA0..U+1EF9 U+1F00..U+1F15
4406 U+1F18..U+1F1D U+1F20..U+1F45 U+1F48..U+1F4D
4407 U+1F50..U+1F57 U+1F59 U+1F5B U+1F5D
4408 U+1F5F..U+1F7D U+1F80..U+1FB4 U+1FB6..U+1FBC
4409 U+1FBE U+1FC2..U+1FC4 U+1FC6..U+1FCC
4410 U+1FD0..U+1FD3 U+1FD6..U+1FDB U+1FE0..U+1FEC
4411 U+1FF2..U+1FF4 U+1FF6..U+1FFC U+2126
4412 U+212A..U+212B U+212E U+2180..U+2182
4413 U+3041..U+3094 U+30A1..U+30FA U+3105..U+312C
4414 U+AC00..U+D7A3
4415 // Ideographic
4416 U+4E00..U+9FA5 U+3007 U+3021..U+3029
4417 ];
4418 $NameChar10 := [
4419 '.' '-' '_' ':'
4420 // Letter
4421 // BaseChar
4422 U+0041..U+005A U+0061..U+007A U+00C0..U+00D6
4423 U+00D8..U+00F6 U+00F8..U+00FF U+0100..U+0131
4424 U+0134..U+013E U+0141..U+0148 U+014A..U+017E
4425 U+0180..U+01C3 U+01CD..U+01F0 U+01F4..U+01F5
4426 U+01FA..U+0217 U+0250..U+02A8 U+02BB..U+02C1
4427 U+0386 U+0388..U+038A U+038C U+038E..U+03A1
4428 U+03A3..U+03CE U+03D0..U+03D6 U+03DA U+03DC
4429 U+03DE U+03E0 U+03E2..U+03F3 U+0401..U+040C
4430 U+040E..U+044F U+0451..U+045C U+045E..U+0481
4431 U+0490..U+04C4 U+04C7..U+04C8 U+04CB..U+04CC
4432 U+04D0..U+04EB U+04EE..U+04F5 U+04F8..U+04F9
4433 U+0531..U+0556 U+0559 U+0561..U+0586
4434 U+05D0..U+05EA U+05F0..U+05F2 U+0621..U+063A
4435 U+0641..U+064A U+0671..U+06B7 U+06BA..U+06BE
4436 U+06C0..U+06CE U+06D0..U+06D3 U+06D5
4437 U+06E5..U+06E6 U+0905..U+0939 U+093D
4438 U+0958..U+0961 U+0985..U+098C U+098F..U+0990
4439 U+0993..U+09A8 U+09AA..U+09B0 U+09B2
4440 U+09B6..U+09B9 U+09DC..U+09DD U+09DF..U+09E1
4441 U+09F0..U+09F1 U+0A05..U+0A0A U+0A0F..U+0A10
4442 U+0A13..U+0A28 U+0A2A..U+0A30 U+0A32..U+0A33
4443 U+0A35..U+0A36 U+0A38..U+0A39 U+0A59..U+0A5C
4444 U+0A5E U+0A72..U+0A74 U+0A85..U+0A8B U+0A8D
4445 U+0A8F..U+0A91 U+0A93..U+0AA8 U+0AAA..U+0AB0
4446 U+0AB2..U+0AB3 U+0AB5..U+0AB9 U+0ABD U+0AE0
4447 U+0B05..U+0B0C U+0B0F..U+0B10 U+0B13..U+0B28
4448 U+0B2A..U+0B30 U+0B32..U+0B33 U+0B36..U+0B39
4449 U+0B3D U+0B5C..U+0B5D U+0B5F..U+0B61
4450 U+0B85..U+0B8A U+0B8E..U+0B90 U+0B92..U+0B95
4451 U+0B99..U+0B9A U+0B9C U+0B9E..U+0B9F
4452 U+0BA3..U+0BA4 U+0BA8..U+0BAA U+0BAE..U+0BB5
4453 U+0BB7..U+0BB9 U+0C05..U+0C0C U+0C0E..U+0C10
4454 U+0C12..U+0C28 U+0C2A..U+0C33 U+0C35..U+0C39
4455 U+0C60..U+0C61 U+0C85..U+0C8C U+0C8E..U+0C90
4456 U+0C92..U+0CA8 U+0CAA..U+0CB3 U+0CB5..U+0CB9
4457 U+0CDE U+0CE0..U+0CE1 U+0D05..U+0D0C
4458 U+0D0E..U+0D10 U+0D12..U+0D28 U+0D2A..U+0D39
4459 U+0D60..U+0D61 U+0E01..U+0E2E U+0E30
4460 U+0E32..U+0E33 U+0E40..U+0E45 U+0E81..U+0E82
4461 U+0E84 U+0E87..U+0E88 U+0E8A U+0E8D
4462 U+0E94..U+0E97 U+0E99..U+0E9F U+0EA1..U+0EA3
4463 U+0EA5 U+0EA7 U+0EAA..U+0EAB U+0EAD..U+0EAE
4464 U+0EB0 U+0EB2..U+0EB3 U+0EBD U+0EC0..U+0EC4
4465 U+0F40..U+0F47 U+0F49..U+0F69 U+10A0..U+10C5
4466 U+10D0..U+10F6 U+1100 U+1102..U+1103
4467 U+1105..U+1107 U+1109 U+110B..U+110C
4468 U+110E..U+1112 U+113C U+113E U+1140 U+114C
4469 U+114E U+1150 U+1154..U+1155 U+1159
4470 U+115F..U+1161 U+1163 U+1165 U+1167 U+1169
4471 U+116D..U+116E U+1172..U+1173 U+1175 U+119E
4472 U+11A8 U+11AB U+11AE..U+11AF U+11B7..U+11B8
4473 U+11BA U+11BC..U+11C2 U+11EB U+11F0 U+11F9
4474 U+1E00..U+1E9B U+1EA0..U+1EF9 U+1F00..U+1F15
4475 U+1F18..U+1F1D U+1F20..U+1F45 U+1F48..U+1F4D
4476 U+1F50..U+1F57 U+1F59 U+1F5B U+1F5D
4477 U+1F5F..U+1F7D U+1F80..U+1FB4 U+1FB6..U+1FBC
4478 U+1FBE U+1FC2..U+1FC4 U+1FC6..U+1FCC
4479 U+1FD0..U+1FD3 U+1FD6..U+1FDB U+1FE0..U+1FEC
4480 U+1FF2..U+1FF4 U+1FF6..U+1FFC U+2126
4481 U+212A..U+212B U+212E U+2180..U+2182
4482 U+3041..U+3094 U+30A1..U+30FA U+3105..U+312C
4483 U+AC00..U+D7A3
4484 // Ideographic
4485 U+4E00..U+9FA5 U+3007 U+3021..U+3029
4486 // Digit
4487 U+0030..U+0039 U+0660..U+0669 U+06F0..U+06F9
4488 U+0966..U+096F U+09E6..U+09EF U+0A66..U+0A6F
4489 U+0AE6..U+0AEF U+0B66..U+0B6F U+0BE7..U+0BEF
4490 U+0C66..U+0C6F U+0CE6..U+0CEF U+0D66..U+0D6F
4491 U+0E50..U+0E59 U+0ED0..U+0ED9 U+0F20..U+0F29
4492 // CombiningChar
4493 U+0300..U+0345 U+0360..U+0361 U+0483..U+0486
4494 U+0591..U+05A1 U+05A3..U+05B9 U+05BB..U+05BD
4495 U+05BF U+05C1..U+05C2 U+05C4 U+064B..U+0652
4496 U+0670 U+06D6..U+06DC U+06DD..U+06DF
4497 U+06E0..U+06E4 U+06E7..U+06E8 U+06EA..U+06ED
4498 U+0901..U+0903 U+093C U+093E..U+094C U+094D
4499 U+0951..U+0954 U+0962..U+0963 U+0981..U+0983
4500 U+09BC U+09BE U+09BF U+09C0..U+09C4
4501 U+09C7..U+09C8 U+09CB..U+09CD U+09D7
4502 U+09E2..U+09E3 U+0A02 U+0A3C U+0A3E U+0A3F
4503 U+0A40..U+0A42 U+0A47..U+0A48 U+0A4B..U+0A4D
4504 U+0A70..U+0A71 U+0A81..U+0A83 U+0ABC
4505 U+0ABE..U+0AC5 U+0AC7..U+0AC9 U+0ACB..U+0ACD
4506 U+0B01..U+0B03 U+0B3C U+0B3E..U+0B43
4507 U+0B47..U+0B48 U+0B4B..U+0B4D U+0B56..U+0B57
4508 U+0B82..U+0B83 U+0BBE..U+0BC2 U+0BC6..U+0BC8
4509 U+0BCA..U+0BCD U+0BD7 U+0C01..U+0C03
4510 U+0C3E..U+0C44 U+0C46..U+0C48 U+0C4A..U+0C4D
4511 U+0C55..U+0C56 U+0C82..U+0C83 U+0CBE..U+0CC4
4512 U+0CC6..U+0CC8 U+0CCA..U+0CCD U+0CD5..U+0CD6
4513 U+0D02..U+0D03 U+0D3E..U+0D43 U+0D46..U+0D48
4514 U+0D4A..U+0D4D U+0D57 U+0E31 U+0E34..U+0E3A
4515 U+0E47..U+0E4E U+0EB1 U+0EB4..U+0EB9
4516 U+0EBB..U+0EBC U+0EC8..U+0ECD U+0F18..U+0F19
4517 U+0F35 U+0F37 U+0F39 U+0F3E U+0F3F
4518 U+0F71..U+0F84 U+0F86..U+0F8B U+0F90..U+0F95
4519 U+0F97 U+0F99..U+0FAD U+0FB1..U+0FB7 U+0FB9
4520 U+20D0..U+20DC U+20E1 U+302A..U+302F U+3099
4521 U+309A
4522 // Extender
4523 U+00B7 U+02D0 U+02D1 U+0387 U+0640 U+0E46
4524 U+0EC6 U+3005 U+3031..U+3035 U+309D..U+309E
4525 U+30FC..U+30FE
4526 ];
4527
4528 $NameStartChar11 := [
4529 ':' '_'
4530 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M'
4531 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'
4532 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm'
4533 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z'
4534 U+00C0..U+00D6 U+00D8..U+00F6 U+00F8..U+02FF
4535 U+0370..U+037D U+037F..U+1FFF U+200C..U+200D
4536 U+2070..U+218F U+2C00..U+2FEF U+3001..U+D7FF
4537 U+F900..U+FDCF U+FDF0..U+FFFD U+10000..U+EFFFF
4538 ];
4539 $NameChar11 := [
4540 '-' '.' '0' '1' '2' '3' '4' '5' '6' '7' '8' '9'
4541 U+00B7 U+0300..U+036F U+203F..U+2040
4542 // NameStartChar
4543 ':' '_'
4544 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M'
4545 'N' 'O' 'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z'
4546 'a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm'
4547 'n' 'o' 'p' 'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z'
4548 U+00C0..U+00D6 U+00D8..U+00F6 U+00F8..U+02FF
4549 U+0370..U+037D U+037F..U+1FFF U+200C..U+200D
4550 U+2070..U+218F U+2C00..U+2FEF U+3001..U+D7FF
4551 U+F900..U+FDCF U+FDF0..U+FFFD U+10000..U+EFFFF
4552 ];
4553 } // NameChar
4554
4555 lexmode Name
4556 : extends => 'NameChar'
4557 {
4558 Name : value := $NameStartChar11 $NameChar11*;
4559 } // Name
4560
4561 lexmode Nmtoken
4562 : extends => 'NameChar'
4563 {
4564 Nmtoken : value := $NameChar11*;
4565 } // Nmtoken
4566
4567 /*
4568 S
4569 */
4570 lexmode S {
4571 $s := [U+0009 U+000A U+000D U+0020];
4572 S := $s+;
4573 } // S
4574
4575 /*
4576 Document end scanning mode
4577 */
4578 lexmode DocumentEnd
4579 : standalone
4580 : extends => 'S'
4581 {
4582 /*
4583 Processing instruction
4584 */
4585 PIO := ['<'] ['?'];
4586
4587 /*
4588 Comment declaration
4589 */
4590 CDO := ['<'] ['!'] ['-'] ['-'];
4591 } // DocumentEnd
4592
4593 /*
4594 Document misc scanning mode
4595
4596 This mode scans |Misc| constructions as well
4597 as document element's start tag.
4598 */
4599 lexmode DocumentMisc
4600 : standalone
4601 : extends => 'DocumentEnd'
4602 {
4603 /*
4604 Document element start tag
4605 */
4606 STAGO := ['<'];
4607 } // DocumentMisc
4608
4609 /*
4610 Document prolog scanning mode
4611 */
4612 lexmode DocumentProlog
4613 : standalone
4614 : extends => 'DocumentMisc'
4615 {
4616 /*
4617 |DOCTYPE| declaration
4618 */
4619 MDO := ['<'] ['!'];
4620 } // DocumentProlog
4621
4622 /*
4623 Document Start Scanning Mode
4624 */
4625 lexmode DocumentStart
4626 : standalone
4627 : extends => 'DocumentProlog'
4628 {
4629 /*
4630 XML declaration
4631 */
4632 XDO := ['<'] ['?'] ['x'] ['m'] ['l'];
4633 } // DocumentStart
4634
4635 /*
4636 Comment declaration scanning mode
4637 */
4638 lexmode CommentDeclaration
4639 : standalone
4640 {
4641 /*
4642 Comment close
4643 */
4644 COM := ['-'] ['-'];
4645
4646 /*
4647 Comment data
4648 */
4649 ?default-token STRING : value;
4650 } // CommentDeclaration
4651
4652 /*
4653 Processing instruction name and |S| scanning mode
4654 */
4655 lexmode PIName
4656 : standalone
4657 : extends => 'Name'
4658 : extends => 'S'
4659 {
4660 /*
4661 Processing instruction close
4662 */
4663 PIC := ['?'] ['>'];
4664 } // PIName
4665
4666 /*
4667 Processing instruction name and |S| scanning mode
4668 */
4669 lexmode PINmtoken
4670 : standalone
4671 : extends => 'Nmtoken'
4672 : extends => 'S'
4673 {
4674 /*
4675 Processing instruction close
4676 */
4677 PIC := ['?'] ['>'];
4678 } // PINmtoken
4679
4680 /*
4681 Processing instruction data scanning mode
4682 */
4683 lexmode PIData
4684 : standalone
4685 {
4686 /*
4687 Processing instruction close
4688 */
4689 PIC := ['?'] ['>'];
4690
4691 /*
4692 Processing instruction target data
4693 */
4694 ?default-token DATA : value;
4695 } // PIData
4696
4697 /*
4698 Content of element scanning mode
4699 */
4700 lexmode ElementContent
4701 : standalone
4702 {
4703 /*
4704 Start tag open
4705 */
4706 STAGO := ['<'];
4707
4708 /*
4709 End tag open
4710 */
4711 ETAGO := ['<'] ['/'];
4712
4713 /*
4714 Hexadecimal character reference open
4715 */
4716 HCRO := ['&'] ['#'] ['x'];
4717
4718 /*
4719 Numeric character reference open
4720 */
4721 CRO := ['&'] ['#'];
4722
4723 /*
4724 General entity reference open
4725 */
4726 ERO := ['&'];
4727
4728 /*
4729 Comment declaration open
4730 */
4731 CDO := ['<'] ['!'] ['-'] ['-'];
4732
4733 /*
4734 CDATA section open
4735 */
4736 CDSO := ['<'] ['!'] ['[']
4737 ['C'] ['D'] ['A'] ['T'] ['A'] ['['];
4738
4739 /*
4740 Processing instruction open
4741 */
4742 PIO := ['<'] ['?'];
4743
4744 /*
4745 Markup section end
4746 */
4747 MSE := [']'] [']'] ['>'];
4748
4749 /*
4750 Character data
4751 */
4752 /*
4753 Character data and/or |MSE|
4754 */
4755 ?default-token CharData : value;
4756 } // ElementContent
4757
4758 /*
4759 CDATA section content scanning mode
4760 */
4761 lexmode CDATASectionContent
4762 : standalone
4763 {
4764 /*
4765 Markup section end
4766 */
4767 MSE := [']'] [']'] ['>'];
4768
4769 /*
4770 Character data
4771 */
4772 ?default-token CData : value;
4773 } // CDATASectionContent
4774
4775 lexmode EntityReference
4776 : standalone
4777 : extends => 'Name'
4778 {
4779 /*
4780 Reference close
4781 */
4782 REFC := [';'];
4783 } // EntityReference
4784
4785 lexmode NumericCharacterReference
4786 : standalone
4787 {
4788 /*
4789 Decimal number
4790 */
4791 $digit := ['0' '1' '2' '3' '4' '5' '6' '7' '8' '9'];
4792 NUMBER : value := $digit+;
4793
4794 /*
4795 Reference close
4796 */
4797 REFC := [';'];
4798 } // NumericCharacterReference
4799
4800 lexmode HexadecimalCharacterReference
4801 : standalone
4802 {
4803 /*
4804 Hexadecimal number
4805 */
4806 $hexdigit := ['0' '1' '2' '3' '4' '5' '6' '7' '8' '9'
4807 'A' 'B' 'C' 'D' 'E' 'F'
4808 'a' 'b' 'c' 'd' 'e' 'f'];
4809 Hex : value := $hexdigit+;
4810
4811 /*
4812 Reference close
4813 */
4814 REFC := [';'];
4815 } // HexadecimalCharacterReference
4816
4817 /*
4818 The XML Declaration and Text Declaration Scanning Mode
4819 */
4820 lexmode XMLDeclaration
4821 : standalone
4822 : extends => 'Name'
4823 : extends => 'S'
4824 {
4825
4826 /*
4827 Value indicator
4828 */
4829 VI := ['='];
4830
4831 /*
4832 Literal open
4833 */
4834 LIT := ['"'];
4835 LITA := [U+0027];
4836
4837 /*
4838 Processing instruction close
4839
4840 The |PIC|, i.e. |?>|, is split into two tokens |PIC1| and |PIC2|
4841 in this scanning mode to set |no_xml11_eol| flag in the
4842 |_XMLDeclaration_| |rule|.
4843 */
4844 PIC1 := ['?'];
4845 PIC2 := ['>'];
4846 } // XMLDeclaration
4847
4848 /*
4849 The XML Declaration or Processing Instruction Scanning Mode
4850
4851 '<?xml' S ...
4852 (DocumentStart) (XMLDeclarationOrPI) (XMLDeclaration)
4853 '<?xml' '1' S ...
4854 (DocumentStart) (XMLDeclarationOrPI) (PINmtoken)(PIName) (PITarget)
4855 '<?xml' '-' 'stylesheet' S ...
4856 (DocumentStart) (XMLDeclarationOrPI) (PINmtoken) (PIName) (PITarget)
4857 */
4858 lexmode XMLDeclarationOrPI
4859 : standalone
4860 : extends => 'NameChar'
4861 : extends => 'S'
4862 {
4863 NameChar : value := $NameChar11;
4864 } // XMLDeclarationOrPI
4865
4866 lexmode StartTag
4867 : standalone
4868 : extends => 'Name'
4869 : extends => 'S'
4870 {
4871
4872 /*
4873 Value indicator
4874 */
4875 VI := ['='];
4876
4877 /*
4878 Literal open
4879 */
4880 LIT := ['"'];
4881 LITA := [U+0027];
4882
4883 /*
4884 Tag close
4885 */
4886 TAGC := ['>'];
4887
4888 /*
4889 Null end-tag enabled start-tag close
4890 */
4891 NESTC := ['/'];
4892 } // StartTag
4893
4894 lexmode EndTag
4895 : standalone
4896 : extends => 'Name'
4897 : extends => 'S'
4898 {
4899 /*
4900 Tag close
4901 */
4902 TAGC := ['>'];
4903 } // EndTag
4904
4905 lexmode AttributeValueLiteral_ {
4906 ERO := ['&'];
4907 CRO := ['&'] ['#'];
4908 HCRO := ['&'] ['#'] ['x'];
4909 } // AttributeValueLiteral_
4910
4911 lexmode AttributeValueLiteral
4912 : standalone
4913 : extends => 'AttributeValueLiteral_'
4914 {
4915 LIT := ['"'];
4916 STRING : value := [^'"' '&' '<']+;
4917 } // AttributeValueLiteral
4918
4919 lexmode AttributeValueLiteralA
4920 : standalone
4921 : extends => 'AttributeValueLiteral_'
4922 {
4923 LITA := [U+0027];
4924 STRING : value := [^U+0027 '&' '<']+;
4925 } // AttributeValueLiteralA
4926
4927 lexmode AttributeValueLiteralE
4928 : standalone
4929 : extends => 'AttributeValueLiteral_'
4930 {
4931 STRING : value := [^'&' '<']+;
4932 } // AttributeValueLiteralE
4933
4934 lexmode EntityValue_ {
4935 PERO := ['%'];
4936 ERO := ['&'];
4937 CRO := ['&'] ['#'];
4938 HCRO := ['&'] ['#'] ['x'];
4939 } // EntityValue_
4940
4941 lexmode EntityValue
4942 : standalone
4943 : extends => 'EntityValue_'
4944 {
4945 LIT := ['"'];
4946 STRING : value := [^'"' '&' '%']+;
4947 } // EntityValue
4948
4949 lexmode EntityValueA
4950 : standalone
4951 : extends => 'EntityValue_'
4952 {
4953 LITA := [U+0027];
4954 STRING : value := [^U+0027 '&' '%']+;
4955 } // EntityValueA
4956
4957 lexmode SystemLiteral
4958 : standalone
4959 {
4960 LIT := ['"'];
4961 ?default-token STRING : value;
4962 } // SystemLiteral
4963
4964 lexmode SystemLiteralA
4965 : standalone
4966 {
4967 LITA := [U+0027];
4968 ?default-token STRING : value;
4969 } // SystemLiteralA
4970
4971 lexmode DTD
4972 : standalone
4973 : extends => 'S'
4974 {
4975 /*
4976 Markup declaration open
4977 */
4978 MDO := ['<'] ['!'];
4979
4980 /*
4981 Comment declaration open
4982 */
4983 CDO := ['<'] ['!'] ['-'] ['-'];
4984
4985 /*
4986 Processing instruction open
4987 */
4988 PIO := ['<'] ['?'];
4989
4990 /*
4991 Parameter entity reference open
4992 */
4993 PERO := ['%'];
4994
4995 /*
4996 Declaration subset close
4997 */
4998 DSC := [']'];
4999
5000 /*
5001 Contition section open
5002 */
5003 CSO := ['<'] ['!'] ['['];
5004 } // DTD
5005
5006 /*
5007 Markup declaration scanning mode
5008
5009 This mode is used to recognize |MDC| that terminates
5010 a comment declaration as well as the base |lexmode|
5011 for e.g. document type declaration scanning mode.
5012 */
5013 lexmode MarkupDeclaration
5014 : standalone
5015 : extends => 'Name'
5016 : extends => 'S'
5017 {
5018 /*
5019 Markup declaration close
5020 */
5021 MDC := ['>'];
5022
5023 /*
5024 Literal open
5025 */
5026 LIT := ['"'];
5027
5028 /*
5029 Alternative literal open
5030 */
5031 LITA := [U+0027];
5032
5033 /*
5034 Parameter entity reference open
5035 */
5036 PERO := ['%'];
5037
5038 /*
5039 Declaration subset open
5040 */
5041 DSO := ['['];
5042 } // MarkupDeclaration
5043
5044 lexmode ElementDeclaration
5045 : standalone
5046 : extends => 'MarkupDeclaration'
5047 {
5048 /*
5049 Model group open
5050 */
5051 MGO := ['('];
5052
5053 /*
5054 Model group close
5055 */
5056 MGC := [')'];
5057
5058 /*
5059 Reserved name indicator
5060 */
5061 RNI := ['#'];
5062
5063 /*
5064 Occurence indicators
5065 */
5066 OPT := ['?'];
5067 REP := ['*'];
5068 PLUS := ['+'];
5069
5070 /*
5071 Connectors
5072 */
5073 OR := ['|'];
5074 SEQ := [','];
5075 } // ElementDeclaration
5076
5077 lexmode AttlistDeclaration
5078 : standalone
5079 : extends => 'MarkupDeclaration'
5080 {
5081 /*
5082 Enumeration group open
5083 */
5084 EGO := ['('];
5085
5086 /*
5087 Enumeration group close
5088 */
5089 EGC := [')'];
5090
5091 /*
5092 Enumeration choice delimiter
5093 */
5094 OR := ['|'];
5095
5096 /*
5097 Reserved name indicator
5098 */
5099 RNI := ['#'];
5100 } // AttlistDeclaration
5101
5102 lexmode Enumeration
5103 : standalone
5104 : extends => 'Nmtoken'
5105 : extends => 'S'
5106 {
5107 /*
5108 Enumeration group close
5109 */
5110 EGC := [')'];
5111
5112 /*
5113 Enumeration choice delimiter
5114 */
5115 OR := ['|'];
5116 } // Enumeration
5117
5118
5119 token-error default : default {
5120 lang:Perl {
5121 my $location;
5122 __CODE{xp|get-location-from-token::
5123 $token => {$token},
5124 $result => {$location},
5125 }__;
5126 my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
5127 xp|error-token => {$token},
5128 DOMCore|location => {$location},
5129 }__;
5130 unless ($continue) {
5131 __CODE{ParseError}__;
5132 }
5133 }
5134 } // default
5135
5136 @ResourceDef:
5137 @@ForCheck: ManakaiDOM|ForClass
5138 @@QName: ParseError
5139 @@rdf:type: DISPerl|BlockCode
5140 @@PerlDef:
5141 __DEEP{
5142 for (@{$self->{entity}}) {
5143 $_->{close_file}->();
5144 }
5145 }__;
5146 __EXCEPTION{DOMLS|PARSE_ERR}__;
5147
5148 @ResourceDef:
5149 @@ForCheck: ManakaiDOM|ForClass
5150 @@QName: checkNCName
5151 @@rdf:type: DISPerl|BlockCode
5152 @@PerlDef:
5153 if (($self->{xml_version} eq '1.0' and
5154 not <Code::DOMMain|testXML10Name:: $INPUT = $name>) or
5155 ($self->{xml_version} eq '1.1' and
5156 not <Code::DOMMain|testXML11Name:: $INPUT = $name>)) {
5157 my $__location;
5158 __CODE{xp|get-location-from-token::
5159 $token => {$token},
5160 $result => {$__location},
5161 }__;
5162 my $__continue = __c|ERROR{xp|wf-invalid-character-in-node-name::
5163 xp|error-token => {$token},
5164 c|location => {$__location},
5165 xp|name => {$name},
5166 infoset|version => {$self->{xml_version}},
5167 }__;
5168 unless ($__continue) {
5169 __CODE{ParseError}__;
5170 }
5171 } elsif (index ($name, ':') > -1) {
5172 my $__location;
5173 __CODE{xp|get-location-from-token::
5174 $token => {$token},
5175 $result => {$__location},
5176 }__;
5177 my $__continue = __c|ERROR{xp|nswf-legal-ncname::
5178 xp|error-token => {$token},
5179 c|location => {$__location},
5180 xp|name => {$name},
5181 infoset|version => {$self->{xml_version}},
5182 }__;
5183 unless ($__continue) {
5184 __CODE{ParseError}__;
5185 }
5186 }
5187
5188 @ResourceDef:
5189 @@ForCheck: ManakaiDOM|ForClass
5190 @@QName: checkQName
5191 @@rdf:type: DISPerl|BlockCode
5192 @@PerlDef:
5193 if (($self->{xml_version} eq '1.0' and
5194 not <Code::DOMMain|testXML10Name:: $INPUT = $name>) or
5195 ($self->{xml_version} eq '1.1' and
5196 not <Code::DOMMain|testXML11Name:: $INPUT = $name>)) {
5197 my $__location;
5198 __CODE{xp|get-location-from-token::
5199 $token => {$token},
5200 $result => {$__location},
5201 }__;
5202 my $__continue = __c|ERROR{xp|wf-invalid-character-in-node-name::
5203 xp|error-token => {$token},
5204 c|location => {$__location},
5205 xp|name => {$name},
5206 infoset|version => {$self->{xml_version}},
5207 }__;
5208 unless ($__continue) {
5209 __CODE{ParseError}__;
5210 }
5211 } elsif (($self->{xml_version} eq '1.0' and
5212 not <Code::DOMMain|testXML10QName:: $INPUT = $name>) or
5213 ($self->{xml_version} eq '1.1' and
5214 not <Code::DOMMain|testXML11QName:: $INPUT = $name>)) {
5215 my $__location;
5216 __CODE{xp|get-location-from-token::
5217 $token => {$token},
5218 $result => {$__location},
5219 }__;
5220 my $__continue = __c|ERROR{xp|nswf-legal-qname::
5221 xp|error-token => {$token},
5222 c|location => {$__location},
5223 xp|name => {$name},
5224 infoset|version => {$self->{xml_version}},
5225 }__;
5226 unless ($__continue) {
5227 __CODE{ParseError}__;
5228 }
5229 }
5230
5231
5232 @XMLTests:
5233 @@XMLTest:
5234 @@@QName: xp.char.xml10.test
5235 @@@DEnt:
5236 @@@@test:value:
5237 <?xml version="1.0"?>
5238 <p>$u0009$u000A$u000D$u0020$uD7FF$uE000$uFFFD$U00010000$U0010FFFF</p>
5239 @@@test:domTree:
5240 document {
5241 xml-version: '1.0';
5242 element {
5243 text-content: U+0009 U+000A U+000A U+0020 U+D7FF
5244 U+E000 U+FFFD U+10000 U+10FFFF;
5245 }
5246 }
5247 @@XMLTest:
5248 @@@QName: xp.char.xml11.test
5249 @@@DEnt:
5250 @@@@test:value:
5251 <?xml version="1.1"?>
5252 <p>$u0009$u000A$u000D$u0020$uD7FF$uE000$uFFFD$U00010000$U0010FFFF</p>
5253 @@@test:domTree:
5254 document {
5255 xml-version: '1.1';
5256 element {
5257 text-content: U+0009 U+000A U+000A U+0020 U+D7FF
5258 U+E000 U+FFFD U+10000 U+10FFFF;
5259 }
5260 }
5261 @@XMLTest:
5262 @@@QName: xp.char.xml10.c0.test
5263 @@@DEnt:
5264 @@@@test:value:
5265 <?xml version="1.0"?>
5266 <p>$u0000$u0001$u0002$u0003$u0004$u0005$u0006$u0007$u0008$u000B$
5267 $u000C$u000E$u000F$u0010$u0011$u0012$u0013$u0014$u0015$u0016$
5268 $u0017$u0018$u0019$u001A$u001B$u001C$u001D$u001E$u001F</p>
5269 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+0000 */
5270 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0001 */
5271 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0002 */
5272 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0003 */
5273 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0004 */
5274 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0005 */
5275 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0006 */
5276 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0007 */
5277 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0008 */
5278 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+000B */
5279 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+000C */
5280 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+000E */
5281 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+000F */
5282 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+0010 */
5283 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+0011 */
5284 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+0012 */
5285 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0013 */
5286 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0014 */
5287 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0015 */
5288 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0016 */
5289 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0017 */
5290 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0018 */
5291 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0019 */
5292 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+001A */
5293 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+001B */
5294 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+001C */
5295 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+001D */
5296 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+001E */
5297 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+001F */
5298 @@XMLTest:
5299 @@@QName: xp.char.xml11.c0.test
5300 @@@DEnt:
5301 @@@@test:value:
5302 <?xml version="1.1"?>
5303 <p>$u0000$u0001$u0002$u0003$u0004$u0005$u0006$u0007$u0008$u000B$
5304 $u000C$u000E$u000F$u0010$u0011$u0012$u0013$u0014$u0015$u0016$
5305 $u0017$u0018$u0019$u001A$u001B$u001C$u001D$u001E$u001F</p>
5306 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+0000 */
5307 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0001 */
5308 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0002 */
5309 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0003 */
5310 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0004 */
5311 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0005 */
5312 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0006 */
5313 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0007 */
5314 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0008 */
5315 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+000B */
5316 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+000C */
5317 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+000E */
5318 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+000F */
5319 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+0010 */
5320 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+0011 */
5321 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+0012 */
5322 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0013 */
5323 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0014 */
5324 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0015 */
5325 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0016 */
5326 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0017 */
5327 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0018 */
5328 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0019 */
5329 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+001A */
5330 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+001B */
5331 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+001C */
5332 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+001D */
5333 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+001E */
5334 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+001F */
5335 @@XMLTest:
5336 @@@QName: xp.char.xml10.c1.test
5337 @@@DEnt:
5338 @@@@test:value:
5339 <?xml version="1.0"?>
5340 <p>$u007F$u0080$u0081$u0082$u0083$u0084$u0086$u0087$u0088$
5341 $u0089$u008A$u008B$u008C$
5342 $u008D$u008E$u008F$u0090$u0091$u0092$u0093$u0094$u0095$u0096$
5343 $u0097$u0098$u0099$u009A$u009B$u009C$u009D$u009E$u009F$u0085</p>
5344 @@@test:domTree:
5345 document {
5346 xml-version: '1.0';
5347 element {
5348 text-content: U+007F U+0080 U+0081 U+0082 U+0083 U+0084 U+0086
5349 U+0087 U+0088 U+0089 U+008A U+008B U+008C U+008D
5350 U+008E U+008F U+0090 U+0091 U+0092 U+0093 U+0094
5351 U+0095 U+0096 U+0097 U+0098 U+0099 U+009A U+009B
5352 U+009C U+009D U+009E U+009F U+0085;
5353 }
5354 }
5355 @@XMLTest:
5356 @@@QName: xp.char.xml11.c1.test
5357 @@@DEnt:
5358 @@@@test:value:
5359 <?xml version="1.1"?>
5360 <p>$u007F$u0080$u0081$u0082$u0083$u0084$u0086$u0087$u0088$
5361 $u0089$u008A$u008B$u008C$
5362 $u008D$u008E$u008F$u0090$u0091$u0092$u0093$u0094$u0095$u0096$
5363 $u0097$u0098$u0099$u009A$u009B$u009C$u009D$u009E$u009F$u0085</p>
5364 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 4); } /* U+007F */
5365 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 5); } /* U+0080 */
5366 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 6); } /* U+0081 */
5367 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 7); } /* U+0082 */
5368 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 8); } /* U+0083 */
5369 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 9); } /* U+0084 */
5370 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 10); } /* U+0086 */
5371 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 11); } /* U+0087 */
5372 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 12); } /* U+0088 */
5373 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 13); } /* U+0089 */
5374 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 14); } /* U+008A */
5375 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 15); } /* U+008B */
5376 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 16); } /* U+008C */
5377 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 17); } /* U+008D */
5378 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 18); } /* U+008E */
5379 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 19); } /* U+008F */
5380 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 20); } /* U+0090 */
5381 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 21); } /* U+0091 */
5382 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 22); } /* U+0092 */
5383 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 23); } /* U+0093 */
5384 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 24); } /* U+0094 */
5385 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 25); } /* U+0095 */
5386 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 26); } /* U+0096 */
5387 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 27); } /* U+0097 */
5388 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 28); } /* U+0098 */
5389 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 29); } /* U+0099 */
5390 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 30); } /* U+009A */
5391 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 31); } /* U+009B */
5392 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 32); } /* U+009C */
5393 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 33); } /* U+009D */
5394 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 34); } /* U+009E */
5395 @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 35); } /* U+009F */
5396
5397 @@XMLTest:
5398 @@@QName: xp.c0.internal.entity.xml11.1.test
5399 @@@DEnt:
5400 @@@@test:value:
5401 <?xml version="1.1"?>
5402 <!DOCTYPE a [
5403 <!ENTITY e "&#x01;&#x02;&#x03;&#x04;&#x05;&#x06;&#x07;$
5404 &#x08;&#x09;&#x0A;&#x0B;&#x0C;&#x0D;&#x0E;&#x0F;$
5405 &#x10;&#x11;&#x12;&#x13;&#x14;&#x15;&#x16;&#x17;$
5406 &#x18;&#x19;&#x1A;&#x1B;&#x1C;&#x1D;&#x1E;&#x1F;">
5407 ]><a/>
5408 @@@test:domTree:
5409 document {
5410 document-type {
5411 general-entity {
5412 node-name: 'e';
5413 text-content: U+0001 U+0002 U+0003 U+0004 U+0005
5414 U+0006 U+0007 U+0008 U+0009 U+000A U+000B
5415 U+000C U+000D U+000E U+000F
5416 U+0010 U+0011 U+0012 U+0013 U+0014 U+0015
5417 U+0016 U+0017 U+0018 U+0019 U+001A U+001B
5418 U+001C U+001D U+001E U+001F;
5419 }
5420 }
5421 element { }
5422 }
5423 @@XMLTest:
5424 @@@QName: xp.c1.internal.entity.xml11.1.test
5425 @@@DEnt:
5426 @@@@test:value:
5427 <?xml version="1.1"?>
5428 <!DOCTYPE a [
5429 <!ENTITY e "&#x80;&#x81;&#x82;&#x83;&#x84;&#x85;&#x86;&#x87;$
5430 &#x88;&#x89;&#x8A;&#x8B;&#x8C;&#x8D;&#x8E;&#x8F;$
5431 &#x90;&#x91;&#x92;&#x93;&#x94;&#x95;&#x96;&#x97;$
5432 &#x98;&#x99;&#x9A;&#x9B;&#x9C;&#x9D;&#x9E;&#x9F;&#x7F;">
5433 ]><a/>
5434 @@@test:domTree:
5435 document {
5436 document-type {
5437 general-entity {
5438 node-name: 'e';
5439 text-content: U+0080 U+0081 U+0082 U+0083 U+0084 U+0085
5440 U+0086 U+0087 U+0088 U+0089 U+008A U+008B
5441 U+008C U+008D U+008E U+008F
5442 U+0090 U+0091 U+0092 U+0093 U+0094 U+0095
5443 U+0096 U+0097 U+0098 U+0099 U+009A U+009B
5444 U+009C U+009D U+009E U+009F U+007F;
5445 }
5446 }
5447 element { }
5448 }
5449
5450 @@XMLTest:
5451 @@@QName: xp.syntax.empty.test
5452 @@@DEnt:
5453 @@@@test:value: \
5454 @@@c:erred:
5455 <[[xp:wf-syntax-error]]> { (1, 1); }
5456 @@XMLTest:
5457 @@@QName: xp.syntax.space.test
5458 @@@DEnt:
5459 @@@@test:value: \
5460 @@@c:erred:
5461 <[[xp:wf-syntax-error]]> { (1, 4); }
5462 @@XMLTest:
5463 @@@QName: xp.syntax.newlines.test
5464 @@@DEnt:
5465 @@@@test:value:
5466 \
5467 \
5468 \
5469 @@@c:erred:
5470 <[[xp:wf-syntax-error]]> { (3, 1); }
5471
5472 @@XMLTest:
5473 @@@QName: xp.only.docel.test
5474 @@@DEnt:
5475 @@@@test:value:
5476 <p></p>
5477 @@@test:domTree:
5478 document {
5479 xml-version: '1.0';
5480 xml-encoding: null;
5481 xml-standalone: false;
5482 element {
5483 namespace-uri: null;
5484 prefix: null;
5485 local-name: 'p';
5486 text-content: '';
5487 }
5488 }
5489 @@XMLTest:
5490 @@@QName: xp.only.docel.emptyelemtag.test
5491 @@@DEnt:
5492 @@@@test:value:
5493 <p/>
5494 @@@test:domTree:
5495 document {
5496 xml-version: '1.0';
5497 xml-encoding: null;
5498 xml-standalone: false;
5499 element {
5500 namespace-uri: null;
5501 prefix: null;
5502 local-name: 'p';
5503 text-content: '';
5504 }
5505 }
5506 @@XMLTest:
5507 @@@QName: xp.root.s.1.test
5508 @@@DEnt:
5509 @@@@test:value:
5510 <?xml version="1.0"?>$u0020$u000D$u000A$u0009
5511 <p></p>
5512 @@@test:domTree:
5513 document {
5514 element { }
5515 }
5516
5517 @@XMLTest:
5518 @@@QName: xp.Name.1.test
5519 @@@DEnt:
5520 @@@@test:value: <name/>
5521 @@@test:domTree:
5522 document {
5523 element {
5524 node-name: 'name';
5525 }
5526 }
5527 @@XMLTest:
5528 @@@QName: xp.Name.2.test
5529 @@@DEnt:
5530 @@@@test:value: <name0/>
5531 @@@test:domTree:
5532 document {
5533 element {
5534 node-name: 'name0';
5535 }
5536 }
5537 @@enImplNote:
5538 @@@ddid: xml11name
5539 @@@@:
5540 {TODO:: XML 1.1 Name tests required
5541 }
5542
5543 @@XMLTest:
5544 @@@QName: xp.content.mse.1.test
5545 @@@DEnt:
5546 @@@@test:value:
5547 <p>]]></p>
5548 @@@c:erred:
5549 <[[xp|wf-syntax-error]]> { (1, 4)..(1, 6); }
5550 @@XMLTest:
5551 @@@QName: xp.content.mse.2.test
5552 @@@DEnt:
5553 @@@@test:value:
5554 <p>aaa]]>bbb</p>
5555 @@@c:erred:
5556 <[[xp|wf-syntax-error]]> { (1, 7)..(1, 9); }
5557
5558 @@XMLTest:
5559 @@@QName: xp.root.comment.1.test
5560 @@@DEnt:
5561 @@@@test:value:
5562 <!--comment data-->
5563 <p/>
5564 @@@test:domTree:
5565 document {
5566 comment {
5567 data: 'comment data';
5568 }
5569 element { }
5570 }
5571 @@XMLTest:
5572 @@@QName: xp.root.comment.2.test
5573 @@@DEnt:
5574 @@@@test:value:
5575 <!---->
5576 <p/>
5577 @@@test:domTree:
5578 document {
5579 comment {
5580 data: '';
5581 }
5582 element { }
5583 }
5584 @@XMLTest:
5585 @@@QName: xp.root.after.pi.comment.1.test
5586 @@@DEnt:
5587 @@@@test:value:
5588 <?pi?>
5589 <!--comment data-->
5590 <p/>
5591 @@@test:domTree:
5592 document {
5593 pi { }
5594 comment {
5595 data: 'comment data';
5596 }
5597 element { }
5598 }
5599 @@XMLTest:
5600 @@@QName: xp.root.after.pi.comment.2.test
5601 @@@DEnt:
5602 @@@@test:value:
5603 <?pi?>
5604 <!---->
5605 <p/>
5606 @@@test:domTree:
5607 document {
5608 pi { }
5609 comment {
5610 data: '';
5611 }
5612 element { }
5613 }
5614 @@XMLTest:
5615 @@@QName: xp.root.after.element.comment.1.test
5616 @@@DEnt:
5617 @@@@test:value:
5618 <p/>
5619 <!--comment data-->
5620 @@@test:domTree:
5621 document {
5622 element { }
5623 comment {
5624 data: 'comment data';
5625 }
5626 }
5627 @@XMLTest:
5628 @@@QName: xp.root.after.element.comment.2.test
5629 @@@DEnt:
5630 @@@@test:value:
5631 <p/>
5632 <!---->
5633 @@@test:domTree:
5634 document {
5635 element { }
5636 comment {
5637 data: '';
5638 }
5639 }
5640 @@XMLTest:
5641 @@@QName: xp.doctype.intsubset.comment.1.test
5642 @@@DEnt:
5643 @@@@test:value:
5644 <!DOCTYPE a [
5645 <!--comment data-->
5646 ]>
5647 <p/>
5648 @@@test:domTree:
5649 document {
5650 document-type { }
5651 element { }
5652 }
5653 @@XMLTest:
5654 @@@QName: xp.doctype.intsubset.comment.2.test
5655 @@@DEnt:
5656 @@@@test:value:
5657 <!DOCTYPE a [
5658 <!---->
5659 ]>
5660 <p/>
5661 @@@test:domTree:
5662 document {
5663 document-type { }
5664 element { }
5665 }
5666 @@XMLTest:
5667 @@@QName: xp.doctype.intsubset.comment.3.test
5668 @@@DEnt:
5669 @@@@test:value:
5670 <!DOCTYPE a [
5671 <?pi?>
5672 <!---->
5673 ]>
5674 <p/>
5675 @@@test:domTree:
5676 document {
5677 document-type {
5678 pi { }
5679 }
5680 element { }
5681 }
5682 @@XMLTest:
5683 @@@QName: xp.content.comment.1.test
5684 @@@DEnt:
5685 @@@@test:value:
5686 <p><!--comment data--></p>
5687 @@@test:domTree:
5688 document {
5689 element {
5690 comment {
5691 data: 'comment data';
5692 }
5693 }
5694 }
5695 @@XMLTest:
5696 @@@QName: xp.content.comment.2.test
5697 @@@DEnt:
5698 @@@@test:value:
5699 <p><!----></p>
5700 @@@test:domTree:
5701 document {
5702 element {
5703 comment {
5704 data: '';
5705 }
5706 }
5707 }
5708 @@XMLTest:
5709 @@@QName: xp.content.comment.3.test
5710 @@@DEnt:
5711 @@@@test:value:
5712 <p>aaaaa<!---->bbbbb</p>
5713 @@@test:domTree:
5714 document {
5715 element {
5716 text {
5717 data: 'aaaaa';
5718 }
5719 comment {
5720 data: '';
5721 }
5722 text {
5723 data: 'bbbbb';
5724 }
5725 }
5726 }
5727 @@XMLTest:
5728 @@@QName: xp.content.comment.--.1.test
5729 @@@DEnt:
5730 @@@@test:value:
5731 <p><!--data--data--></p>
5732 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 12)..(1, 17); }
5733 @@XMLTest:
5734 @@@QName: xp.content.comment.---gt.test
5735 @@@DEnt:
5736 @@@@test:value:
5737 <p><!--data---></p>
5738 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 12)..(1, 15); }
5739
5740 @@XMLTest:
5741 @@@QName: xp.xmldecl.version.1.0.test
5742 @@@DEnt:
5743 @@@@test:value:
5744 <?xml version="1.0"?>
5745 <p></p>
5746 @@@test:domTree:
5747 document {
5748 xml-version: '1.0';
5749 xml-encoding: null;
5750 xml-standalone: false;
5751 element { }
5752 }
5753 @@XMLTest:
5754 @@@QName: xp.xmldecl.version.1.0.lita.test
5755 @@@DEnt:
5756 @@@@test:value:
5757 <?xml version='1.0'?>
5758 <p></p>
5759 @@@test:domTree:
5760 document {
5761 xml-version: '1.0';
5762 xml-encoding: null;
5763 xml-standalone: false;
5764 element { }
5765 }
5766 @@XMLTest:
5767 @@@QName: xp.xmldecl.version.1.0.s.test
5768 @@@DEnt:
5769 @@@@test:value:
5770 <?xml version = "1.0" ?>
5771 <p></p>
5772 @@@test:domTree:
5773 document {
5774 xml-version: '1.0';
5775 xml-encoding: null;
5776 xml-standalone: false;
5777 element { }
5778 }
5779 @@XMLTest:
5780 @@@QName: xp.xmldecl.version.1.1.test
5781 @@@DEnt:
5782 @@@@test:value:
5783 <?xml version="1.1"?>
5784 <p></p>
5785 @@@test:domTree:
5786 document {
5787 xml-version: '1.1';
5788 xml-encoding: null;
5789 xml-standalone: false;
5790 element { }
5791 }
5792
5793 @@XMLTest:
5794 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.test
5795 @@@DEnt:
5796 @@@@test:value:
5797 <?xml version="1.0" encoding="US-ascii"?>
5798 <p></p>
5799 @@@test:domTree:
5800 document {
5801 xml-version: '1.0';
5802 xml-encoding: 'US-ascii';
5803 xml-standalone: false;
5804 element { }
5805 }
5806 @@XMLTest:
5807 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.lita.test
5808 @@@DEnt:
5809 @@@@test:value:
5810 <?xml version="1.0" encoding='US-ascii'?>
5811 <p></p>
5812 @@@test:domTree:
5813 document {
5814 xml-version: '1.0';
5815 xml-encoding: 'US-ascii';
5816 xml-standalone: false;
5817 element { }
5818 }
5819 @@XMLTest:
5820 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.s.test
5821 @@@DEnt:
5822 @@@@test:value:
5823 <?xml version="1.0" encoding = "US-ascii" ?>
5824 <p></p>
5825 @@@test:domTree:
5826 document {
5827 xml-version: '1.0';
5828 xml-encoding: 'US-ascii';
5829 xml-standalone: false;
5830 element { }
5831 }
5832
5833 @@XMLTest:
5834 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.test
5835 @@@DEnt:
5836 @@@@test:value:
5837 <?xml version="1.0" encoding="us-ascii" standalone="yes"?>
5838 <p></p>
5839 @@@test:domTree:
5840 document {
5841 xml-version: '1.0';
5842 xml-encoding: 'us-ascii';
5843 xml-standalone: true;
5844 element { }
5845 }
5846 @@XMLTest:
5847 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.no.test
5848 @@@DEnt:
5849 @@@@test:value:
5850 <?xml version="1.0" encoding="us-ascii" standalone="no"?>
5851 <p></p>
5852 @@@test:domTree:
5853 document {
5854 xml-version: '1.0';
5855 xml-encoding: 'us-ascii';
5856 xml-standalone: false;
5857 element { }
5858 }
5859 @@XMLTest:
5860 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.lita.test
5861 @@@DEnt:
5862 @@@@test:value:
5863 <?xml version="1.0" encoding="us-ascii" standalone='yes'?>
5864 <p></p>
5865 @@@test:domTree:
5866 document {
5867 xml-version: '1.0';
5868 xml-encoding: 'us-ascii';
5869 xml-standalone: true;
5870 element { }
5871 }
5872 @@XMLTest:
5873 @@@QName: xp.xmldecl.version.1.0.encoding.usascii.standalone.yes.s.test
5874 @@@DEnt:
5875 @@@@test:value:
5876 <?xml version="1.0" encoding="us-ascii" standalone = "yes" ?>
5877 <p></p>
5878 @@@test:domTree:
5879 document {
5880 xml-version: '1.0';
5881 xml-encoding: 'us-ascii';
5882 xml-standalone: true;
5883 element { }
5884 }
5885 @@XMLTest:
5886 @@@QName: xp.xmldecl.no.encoding.but.standalone.attr.test
5887 @@@DEnt:
5888 @@@@test:value:
5889 <?xml version="1.0" standalone="yes"?>
5890 <p></p>
5891 @@@test:domTree:
5892 document {
5893 xml-version: '1.0';
5894 xml-encoding: null;
5895 xml-standalone: true;
5896 element { }
5897 }
5898 @@XMLTest:
5899 @@@QName: xp.xmldecl.encoding.encname.test
5900 @@@DEnt:
5901 @@@@test:value:
5902 <?xml version="1.0" encoding="a-._01-"?>
5903 <p></p>
5904 @@@test:domTree:
5905 document {
5906 xml-version: '1.0';
5907 xml-encoding: 'a-._01-';
5908 xml-standalone: false;
5909 element { }
5910 }
5911
5912 @@XMLTest:
5913 @@@QName: xp.xmldecl.no.s.no.attr.test
5914 @@@DEnt:
5915 @@@@test:value:
5916 <?xml?>
5917 <p></p>
5918 @@@c:erred:
5919 <[[xp:wf-syntax-error]]> { (1, 1)..(1, 7); }
5920 @@XMLTest:
5921 @@@QName: xp.xmldecl.s.no.attr.test
5922 @@@DEnt:
5923 @@@@test:value:
5924 <?xml ?>
5925 <p></p>
5926 @@@c:erred:
5927 <[[xp:wf-syntax-error]]> { (1, 8)..(1, 9); }
5928 @@XMLTest:
5929 @@@QName: xp.xmldecl.unknown.attr.test
5930 @@@DEnt:
5931 @@@@test:value:
5932 <?xml unknown="value"?>
5933 <p></p>
5934 @@@c:erred:
5935 <[[xp:wf-syntax-error]]> { (1, 8)..(1, 22); }
5936 @@XMLTest:
5937 @@@QName: xp.xmldecl.version.unknown.attr.test
5938 @@@DEnt:
5939 @@@@test:value:
5940 <?xml version="1.0" unknown="value"?>
5941 <p></p>
5942 @@@c:erred:
5943 <[[xp:wf-syntax-error]]> { (1, 21)..(1, 35); }
5944 @@XMLTest:
5945 @@@QName: xp.xmldecl.version.encoding.unknown.attr.test
5946 @@@DEnt:
5947 @@@@test:value:
5948 <?xml version="1.0" encoding="us-ascii" unknown="value"?>
5949 <p></p>
5950 @@@c:erred:
5951 <[[xp:wf-syntax-error]]> { (1, 41)..(1, 55); }
5952 @@XMLTest:
5953 @@@QName: xp.xmldecl.version.encoding.standalone.unknown.attr.test
5954 @@@DEnt:
5955 @@@@test:value:
5956 <?xml version="1.0" encoding="us-ascii" standalone="yes"
5957 unknown="value"?>
5958 <p></p>
5959 @@@c:erred:
5960 <[[xp:wf-syntax-error]]> { (2, 1)..(2, 15); }
5961 @@XMLTest:
5962 @@@QName: xp.xmldecl.no.version.but.encoding.attr.test
5963 @@@DEnt:
5964 @@@@test:value:
5965 <?xml encoding="us-ascii"?>
5966 <p></p>
5967 @@@c:erred:
5968 <[[xp:wf-syntax-error]]> { (1, 7)..(1, 25); }
5969 @@XMLTest:
5970 @@@QName: xp.xmldecl.no.version.but.standalone.attr.test
5971 @@@DEnt:
5972 @@@@test:value:
5973 <?xml standalone="yes"?>
5974 <p></p>
5975 @@@c:erred:
5976 <[[xp:wf-syntax-error]]> { (1, 7)..(1, 24); }
5977 @@XMLTest:
5978 @@@QName: xp.xmldecl.version.unsupported.test
5979 @@@DEnt:
5980 @@@@test:value:
5981 <?xml version="1.2"?>
5982 <p></p>
5983 @@@c:erred:
5984 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 19); }
5985 @@XMLTest:
5986 @@@QName: xp.xmldecl.version.unsupported.2.test
5987 @@@DEnt:
5988 @@@@test:value:
5989 <?xml version=" 1.0 "?>
5990 <p></p>
5991 @@@c:erred:
5992 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 21); }
5993 @@XMLTest:
5994 @@@QName: xp.xmldecl.version.unsupported.3.test
5995 @@@DEnt:
5996 @@@@test:value:
5997 <?xml version="01.00"?>
5998 <p></p>
5999 @@@c:erred:
6000 <[[xp:wf-unsupported-xml-version]]> { (1, 7)..(1, 21); }
6001 @@XMLTest:
6002 @@@QName: xp.xmldecl.encoding.malformed.1.test
6003 @@@DEnt:
6004 @@@@test:value:
6005 <?xml version="1.0" encoding="0088"?>
6006 <p></p>
6007 @@@c:erred:
6008 <[[xp:wf-malformed-enc-name]]> { (1, 21)..(1, 35); }
6009 @@XMLTest:
6010 @@@QName: xp.xmldecl.encoding.malformed.2.test
6011 @@@DEnt:
6012 @@@@test:value:
6013 <?xml version="1.0" encoding="D.V.D!"?>
6014 <p></p>
6015 @@@c:erred:
6016 <[[xp:wf-malformed-enc-name]]> { (1, 21)..(1, 38); }
6017 @@XMLTest:
6018 @@@QName: xp.xmldecl.standalone.malformed.1.test
6019 @@@DEnt:
6020 @@@@test:value:
6021 <?xml version="1.0" standalone="true"?>
6022 <p></p>
6023 @@@c:erred:
6024 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 38); }
6025 @@XMLTest:
6026 @@@QName: xp.xmldecl.standalone.malformed.2.test
6027 @@@DEnt:
6028 @@@@test:value:
6029 <?xml version="1.0" standalone="YES"?>
6030 <p></p>
6031 @@@c:erred:
6032 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 37); }
6033 @@XMLTest:
6034 @@@QName: xp.xmldecl.standalone.malformed.3.test
6035 @@@DEnt:
6036 @@@@test:value:
6037 <?xml version="1.0" standalone="no "?>
6038 <p></p>
6039 @@@c:erred:
6040 <[[xp:wf-malformed-xml-standalone]]> { (1, 21)..(1, 38); }
6041
6042 @@XMLTest:
6043 @@@QName: xp.no-xmldecl.xml...-pi.test
6044 @@@DEnt:
6045 @@@@test:value:
6046 <?xmldeclaration?>
6047 <a></a>
6048 @@@test:domTree:
6049 document {
6050 pi {
6051 node-name: 'xmldeclaration';
6052 node-value: '';
6053 }
6054 element { }
6055 }
6056 @@XMLTest:
6057 @@@QName: xp.no-xmldecl.xml...-pi.after.document.element.test
6058 @@@DEnt:
6059 @@@@test:value:
6060 <a></a>
6061 <?xmldeclaration?>
6062 @@@test:domTree:
6063 document {
6064 element { }
6065 pi {
6066 node-name: 'xmldeclaration';
6067 node-value: '';
6068 }
6069 }
6070 @@XMLTest:
6071 @@@QName: xp.no-xmldecl.xml...-pi.in.document.element.test
6072 @@@DEnt:
6073 @@@@test:value:
6074 <a>
6075 <?xmldeclaration?>
6076 </a>
6077 @@@test:domTree:
6078 document {
6079 element {
6080 text { }
6081 pi {
6082 node-name: 'xmldeclaration';
6083 node-value: '';
6084 }
6085 text { }
6086 }
6087 }
6088 @@XMLTest:
6089 @@@QName: xp.no-xmldecl.xml...-pi.in.doctype.test
6090 @@@DEnt:
6091 @@@@test:value:
6092 <!DOCTYPE a [
6093 <?xmldeclaration?>
6094 ]>
6095 <a></a>
6096 @@@test:domTree:
6097 document {
6098 document-type {
6099 pi {
6100 node-name: 'xmldeclaration';
6101 node-value: '';
6102 }
6103 }
6104 element { }
6105 }
6106
6107 @@XMLTest:
6108 @@@QName: xp.XMLdecl.test
6109 @@@DEnt:
6110 @@@@test:value:
6111 <?XML version="1.0"?>
6112 <p></p>
6113 @@@c:erred:
6114 <[[xp:wf-pi-target-is-xml]]> { (1, 1)..(1, 5); }
6115 @@XMLTest:
6116 @@@QName: xp.Xmldecl.test
6117 @@@DEnt:
6118 @@@@test:value:
6119 <?Xml version="1.0"?>
6120 <p></p>
6121 @@@c:erred:
6122 <[[xp:wf-pi-target-is-xml]]> { (1, 1)..(1, 5); }
6123 @@XMLTest:
6124 @@@QName: xp.xmldecl.after.document.element.empty.test
6125 @@@DEnt:
6126 @@@@test:value:
6127 <p></p>
6128 <?xml?>
6129 @@@c:erred:
6130 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6131 @@XMLTest:
6132 @@@QName: xp.xmldecl.after.document.element.test
6133 @@@DEnt:
6134 @@@@test:value:
6135 <p></p>
6136 <?xml version="1.0"?>
6137 @@@c:erred:
6138 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6139 @@XMLTest:
6140 @@@QName: xp.xmldecl.in.element.empty.test
6141 @@@DEnt:
6142 @@@@test:value:
6143 <p>
6144 <?xml?>
6145 </p>
6146 @@@c:erred:
6147 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6148 @@XMLTest:
6149 @@@QName: xp.xmldecl.in.element.test
6150 @@@DEnt:
6151 @@@@test:value:
6152 <p>
6153 <?xml version="1.0"?>
6154 </p>
6155 @@@c:erred:
6156 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6157 @@XMLTest:
6158 @@@QName: xp.xmldecl.after.comment.test
6159 @@@DEnt:
6160 @@@@test:value:
6161 <!---->
6162 <?xml version="1.0"?>
6163 <p></p>
6164 @@@c:erred:
6165 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6166 @@XMLTest:
6167 @@@QName: xp.xmldecl.after.comment.empty.test
6168 @@@DEnt:
6169 @@@@test:value:
6170 <!---->
6171 <?xml?>
6172 <p></p>
6173 @@@c:erred:
6174 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6175 @@XMLTest:
6176 @@@QName: xp.xmldecl.after.pi.test
6177 @@@DEnt:
6178 @@@@test:value:
6179 <?xml-declaration?>
6180 <?xml version="1.0"?>
6181 <p></p>
6182 @@@c:erred:
6183 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6184 @@XMLTest:
6185 @@@QName: xp.xmldecl.after.pi.empty.test
6186 @@@DEnt:
6187 @@@@test:value:
6188 <?xml-declaration?>
6189 <?xml?>
6190 <p></p>
6191 @@@c:erred:
6192 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6193 @@XMLTest:
6194 @@@QName: xp.xmldecl.after.pi.2.test
6195 @@@DEnt:
6196 @@@@test:value:
6197 <?declaration?>
6198 <?xml version="1.0"?>
6199 <p></p>
6200 @@@c:erred:
6201 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6202 @@XMLTest:
6203 @@@QName: xp.xmldecl.after.pi.empty.2.test
6204 @@@DEnt:
6205 @@@@test:value:
6206 <?declaration?>
6207 <?xml?>
6208 <p></p>
6209 @@@c:erred:
6210 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6211 @@XMLTest:
6212 @@@QName: xp.xmldecl.after.doctype.test
6213 @@@DEnt:
6214 @@@@test:value:
6215 <!DOCTYPE a>
6216 <?xml version="1.0"?>
6217 <p></p>
6218 @@@c:erred:
6219 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6220 @@XMLTest:
6221 @@@QName: xp.xmldecl.after.doctype.empty.test
6222 @@@DEnt:
6223 @@@@test:value:
6224 <!DOCTYPE a>
6225 <?xml?>
6226 <p></p>
6227 @@@c:erred:
6228 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6229 @@XMLTest:
6230 @@@QName: xp.xmldecl.in.doctype.test
6231 @@@DEnt:
6232 @@@@test:value:
6233 <!DOCTYPE a [
6234 <?xml version="1.0"?>
6235 ]>
6236 <p></p>
6237 @@@c:erred:
6238 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6239 @@XMLTest:
6240 @@@QName: xp.xmldecl.in.doctype.empty.test
6241 @@@DEnt:
6242 @@@@test:value:
6243 <!DOCTYPE a [
6244 <?xml?>
6245 ]>
6246 <p></p>
6247 @@@c:erred:
6248 <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6249
6250 @@XMLTest:
6251 @@@QName: xp.pi.before.element.empty.test
6252 @@@DEnt:
6253 @@@@test:value:
6254 <?target?>
6255 <a></a>
6256 @@@test:domTree:
6257 document {
6258 pi {
6259 node-name: 'target';
6260 node-value: '';
6261 }
6262 element { }
6263 }
6264 @@XMLTest:
6265 @@@QName: xp.pi.before.element.s.test
6266 @@@DEnt:
6267 @@@@test:value:
6268 <?target ?>
6269 <a></a>
6270 @@@test:domTree:
6271 document {
6272 pi {
6273 node-name: 'target';
6274 node-value: '';
6275 }
6276 element { }
6277 }
6278 @@XMLTest:
6279 @@@QName: xp.pi.before.element.string.test
6280 @@@DEnt:
6281 @@@@test:value:
6282 <?target string?>
6283 <a></a>
6284 @@@test:domTree:
6285 document {
6286 pi {
6287 node-name: 'target';
6288 node-value: 'string';
6289 }
6290 element { }
6291 }
6292 @@XMLTest:
6293 @@@QName: xp.pi.before.element.string.s.test
6294 @@@DEnt:
6295 @@@@test:value:
6296 <?target string ?>
6297 <a></a>
6298 @@@test:domTree:
6299 document {
6300 pi {
6301 node-name: 'target';
6302 node-value: 'string ';
6303 }
6304 element { }
6305 }
6306 @@XMLTest:
6307 @@@QName: xp.pi.before.element.gt.test
6308 @@@DEnt:
6309 @@@@test:value:
6310 <?target string>string?>
6311 <a></a>
6312 @@@test:domTree:
6313 document {
6314 pi {
6315 node-name: 'target';
6316 node-value: 'string>string';
6317 }
6318 element { }
6319 }
6320 @@XMLTest:
6321 @@@QName: xp.pi.doctype.empty.test
6322 @@@DEnt:
6323 @@@@test:value:
6324 <!DOCTYPE a [
6325 <?target?>
6326 ]>
6327 <a></a>
6328 @@@test:domTree:
6329 document {
6330 document-type {
6331 pi {
6332 node-name: 'target';
6333 node-value: '';
6334 }
6335 }
6336 element { }
6337 }
6338
6339 @@XMLTest:
6340 @@@QName: xp.pi.no.target.test
6341 @@@DEnt:
6342 @@@@test:value:
6343 <??>
6344 <p></p>
6345 @@@c:erred:
6346 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 4); }
6347 @@XMLTest:
6348 @@@QName: xp.pi.no.target.2.test
6349 @@@DEnt:
6350 @@@@test:value:
6351 <? ?>
6352 <p></p>
6353 @@@c:erred:
6354 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 4); }
6355 @@XMLTest:
6356 @@@QName: xp.pi.bad.target.1.test
6357 @@@DEnt:
6358 @@@@test:value:
6359 <?target! ?>
6360 <p></p>
6361 @@@c:erred:
6362 <[[xp:wf-syntax-error]]> { (1, 9)..(1, 9); }
6363 @@XMLTest:
6364 @@@QName: xp.pi.bad.target.2.test
6365 @@@DEnt:
6366 @@@@test:value:
6367 <?0target ?>
6368 <p></p>
6369 @@@c:erred:
6370 <[[xp:wf-syntax-error]]> { (1, 3)..(1, 3); }
6371
6372 @@XMLTest:
6373 @@@QName: xp.cdatasection.empty.1.test
6374 @@@DEnt:
6375 @@@@test:value:
6376 <p><![CDATA[]]></p>
6377 @@@test:domTree:
6378 document {
6379 element {
6380 cdata-section {
6381 data: '';
6382 }
6383 }
6384 }
6385 @@XMLTest:
6386 @@@QName: xp.cdatasection.empty.2.test
6387 @@@DEnt:
6388 @@@@test:value:
6389 <p>aa<![CDATA[]]>bb</p>
6390 @@@test:domTree:
6391 document {
6392 element {
6393 text { data: 'aa'; }
6394 cdata-section {
6395 data: '';
6396 }
6397 text { data: 'bb'; }
6398 }
6399 }
6400 @@XMLTest:
6401 @@@QName: xp.cdatasection.1.test
6402 @@@DEnt:
6403 @@@@test:value:
6404 <p><![CDATA[abcdefg]]></p>
6405 @@@test:domTree:
6406 document {
6407 element {
6408 cdata-section {
6409 data: 'abcdefg';
6410 }
6411 }
6412 }
6413 @@XMLTest:
6414 @@@QName: xp.cdatasection.2.test
6415 @@@DEnt:
6416 @@@@test:value:
6417 <p>aa<![CDATA[abcdefg]]>bb</p>
6418 @@@test:domTree:
6419 document {
6420 element {
6421 text { data: 'aa'; }
6422 cdata-section {
6423 data: 'abcdefg';
6424 }
6425 text { data: 'bb'; }
6426 }
6427 }
6428 @@XMLTest:
6429 @@@QName: xp.cdatasection.ref.1.test
6430 @@@DEnt:
6431 @@@@test:value:
6432 <p><![CDATA[a&amp;&#x32;&#32;%abc;&def;]]&gt;b]]></p>
6433 @@@test:domTree:
6434 document {
6435 element {
6436 cdata-section {
6437 data: 'a&amp;&#x32;&#32;%abc;&def;]]&gt;b';
6438 }
6439 }
6440 }
6441 @@XMLTest:
6442 @@@QName: xp.cdatasection.in.general.entity.test
6443 @@@DEnt:
6444 @@@@test:value:
6445 <!DOCTYPE p [
6446 <!ENTITY cdata "<![CDATA[text]]>">
6447 ]>
6448 <p>&cdata;</p>
6449 @@@test:domTree:
6450 document {
6451 document-type {
6452 general-entity {
6453 node-name: 'cdata';
6454 cdata-section {
6455 data: 'text';
6456 }
6457 }
6458 }
6459 element {
6460 general-entity-reference {
6461 node-name: 'cdata';
6462 is-expanded: true;
6463 cdata-section {
6464 data: 'text';
6465 }
6466 }
6467 }
6468 }
6469 @@XMLTest:
6470 @@@QName: xp.cdatasection.no.mse.test
6471 @@@DEnt:
6472 @@@@test:value:
6473 <p><![CDATA[text</p>
6474 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 21); }
6475 @@XMLTest:
6476 @@@QName: xp.cdatasection.nest.test
6477 @@@DEnt:
6478 @@@@test:value:
6479 <p><![CDATA[text01<![CDATA[txt2]]>text3]]></p>
6480 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 40)..(1, 42); }
6481
6482 @@XMLTest:
6483 @@@QName: xp.doctype.empty.test
6484 @@@DEnt:
6485 @@@@test:value:
6486 <!DOCTYPE a>
6487 <a></a>
6488 @@@test:domTree:
6489 document {
6490 xml-version: '1.0';
6491 xml-encoding: null;
6492 xml-standalone: false;
6493 document-type {
6494 node-name: 'a';
6495 public-id: null;
6496 system-id: null;
6497 }
6498 element {
6499 namespace-uri: null;
6500 prefix: null;
6501 local-name: 'a';
6502 text-content: '';
6503 }
6504 }
6505 @@XMLTest:
6506 @@@QName: xp.doctype.empty.after.document.element.test
6507 @@@DEnt:
6508 @@@@test:value:
6509 <a></a>
6510 <!DOCTYPE a>
6511 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6512 @@XMLTest:
6513 @@@QName: xp.doctype.empty.in.element.test
6514 @@@DEnt:
6515 @@@@test:value:
6516 <a>
6517 <!DOCTYPE a>
6518 </a>
6519 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6520 @@XMLTest:
6521 @@@QName: xp.doctype.empty.dup.test
6522 @@@DEnt:
6523 @@@@test:value:
6524 <!DOCTYPE a>
6525 <!DOCTYPE a>
6526 <a></a>
6527 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6528 @@XMLTest:
6529 @@@QName: xp.doctype.empty.in.intsubset.test
6530 @@@DEnt:
6531 @@@@test:value:
6532 <!DOCTYPE a [
6533 <!DOCTYPE a>
6534 ]>
6535 <a></a>
6536 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6537 @@XMLTest:
6538 @@@QName: xp.doctype.no.s.no.name.test
6539 @@@DEnt:
6540 @@@@test:value:
6541 <!DOCTYPE>
6542 <a></a>
6543 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 10); }
6544 @@XMLTest:
6545 @@@QName: xp.doctype.no.name.test
6546 @@@DEnt:
6547 @@@@test:value:
6548 <!DOCTYPE >
6549 <a></a>
6550 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 11); }
6551 @@XMLTest:
6552 @@@QName: xp.doctype.name.s.test
6553 @@@DEnt:
6554 @@@@test:value:
6555 <!DOCTYPE aa >
6556 <aa></aa>
6557 @@@test:domTree:
6558 document {
6559 document-type {
6560 node-name: 'aa';
6561 public-id: null;
6562 system-id: null;
6563 }
6564 element { }
6565 }
6566 @@XMLTest:
6567 @@@QName: xp.doctype.no.mdc.test
6568 @@@DEnt:
6569 @@@@test:value:
6570 <!DOCTYPE aa
6571 <aa></aa>
6572 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6573
6574 @@XMLTest:
6575 @@@QName: xp.doctype.intsubset.empty.1.test
6576 @@@DEnt:
6577 @@@@test:value:
6578 <!DOCTYPE a []>
6579 <a></a>
6580 @@@test:domTree:
6581 document {
6582 xml-version: '1.0';
6583 xml-encoding: null;
6584 xml-standalone: false;
6585 document-type {
6586 node-name: 'a';
6587 public-id: null;
6588 system-id: null;
6589 }
6590 element {
6591 namespace-uri: null;
6592 prefix: null;
6593 local-name: 'a';
6594 text-content: '';
6595 }
6596 }
6597 @@XMLTest:
6598 @@@QName: xp.doctype.intsubset.empty.2.test
6599 @@@DEnt:
6600 @@@@test:value:
6601 <!DOCTYPE a [
6602
6603 ]>
6604 <a></a>
6605 @@@test:domTree:
6606 document {
6607 xml-version: '1.0';
6608 xml-encoding: null;
6609 xml-standalone: false;
6610 document-type {
6611 node-name: 'a';
6612 public-id: null;
6613 system-id: null;
6614 }
6615 element {
6616 namespace-uri: null;
6617 prefix: null;
6618 local-name: 'a';
6619 text-content: '';
6620 }
6621 }
6622 @@XMLTest:
6623 @@@QName: xp.doctype.intsubset.empty.3.test
6624 @@@DEnt:
6625 @@@@test:value:
6626 <!DOCTYPE a[]>
6627 <a></a>
6628 @@@test:domTree:
6629 document {
6630 document-type {
6631 node-name: 'a';
6632 public-id: null;
6633 system-id: null;
6634 }
6635 element { }
6636 }
6637 @@XMLTest:
6638 @@@QName: xp.doctype.intsubset.empty.4.test
6639 @@@DEnt:
6640 @@@@test:value:
6641 <!DOCTYPE a[] >
6642 <a></a>
6643 @@@test:domTree:
6644 document {
6645 document-type {
6646 node-name: 'a';
6647 public-id: null;
6648 system-id: null;
6649 }
6650 element { }
6651 }
6652 @@XMLTest:
6653 @@@QName: xp.doctype.intsubset.no.dsc.1.test
6654 @@@DEnt:
6655 @@@@test:value:
6656 <!DOCTYPE a [>
6657 <a></a>
6658 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 14); }
6659 @@XMLTest:
6660 @@@QName: xp.doctype.intsubset.no.dsc.2.test
6661 @@@DEnt:
6662 @@@@test:value:
6663 <!DOCTYPE a [
6664 <a></a>
6665 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6666 @@XMLTest:
6667 @@@QName: xp.doctype.intsubset.no.dsc.3.test
6668 @@@DEnt:
6669 @@@@test:value:
6670 <!DOCTYPE a [
6671 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 14); }
6672 @@XMLTest:
6673 @@@QName: xp.doctype.intsubset.no.mdc.1.test
6674 @@@DEnt:
6675 @@@@test:value:
6676 <!DOCTYPE a []
6677 <a/>
6678 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6679 @@XMLTest:
6680 @@@QName: xp.doctype.intsubset.no.mdc.2.test
6681 @@@DEnt:
6682 @@@@test:value:
6683 <!DOCTYPE a []]>
6684 <a/>
6685 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 15); }
6686 @@XMLTest:
6687 @@@QName: xp.doctype.pubid.sysid.1.test
6688 @@@DEnt:
6689 @@@@test:value:
6690 <!DOCTYPE a PUBLIC "pubid" "sysid">
6691 <a/>
6692 @@@test:domTree:
6693 document {
6694 document-type {
6695 node-name: 'a';
6696 public-id: 'pubid';
6697 system-id: 'sysid';
6698 }
6699 element { }
6700 }
6701 @@XMLTest:
6702 @@@QName: xp.doctype.pubid.sysid.2.test
6703 @@@DEnt:
6704 @@@@test:value:
6705 <!DOCTYPE a PUBLIC 'pubid' "sysid">
6706 <a/>
6707 @@@test:domTree:
6708 document {
6709 document-type {
6710 node-name: 'a';
6711 public-id: 'pubid';
6712 system-id: 'sysid';
6713 }
6714 element { }
6715 }
6716 @@XMLTest:
6717 @@@QName: xp.doctype.pubid.sysid.3.test
6718 @@@DEnt:
6719 @@@@test:value:
6720 <!DOCTYPE a PUBLIC "pubid" 'sysid'>
6721 <a/>
6722 @@@test:domTree:
6723 document {
6724 document-type {
6725 node-name: 'a';
6726 public-id: 'pubid';
6727 system-id: 'sysid';
6728 }
6729 element { }
6730 }
6731 @@XMLTest:
6732 @@@QName: xp.doctype.pubid.sysid.4.test
6733 @@@DEnt:
6734 @@@@test:value:
6735 <!DOCTYPE a PUBLIC 'pubid' 'sysid'>
6736 <a/>
6737 @@@test:domTree:
6738 document {
6739 document-type {
6740 node-name: 'a';
6741 public-id: 'pubid';
6742 system-id: 'sysid';
6743 }
6744 element { }
6745 }
6746 @@XMLTest:
6747 @@@QName: xp.doctype.pubid.sysid.5.test
6748 @@@DEnt:
6749 @@@@test:value:
6750 <!DOCTYPE a PUBLIC "pubid" "sysid" >
6751 <a/>
6752 @@@test:domTree:
6753 document {
6754 document-type {
6755 node-name: 'a';
6756 public-id: 'pubid';
6757 system-id: 'sysid';
6758 }
6759 element { }
6760 }
6761 @@XMLTest:
6762 @@@QName: xp.doctype.pubid.sysid.6.test
6763 @@@DEnt:
6764 @@@@test:value:
6765 <!DOCTYPE a PUBLIC 'pubid' 'sysid' >
6766 <a/>
6767 @@@test:domTree:
6768 document {
6769 document-type {
6770 node-name: 'a';
6771 public-id: 'pubid';
6772 system-id: 'sysid';
6773 }
6774 element { }
6775 }
6776 @@XMLTest:
6777 @@@QName: xp.doctype.pubid.sysid.intsubset.1.test
6778 @@@DEnt:
6779 @@@@test:value:
6780 <!DOCTYPE a PUBLIC "pubid" "sysid"[]>
6781 <a/>
6782 @@@test:domTree:
6783 document {
6784 document-type {
6785 node-name: 'a';
6786 public-id: 'pubid';
6787 system-id: 'sysid';
6788 }
6789 element { }
6790 }
6791 @@XMLTest:
6792 @@@QName: xp.doctype.pubid.sysid.intsubset.2.test
6793 @@@DEnt:
6794 @@@@test:value:
6795 <!DOCTYPE a PUBLIC "pubid" "sysid" []>
6796 <a/>
6797 @@@test:domTree:
6798 document {
6799 document-type {
6800 node-name: 'a';
6801 public-id: 'pubid';
6802 system-id: 'sysid';
6803 }
6804 element { }
6805 }
6806 @@XMLTest:
6807 @@@QName: xp.doctype.pubid.sysid.intsubset.3.test
6808 @@@DEnt:
6809 @@@@test:value:
6810 <!DOCTYPE a PUBLIC 'pubid' 'sysid'[]>
6811 <a/>
6812 @@@test:domTree:
6813 document {
6814 document-type {
6815 node-name: 'a';
6816 public-id: 'pubid';
6817 system-id: 'sysid';
6818 }
6819 element { }
6820 }
6821 @@XMLTest:
6822 @@@QName: xp.doctype.pubid.sysid.intsubset.4.test
6823 @@@DEnt:
6824 @@@@test:value:
6825 <!DOCTYPE a PUBLIC 'pubid' 'sysid' []>
6826 <a/>
6827 @@@test:domTree:
6828 document {
6829 document-type {
6830 node-name: 'a';
6831 public-id: 'pubid';
6832 system-id: 'sysid';
6833 }
6834 element { }
6835 }
6836 @@XMLTest:
6837 @@@QName: xp.doctype.sysid.1.test
6838 @@@DEnt:
6839 @@@@test:value:
6840 <!DOCTYPE a SYSTEM "sysid">
6841 <a/>
6842 @@@test:domTree:
6843 document {
6844 document-type {
6845 node-name: 'a';
6846 public-id: null;
6847 system-id: 'sysid';
6848 }
6849 element { }
6850 }
6851 @@XMLTest:
6852 @@@QName: xp.doctype.sysid.2.test
6853 @@@DEnt:
6854 @@@@test:value:
6855 <!DOCTYPE a SYSTEM 'sysid'>
6856 <a/>
6857 @@@test:domTree:
6858 document {
6859 document-type {
6860 node-name: 'a';
6861 public-id: null;
6862 system-id: 'sysid';
6863 }
6864 element { }
6865 }
6866 @@XMLTest:
6867 @@@QName: xp.doctype.sysid.3.test
6868 @@@DEnt:
6869 @@@@test:value:
6870 <!DOCTYPE a SYSTEM "sysid" >
6871 <a/>
6872 @@@test:domTree:
6873 document {
6874 document-type {
6875 node-name: 'a';
6876 public-id: null;
6877 system-id: 'sysid';
6878 }
6879 element { }
6880 }
6881 @@XMLTest:
6882 @@@QName: xp.doctype.sysid.4.test
6883 @@@DEnt:
6884 @@@@test:value:
6885 <!DOCTYPE a SYSTEM 'sysid' >
6886 <a/>
6887 @@@test:domTree:
6888 document {
6889 document-type {
6890 node-name: 'a';
6891 public-id: null;
6892 system-id: 'sysid';
6893 }
6894 element { }
6895 }
6896 @@XMLTest:
6897 @@@QName: xp.doctype.sysid.intsubset.1.test
6898 @@@DEnt:
6899 @@@@test:value:
6900 <!DOCTYPE a SYSTEM "sysid"[]>
6901 <a/>
6902 @@@test:domTree:
6903 document {
6904 document-type {
6905 node-name: 'a';
6906 public-id: null;
6907 system-id: 'sysid';
6908 }
6909 element { }
6910 }
6911 @@XMLTest:
6912 @@@QName: xp.doctype.sysid.intsubset.2.test
6913 @@@DEnt:
6914 @@@@test:value:
6915 <!DOCTYPE a SYSTEM "sysid" []>
6916 <a/>
6917 @@@test:domTree:
6918 document {
6919 document-type {
6920 node-name: 'a';
6921 public-id: null;
6922 system-id: 'sysid';
6923 }
6924 element { }
6925 }
6926 @@XMLTest:
6927 @@@QName: xp.doctype.sysid.intsubset.3.test
6928 @@@DEnt:
6929 @@@@test:value:
6930 <!DOCTYPE a SYSTEM 'sysid'[]>
6931 <a/>
6932 @@@test:domTree:
6933 document {
6934 document-type {
6935 node-name: 'a';
6936 public-id: null;
6937 system-id: 'sysid';
6938 }
6939 element { }
6940 }
6941 @@XMLTest:
6942 @@@QName: xp.doctype.sysid.intsubset.4.test
6943 @@@DEnt:
6944 @@@@test:value:
6945 <!DOCTYPE a SYSTEM 'sysid' []>
6946 <a/>
6947 @@@test:domTree:
6948 document {
6949 document-type {
6950 node-name: 'a';
6951 public-id: null;
6952 system-id: 'sysid';
6953 }
6954 element { }
6955 }
6956 @@XMLTest:
6957 @@@QName: xp.doctype.public.stago.test
6958 @@@DEnt:
6959 @@@@test:value:
6960 <!DOCTYPE a PUBLIC<a/>
6961 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6962 @@XMLTest:
6963 @@@QName: xp.doctype.public.mdc.test
6964 @@@DEnt:
6965 @@@@test:value:
6966 <!DOCTYPE a PUBLIC>
6967 <a/>
6968 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6969 @@XMLTest:
6970 @@@QName: xp.doctype.public.s.stago.test
6971 @@@DEnt:
6972 @@@@test:value:
6973 <!DOCTYPE a PUBLIC <a/>
6974 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 20); }
6975 @@XMLTest:
6976 @@@QName: xp.doctype.public.s.mdc.test
6977 @@@DEnt:
6978 @@@@test:value:
6979 <!DOCTYPE a PUBLIC >
6980 <a/>
6981 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 20); }
6982 @@XMLTest:
6983 @@@QName: xp.doctype.public.lit.test
6984 @@@DEnt:
6985 @@@@test:value:
6986 <!DOCTYPE a PUBLIC"p" "s">
6987 <a/>
6988 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6989 @@XMLTest:
6990 @@@QName: xp.doctype.public.lita.test
6991 @@@DEnt:
6992 @@@@test:value:
6993 <!DOCTYPE a PUBLIC'p' "s">
6994 <a/>
6995 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6996 @@XMLTest:
6997 @@@QName: xp.doctype.pubid.lit.lita.unmatched.1.test
6998 @@@DEnt:
6999 @@@@test:value:
7000 <!DOCTYPE a PUBLIC "p' "s">
7001 <a/>
7002 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 25); }
7003 @@XMLTest:
7004 @@@QName: xp.doctype.pubid.lit.lita.unmatched.2.test
7005 @@@DEnt:
7006 @@@@test:value:
7007 <!DOCTYPE a PUBLIC "p' 's'><a/>
7008 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7009 @@XMLTest:
7010 @@@QName: xp.doctype.pubid.lita.lit.unmatched.1.test
7011 @@@DEnt:
7012 @@@@test:value:
7013 <!DOCTYPE a PUBLIC 'p" "s"><a/>
7014 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7015 @@XMLTest:
7016 @@@QName: xp.doctype.pubid.lita.lit.unmatched.2.test
7017 @@@DEnt:
7018 @@@@test:value:
7019 <!DOCTYPE a PUBLIC 'p" 's'>
7020 <a/>
7021 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 21)..(1, 25); }
7022 @@XMLTest:
7023 @@@QName: xp.doctype.public.s.lit.mdc.test
7024 @@@DEnt:
7025 @@@@test:value:
7026 <!DOCTYPE a PUBLIC "><a/>
7027 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 26); }
7028 @@XMLTest:
7029 @@@QName: xp.doctype.public.s.lita.mdc.test
7030 @@@DEnt:
7031 @@@@test:value:
7032 <!DOCTYPE a PUBLIC '><a/>
7033 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 26); }
7034 @@XMLTest:
7035 @@@QName: xp.doctype.public.lit.pubid.lit.mdc.test
7036 @@@DEnt:
7037 @@@@test:value:
7038 <!DOCTYPE a PUBLIC "p">
7039 <a/>
7040 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 23); }
7041 @@XMLTest:
7042 @@@QName: xp.doctype.public.lita.pubid.lita.mdc.test
7043 @@@DEnt:
7044 @@@@test:value:
7045 <!DOCTYPE a PUBLIC 'p'>
7046 <a/>
7047 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 23); }
7048 @@XMLTest:
7049 @@@QName: xp.doctype.public.lit.pubid.lit.s.mdc.test
7050 @@@DEnt:
7051 @@@@test:value:
7052 <!DOCTYPE a PUBLIC "p" >
7053 <a/>
7054 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 24); }
7055 @@XMLTest:
7056 @@@QName: xp.doctype.public.lita.pubid.lita.s.mdc.test
7057 @@@DEnt:
7058 @@@@test:value:
7059 <!DOCTYPE a PUBLIC 'p' >
7060 <a/>
7061 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 24); }
7062 @@XMLTest:
7063 @@@QName: xp.doctype.public.lit.pubid.lit.s.lit.mdc.test
7064 @@@DEnt:
7065 @@@@test:value:
7066 <!DOCTYPE a PUBLIC "p" "><a/>
7067 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7068 @@XMLTest:
7069 @@@QName: xp.doctype.public.lit.pubid.lit.s.lita.mdc.test
7070 @@@DEnt:
7071 @@@@test:value:
7072 <!DOCTYPE a PUBLIC "p" '><a/>
7073 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7074 @@XMLTest:
7075 @@@QName: xp.doctype.public.lita.pubid.lita.s.lit.mdc.test
7076 @@@DEnt:
7077 @@@@test:value:
7078 <!DOCTYPE a PUBLIC 'p' "><a/>
7079 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7080 @@XMLTest:
7081 @@@QName: xp.doctype.public.lita.pubid.lita.s.lita.mdc.test
7082 @@@DEnt:
7083 @@@@test:value:
7084 <!DOCTYPE a PUBLIC 'p' '><a/>
7085 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7086 @@XMLTest:
7087 @@@QName: xp.doctype.public.lit.pubid.lit.lit.lita.unmatched.mdc.test
7088 @@@DEnt:
7089 @@@@test:value:
7090 <!DOCTYPE a PUBLIC "p" "s'><a/>
7091 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7092 @@XMLTest:
7093 @@@QName: xp.doctype.public.lita.pubid.lita.lita.lit.unmatched.mdc.test
7094 @@@DEnt:
7095 @@@@test:value:
7096 <!DOCTYPE a PUBLIC 'p' 's"><a/>
7097 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7098 @@XMLTest:
7099 @@@QName: xp.doctype.pubid.sysid.stago.1.test
7100 @@@DEnt:
7101 @@@@test:value:
7102 <!DOCTYPE a PUBLIC "p" "s"<a/>
7103 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27); }
7104 @@XMLTest:
7105 @@@QName: xp.doctype.pubid.sysid.stago.2.test
7106 @@@DEnt:
7107 @@@@test:value:
7108 <!DOCTYPE a PUBLIC "p" 's'<a/>
7109 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27); }
7110 @@XMLTest:
7111 @@@QName: xp.doctype.pubid.sysid.stago.s.1.test
7112 @@@DEnt:
7113 @@@@test:value:
7114 <!DOCTYPE a PUBLIC "p" "s" <a/>
7115 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
7116 @@XMLTest:
7117 @@@QName: xp.doctype.pubid.sysid.stago.s.2.test
7118 @@@DEnt:
7119 @@@@test:value:
7120 <!DOCTYPE a PUBLIC "p" 's' <a/>
7121 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
7122
7123 @@XMLTest:
7124 @@@QName: xp.endofline.1.0.crlf.test
7125 @@@DEnt:
7126 @@@@test:value:
7127 <?xml version="1.0"?>
7128 <p>aaa$u000D$u000Abbb</p>
7129 @@@test:domTree:
7130 document {
7131 xml-version: '1.0';
7132 element {
7133 text-content: 'aaa' U+000A 'bbb';
7134 }
7135 }
7136 @@XMLTest:
7137 @@@QName: xp.endofline.1.1.crlf.test
7138 @@@DEnt:
7139 @@@@test:value:
7140 <?xml version="1.1"?>
7141 <p>aaa$u000D$u000Abbb</p>
7142 @@@test:domTree:
7143 document {
7144 xml-version: '1.1';
7145 element {
7146 text-content: 'aaa' U+000A 'bbb';
7147 }
7148 }
7149 @@XMLTest:
7150 @@@QName: xp.endofline.1.0.crnl.test
7151 @@@DEnt:
7152 @@@@test:value:
7153 <?xml version="1.0"?>
7154 <p>aaa$u000D$u0085bbb</p>
7155 @@@test:domTree:
7156 document {
7157 xml-version: '1.0';
7158 element {
7159 text-content: 'aaa' U+000A U+0085 'bbb';
7160 }
7161 }
7162 @@XMLTest:
7163 @@@QName: xp.endofline.1.1.crnl.test
7164 @@@DEnt:
7165 @@@@test:value:
7166 <?xml version="1.1"?>
7167 <p>aaa$u000D$u0085bbb</p>
7168 @@@test:domTree:
7169 document {
7170 xml-version: '1.1';
7171 element {
7172 text-content: 'aaa' U+000A 'bbb';
7173 }
7174 }
7175 @@XMLTest:
7176 @@@QName: xp.endofline.1.0.nl.test
7177 @@@DEnt:
7178 @@@@test:value:
7179 <?xml version="1.0"?>
7180 <p>aaa$u0085bbb</p>
7181 @@@test:domTree:
7182 document {
7183 xml-version: '1.0';
7184 element {
7185 text-content: 'aaa' U+0085 'bbb';
7186 }
7187 }
7188 @@XMLTest:
7189 @@@QName: xp.endofline.1.1.nl.test
7190 @@@DEnt:
7191 @@@@test:value:
7192 <?xml version="1.1"?>
7193 <p>aaa$u0085bbb</p>
7194 @@@test:domTree:
7195 document {
7196 xml-version: '1.1';
7197 element {
7198 text-content: 'aaa' U+000A 'bbb';
7199 }
7200 }
7201 @@XMLTest:
7202 @@@QName: xp.endofline.1.0.ls.test
7203 @@@DEnt:
7204 @@@@test:value:
7205 <?xml version="1.0"?>
7206 <p>aaa$u2028bbb</p>
7207 @@@test:domTree:
7208 document {
7209 xml-version: '1.0';
7210 element {
7211 text-content: 'aaa' U+2028 'bbb';
7212 }
7213 }
7214 @@XMLTest:
7215 @@@QName: xp.endofline.1.1.ls.test
7216 @@@DEnt:
7217 @@@@test:value:
7218 <?xml version="1.1"?>
7219 <p>aaa$u2028bbb</p>
7220 @@@test:domTree:
7221 document {
7222 xml-version: '1.1';
7223 element {
7224 text-content: 'aaa' U+000A 'bbb';
7225 }
7226 }
7227 @@XMLTest:
7228 @@@QName: xp.endofline.1.0.cr.test
7229 @@@DEnt:
7230 @@@@test:value:
7231 <?xml version="1.0"?>
7232 <p>aaa$u000Dbbb</p>
7233 @@@test:domTree:
7234 document {
7235 xml-version: '1.0';
7236 element {
7237 text-content: 'aaa' U+000A 'bbb';
7238 }
7239 }
7240 @@XMLTest:
7241 @@@QName: xp.endofline.1.1.cr.test
7242 @@@DEnt:
7243 @@@@test:value:
7244 <?xml version="1.1"?>
7245 <p>aaa$u000Dbbb</p>
7246 @@@test:domTree:
7247 document {
7248 xml-version: '1.1';
7249 element {
7250 text-content: 'aaa' U+000A 'bbb';
7251 }
7252 }
7253 @@XMLTest:
7254 @@@QName: xp.endofline.1.0.lf.test
7255 @@@DEnt:
7256 @@@@test:value:
7257 <?xml version="1.0"?>
7258 <p>aaa$u000Abbb</p>
7259 @@@test:domTree:
7260 document {
7261 xml-version: '1.0';
7262 element {
7263 text-content: 'aaa' U+000A 'bbb';
7264 }
7265 }
7266 @@XMLTest:
7267 @@@QName: xp.endofline.1.1.lf.test
7268 @@@DEnt:
7269 @@@@test:value:
7270 <?xml version="1.1"?>
7271 <p>aaa$u000Abbb</p>
7272 @@@test:domTree:
7273 document {
7274 xml-version: '1.1';
7275 element {
7276 text-content: 'aaa' U+000A 'bbb';
7277 }
7278 }
7279 @@XMLTest:
7280 @@@QName: xp.xml10.endofline.nl.in.xmldecl.1.test
7281 @@@DEnt:
7282 @@@@test:value:
7283 <?xml$u0085version="1.0"?>
7284 <p/>
7285 @@@c:erred:
7286 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7287 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7288 @@XMLTest:
7289 @@@QName: xp.xml11.endofline.nl.in.xmldecl.1.test
7290 @@@DEnt:
7291 @@@@test:value:
7292 <?xml$u0085version="1.1"?>
7293 (err)<p/>
7294 @@@c:erred:
7295 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7296 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7297 @@XMLTest:
7298 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.1.test
7299 @@@DEnt:
7300 @@@@test:value:
7301 <?xml$u000D$u0085version="1.0"?>
7302 <p/>
7303 @@@c:erred:
7304 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7305 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7306 @@XMLTest:
7307 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.1.test
7308 @@@DEnt:
7309 @@@@test:value:
7310 <?xml$u000D$u0085version="1.1"?>
7311 (err)<p/>
7312 @@@c:erred:
7313 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7314 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7315 @@XMLTest:
7316 @@@QName: xp.xml10.endofline.ls.in.xmldecl.1.test
7317 @@@DEnt:
7318 @@@@test:value:
7319 <?xml$u2028version="1.0"?>
7320 <p/>
7321 @@@c:erred:
7322 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7323 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7324 @@XMLTest:
7325 @@@QName: xp.xml11.endofline.ls.in.xmldecl.1.test
7326 @@@DEnt:
7327 @@@@test:value:
7328 <?xml$u2028version="1.1"?>
7329 (err)<p/>
7330 @@@c:erred:
7331 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7332 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7333 @@XMLTest:
7334 @@@QName: xp.xml10.endofline.nl.in.xmldecl.2.test
7335 @@@DEnt:
7336 @@@@test:value:
7337 <?xml version="1.0"$u0085?>
7338 <p/>
7339 @@@c:erred:
7340 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7341 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7342 @@XMLTest:
7343 @@@QName: xp.xml11.endofline.nl.in.xmldecl.2.test
7344 @@@DEnt:
7345 @@@@test:value:
7346 <?xml version="1.1"$u0085?>
7347 (err)<p/>
7348 @@@c:erred:
7349 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7350 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7351 @@XMLTest:
7352 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.2.test
7353 @@@DEnt:
7354 @@@@test:value:
7355 <?xml version="1.0"$u000D$u0085?>
7356 <p/>
7357 @@@c:erred:
7358 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7359 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7360 @@XMLTest:
7361 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.2.test
7362 @@@DEnt:
7363 @@@@test:value:
7364 <?xml version="1.1"$u000D$u0085?>
7365 (err)<p/>
7366 @@@c:erred:
7367 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7368 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7369 @@XMLTest:
7370 @@@QName: xp.xml10.endofline.ls.in.xmldecl.2.test
7371 @@@DEnt:
7372 @@@@test:value:
7373 <?xml version="1.0"$u2028?>
7374 <p/>
7375 @@@c:erred:
7376 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7377 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7378 @@XMLTest:
7379 @@@QName: xp.xml11.endofline.ls.in.xmldecl.2.test
7380 @@@DEnt:
7381 @@@@test:value:
7382 <?xml version="1.1"$u2028?>
7383 (err)<p/>
7384 @@@c:erred:
7385 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7386 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7387 @@XMLTest:
7388 @@@QName: xp.xml10.endofline.nl.in.xmldecl.3.test
7389 @@@DEnt:
7390 @@@@test:value:
7391 <?xml $u0085version="1.0"?>
7392 <p/>
7393 @@@c:erred:
7394 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7395 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7396 @@XMLTest:
7397 @@@QName: xp.xml11.endofline.nl.in.xmldecl.3.test
7398 @@@DEnt:
7399 @@@@test:value:
7400 <?xml $u0085version="1.1"?>
7401 (err)<p/>
7402 @@@c:erred:
7403 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7404 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7405 @@XMLTest:
7406 @@@QName: xp.xml10.endofline.crnl.in.xmldecl.3.test
7407 @@@DEnt:
7408 @@@@test:value:
7409 <?xml $u000D$u0085version="1.0"?>
7410 <p/>
7411 @@@c:erred:
7412 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7413 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7414 @@XMLTest:
7415 @@@QName: xp.xml11.endofline.crnl.in.xmldecl.3.test
7416 @@@DEnt:
7417 @@@@test:value:
7418 <?xml $u000D$u0085version="1.1"?>
7419 (err)<p/>
7420 @@@c:erred:
7421 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7422 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7423 @@XMLTest:
7424 @@@QName: xp.xml10.endofline.ls.in.xmldecl.3.test
7425 @@@DEnt:
7426 @@@@test:value:
7427 <?xml $u2028version="1.0"?>
7428 <p/>
7429 @@@c:erred:
7430 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7431 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7432 @@XMLTest:
7433 @@@QName: xp.xml11.endofline.ls.in.xmldecl.3.test
7434 @@@DEnt:
7435 @@@@test:value:
7436 <?xml $u2028version="1.1"?>
7437 (err)<p/>
7438 @@@c:erred:
7439 <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7440 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7441 @@XMLTest:
7442 @@@QName: xp.xml10implied.endofline.nl.in.pi.1.test
7443 @@@DEnt:
7444 @@@@test:value:
7445 <?xml-$u0085?>
7446 <p/>
7447 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 7)..(2, 0); }
7448 @@XMLTest:
7449 @@@QName: xp.xml10.endofline.nl.in.pi.1.test
7450 @@@DEnt:
7451 @@@@test:value:
7452 <?xml version="1.0"?>
7453 <?xml-$u0085?>
7454 <p/>
7455 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 7)..(3, 0); }
7456 @@XMLTest:
7457 @@@QName: xp.xml11.endofline.nl.in.pi.1.test
7458 @@@DEnt:
7459 @@@@test:value:
7460 <?xml version="1.1"?>
7461 <?xml-$u0085?>
7462 <p/>
7463 @@@test:domTree:
7464 document {
7465 xml-version: '1.1';
7466 pi {
7467 node-name: 'xml-';
7468 node-value: '';
7469 }
7470 element { }
7471 }
7472 @@XMLTest:
7473 @@@QName: xp.xml10implied.endofline.crnl.in.pi.1.test
7474 @@@DEnt:
7475 @@@@test:value:
7476 <?xml-$u000D$u0085?>
7477 <p/>
7478 @@@test:domTree:
7479 document {
7480 xml-version: '1.0';
7481 pi {
7482 node-name: 'xml-';
7483 node-value: U+0085;
7484 }
7485 element { }
7486 }
7487 @@XMLTest:
7488 @@@QName: xp.xml10.endofline.crnl.in.pi.1.test
7489 @@@DEnt:
7490 @@@@test:value:
7491 <?xml version="1.0"?>
7492 <?xml-$u000D$u0085?>
7493 <p/>
7494 @@@test:domTree:
7495 document {
7496 xml-version: '1.0';
7497 pi {
7498 node-name: 'xml-';
7499 node-value: U+0085;
7500 }
7501 element { }
7502 }
7503 @@XMLTest:
7504 @@@QName: xp.xml11.endofline.crnl.in.pi.1.test
7505 @@@DEnt:
7506 @@@@test:value:
7507 <?xml version="1.1"?>
7508 <?xml-$u000D$u0085?>
7509 <p/>
7510 @@@test:domTree:
7511 document {
7512 xml-version: '1.1';
7513 pi {
7514 node-name: 'xml-';
7515 node-value: '';
7516 }
7517 element { }
7518 }
7519 @@XMLTest:
7520 @@@QName: xp.xml10implied.endofline.ls.in.pi.1.test
7521 @@@DEnt:
7522 @@@@test:value:
7523 <?xml-$u2028?>
7524 <p/>
7525 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 7)..(2, 0); }
7526 @@XMLTest:
7527 @@@QName: xp.xml10.endofline.ls.in.pi.1.test
7528 @@@DEnt:
7529 @@@@test:value:
7530 <?xml version="1.0"?>
7531 <?xml-$u2028?>
7532 <p/>
7533 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 7)..(3, 0); }
7534 @@XMLTest:
7535 @@@QName: xp.xml11.endofline.ls.in.pi.1.test
7536 @@@DEnt:
7537 @@@@test:value:
7538 <?xml version="1.1"?>
7539 <?xml-$u2028?>
7540 <p/>
7541 @@@test:domTree:
7542 document {
7543 xml-version: '1.1';
7544 pi {
7545 node-name: 'xml-';
7546 node-value: '';
7547 }
7548 element { }
7549 }
7550
7551 @@XMLTest:
7552 @@@QName: xp.xml10.endofline.internal.1.test
7553 @@@DEnt:
7554 @@@@test:value:
7555 <?xml version="1.0"?>
7556 <!DOCTYPE a [
7557 <!ENTITY e "&#x000D; &#x000A; &#x0085; &#x000D;&#x000A; $
7558 &#x000D;&#x0085; &#x2028;">
7559 ]><a>&e;</a>
7560 @@@test:domTree:
7561 document {
7562 xml-version: '1.0';
7563 document-type {
7564 general-entity {
7565 node-name: 'e';
7566 text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7567 U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7568 }
7569 }
7570 element {
7571 text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7572 U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7573 }
7574 }
7575 @@XMLTest:
7576 @@@QName: xp.xml11.endofline.internal.1.test
7577 @@@DEnt:
7578 @@@@test:value:
7579 <?xml version="1.1"?>
7580 <!DOCTYPE a [
7581 <!ENTITY e "&#x000D; &#x000A; &#x0085; &#x000D;&#x000A; $
7582 &#x000D;&#x0085; &#x2028;">
7583 ]><a>&e;</a>
7584 @@@test:domTree:
7585 document {
7586 xml-version: '1.1';
7587 document-type {
7588 general-entity {
7589 node-name: 'e';
7590 text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7591 U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7592 }
7593 }
7594 element {
7595 text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7596 U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7597 }
7598 }
7599
7600 @@XMLTest:
7601 @@@QName: xp.noxmldecl.pi.pi.test
7602 @@@DEnt:
7603 @@@@test:value:
7604 <?noxml 1?><?noxml 2?><p/>
7605 @@@test:domTree:
7606 document {
7607 xml-version: '1.0';
7608 pi {
7609 node-name: 'noxml';
7610 node-value: '1';
7611 }
7612 pi {
7613 node-name: 'noxml';
7614 node-value: '2';
7615 }
7616 element { }
7617 }
7618 @@XMLTest:
7619 @@@QName: xp.noxmldecl.pi.pi.2.test
7620 @@@DEnt:
7621 @@@@test:value:
7622 <?xmlno 1?><?xmlno 2?><p/>
7623 @@@test:domTree:
7624 document {
7625 xml-version: '1.0';
7626 pi {
7627 node-name: 'xmlno';
7628 node-value: '1';
7629 }
7630 pi {
7631 node-name: 'xmlno';
7632 node-value: '2';
7633 }
7634 element { }
7635 }
7636 @@XMLTest:
7637 @@@QName: xp.noxmldecl.pi.pi.3.test
7638 @@@DEnt:
7639 @@@@test:value:
7640 <?xmln 1?><?xmln 2?><p/>
7641 @@@test:domTree:
7642 document {
7643 xml-version: '1.0';
7644 pi {
7645 node-name: 'xmln';
7646 node-value: '1';
7647 }
7648 pi {
7649 node-name: 'xmln';
7650 node-value: '2';
7651 }
7652 element { }
7653 }
7654 @@XMLTest:
7655 @@@QName: xp.noxml.s.nl.test
7656 @@@DEnt:
7657 @@@@test:value:
7658 $u0085<p/>
7659 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7660 @@XMLTest:
7661 @@@QName: xp.noxml.s.crnl.test
7662 @@@DEnt:
7663 @@@@test:value:
7664 $u000D$u0085<p/>
7665 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7666 @@XMLTest:
7667 @@@QName: xp.noxml.s.ls.test
7668 @@@DEnt:
7669 @@@@test:value:
7670 $u2028<p/>
7671 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7672 @@XMLTest:
7673 @@@QName: xp.xml10.decl.s.nl.test
7674 @@@DEnt:
7675 @@@@test:value:
7676 <?xml version="1.0"?>$u0085<p/>
7677 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 22)..(2, 0); }
7678 @@XMLTest:
7679 @@@QName: xp.xml10.decl.s.crnl.test
7680 @@@DEnt:
7681 @@@@test:value:
7682 <?xml version="1.0"?>$u000D$u0085<p/>
7683 @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 0)..(3, 0); }
7684 @@XMLTest:
7685 @@@QName: xp.xml10.decl.s.ls.test
7686 @@@DEnt:
7687 @@@@test:value:
7688 <?xml version="1.0"?>$u2028<p/>
7689 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 22)..(2, 0); }
7690 @@XMLTest:
7691 @@@QName: xp.xml11.decl.s.nl.test
7692 @@@DEnt:
7693 @@@@test:value:
7694 <?xml version="1.1"?>$u0085<p/>
7695 @@@test:domTree:
7696 document {
7697 xml-version: '1.1';
7698 element { }
7699 }
7700 @@XMLTest:
7701 @@@QName: xp.xml11.decl.s.crnl.test
7702 @@@DEnt:
7703 @@@@test:value:
7704 <?xml version="1.1"?>$u000D$u0085<p/>
7705 @@@test:domTree:
7706 document {
7707 xml-version: '1.1';
7708 element { }
7709 }
7710 @@XMLTest:
7711 @@@QName: xp.xml11.decl.s.ls.test
7712 @@@DEnt:
7713 @@@@test:value:
7714 <?xml version="1.1"?>$u2028<p/>
7715 @@@test:domTree:
7716 document {
7717 xml-version: '1.1';
7718 element { }
7719 }
7720
7721 @@XMLTest:
7722 @@@QName: xp.element.type.match.1.test
7723 @@@DEnt:
7724 @@@@test:value:
7725 <p></pa>(err)
7726 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 4)..(1, 8); }
7727 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7728 @@XMLTest:
7729 @@@QName: xp.element.type.match.2.test
7730 @@@DEnt:
7731 @@@@test:value:
7732 <p><pa></pa></pa>(err)
7733 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 13)..(1, 17); }
7734 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7735 @@XMLTest:
7736 @@@QName: xp.element.type.match.3.test
7737 @@@DEnt:
7738 @@@@test:value:
7739 <p><pa></p></p>(err)
7740 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 8)..(1, 11); }
7741 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7742 @@XMLTest:
7743 @@@QName: xp.element.type.match.4.test
7744 @@@DEnt:
7745 @@@@test:value:
7746 <a:p xmlns:a="about:1"></p>(err)
7747 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 24)..(1, 27); }
7748 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7749 @@XMLTest:
7750 @@@QName: xp.element.type.match.5.test
7751 @@@DEnt:
7752 @@@@test:value:
7753 <a:p xmlns:a="about:1" xmlns:b="about:1"></b:p>(err)
7754 @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 42)..(1, 47); }
7755 @@@c:erred: <[[xp|wf-syntax-error]]> { }
7756
7757 @@XMLTest:
7758 @@@QName: xp.stag.stago.name.etago.test
7759 @@@DEnt:
7760 @@@@test:value:
7761 <a</a>
7762 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 3); }
7763 @@XMLTest:
7764 @@@QName: xp.stag.stago.name.s.etago.test
7765 @@@DEnt:
7766 @@@@test:value:
7767 <a </a>
7768 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 4); }
7769 @@XMLTest:
7770 @@@QName: xp.stag.stago.name.s.attr.etago.test
7771 @@@DEnt:
7772 @@@@test:value:
7773 <a a="b"</a>
7774 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
7775 @@XMLTest:
7776 @@@QName: xp.stag.stago.name.s.attr.s.attr.etago.test
7777 @@@DEnt:
7778 @@@@test:value:
7779 <a a="b" c="d"</a>
7780 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 15); }
7781 @@XMLTest:
7782 @@@QName: xp.stag.stago.name.s.attr.s.etago.test
7783 @@@DEnt:
7784 @@@@test:value:
7785 <a a="b" </a>
7786 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 10); }
7787 @@XMLTest:
7788 @@@QName: xp.stag.etag.1.test
7789 @@@DEnt:
7790 @@@@test:value:
7791 <root><a></a></root>
7792 @@@test:domTree:
7793 document {
7794 element {
7795 element {
7796 node-name: 'a';
7797 }
7798 }
7799 }
7800 @@XMLTest:
7801 @@@QName: xp.stag.etag.2.test
7802 @@@DEnt:
7803 @@@@test:value:
7804 <root><ab></ab></root>
7805 @@@test:domTree:
7806 document {
7807 element {
7808 element {
7809 node-name: 'ab';
7810 }
7811 }
7812 }
7813 @@XMLTest:
7814 @@@QName: xp.stag.etag.s.1.test
7815 @@@DEnt:
7816 @@@@test:value:
7817 <root><a ></a ></root>
7818 @@@test:domTree:
7819 document {
7820 element {
7821 element {
7822 node-name: 'a';
7823 }
7824 }
7825 }
7826 @@XMLTest:
7827 @@@QName: xp.etag.1.test
7828 @@@DEnt:
7829 @@@@test:value:
7830 <root><a/></root>
7831 @@@test:domTree:
7832 document {
7833 element {
7834 element {
7835 node-name: 'a';
7836 }
7837 }
7838 }
7839 @@XMLTest:
7840 @@@QName: xp.etag.2.test
7841 @@@DEnt:
7842 @@@@test:value:
7843 <root><a /></root>
7844 @@@test:domTree:
7845 document {
7846 element {
7847 element {
7848 node-name: 'a';
7849 }
7850 }
7851 }
7852 @@XMLTest:
7853 @@@QName: xp.stag.etag.attr.1.test
7854 @@@DEnt:
7855 @@@@test:value:
7856 <root><a at="v"></a></root>
7857 @@@test:domTree:
7858 document {
7859 element {
7860 element {
7861 node-name: 'a';
7862 attribute {
7863 node-name: 'at';
7864 value: 'v';
7865 }
7866 }
7867 }
7868 }
7869 @@XMLTest:
7870 @@@QName: xp.stag.etag.attr.2.test
7871 @@@DEnt:
7872 @@@@test:value:
7873 <root><a at="v" ></a></root>
7874 @@@test:domTree:
7875 document {
7876 element {
7877 element {
7878 node-name: 'a';
7879 attribute {
7880 node-name: 'at';
7881 value: 'v';
7882 }
7883 }
7884 }
7885 }
7886 @@XMLTest:
7887 @@@QName: xp.stag.etag.attr.3.test
7888 @@@DEnt:
7889 @@@@test:value:
7890 <root><a at ="v"></a></root>
7891 @@@test:domTree:
7892 document {
7893 element {
7894 element {
7895 node-name: 'a';
7896 attribute {
7897 node-name: 'at';
7898 value: 'v';
7899 }
7900 }
7901 }
7902 }
7903 @@XMLTest:
7904 @@@QName: xp.stag.etag.attr.4.test
7905 @@@DEnt:
7906 @@@@test:value:
7907 <root><a at= "v"></a></root>
7908 @@@test:domTree:
7909 document {
7910 element {
7911 element {
7912 node-name: 'a';
7913 attribute {
7914 node-name: 'at';
7915 value: 'v';
7916 }
7917 }
7918 }
7919 }
7920 @@XMLTest:
7921 @@@QName: xp.stag.etag.attr.5.test
7922 @@@DEnt:
7923 @@@@test:value:
7924 <root><a at='v'></a></root>
7925 @@@test:domTree:
7926 document {
7927 element {
7928 element {
7929 node-name: 'a';
7930 attribute {
7931 node-name: 'at';
7932 value: 'v';
7933 }
7934 }
7935 }
7936 }
7937 @@XMLTest:
7938 @@@QName: xp.stag.etag.attr.6.test
7939 @@@DEnt:
7940 @@@@test:value:
7941 <root><a at= 'v' ></a></root>
7942 @@@test:domTree:
7943 document {
7944 element {
7945 element {
7946 node-name: 'a';
7947 attribute {
7948 node-name: 'at';
7949 value: 'v';
7950 }
7951 }
7952 }
7953 }
7954 @@XMLTest:
7955 @@@QName: xp.stag.etag.attr.attr.1.test
7956 @@@DEnt:
7957 @@@@test:value:
7958 <root><a at="v" tr="w"></a></root>
7959 @@@test:domTree:
7960 document {
7961 element {
7962 element {
7963 node-name: 'a';
7964 attribute {
7965 node-name: 'at';
7966 value: 'v';
7967 }
7968 attribute {
7969 node-name: 'tr';
7970 value: 'w';
7971 }
7972 }
7973 }
7974 }
7975 @@XMLTest:
7976 @@@QName: xp.stag.etag.attr.attr.2.test
7977 @@@DEnt:
7978 @@@@test:value:
7979 <root><a tr="w" at="v"></a></root>
7980 @@@test:domTree:
7981 document {
7982 element {
7983 element {
7984 node-name: 'a';
7985 attribute {
7986 node-name: 'at';
7987 value: 'v';
7988 }
7989 attribute {
7990 node-name: 'tr';
7991 value: 'w';
7992 }
7993 }
7994 }
7995 }
7996 @@XMLTest:
7997 @@@QName: xp.stag.etag.attr.no.s.attr.test
7998 @@@DEnt:
7999 @@@@test:value:
8000 <root><a at="v"tr="w"></a></root>
8001 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 16)..(1, 17); }
8002 @@XMLTest:
8003 @@@QName: xp.etag.attr.1.test
8004 @@@DEnt:
8005 @@@@test:value:
8006 <root><a at="v" tr="w"></a b="c"></root>
8007 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
8008 @@XMLTest:
8009 @@@QName: xp.etag.no.etagc.1.test
8010 @@@DEnt:
8011 @@@@test:value:
8012 <root><a at="v" tr="w"></a</root>
8013 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27)..(1, 28); }
8014 @@XMLTest:
8015 @@@QName: xp.etag.no.etagc.2.test
8016 @@@DEnt:
8017 @@@@test:value:
8018 <root><a at="v" tr="w"></a </root>
8019 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 29)..(1, 30); }
8020 @@XMLTest:
8021 @@@QName: xp.mtag.attr.1.test
8022 @@@DEnt:
8023 @@@@test:value:
8024 <root><a b="c"/></root>
8025 @@@test:domTree:
8026 document {
8027 element {
8028 element {
8029 node-name: 'a';
8030 attribute {
8031 node-name: 'b';
8032 value: 'c';
8033 }
8034 }
8035 }
8036 }
8037 @@XMLTest:
8038 @@@QName: xp.mtag.attr.2.test
8039 @@@DEnt:
8040 @@@@test:value:
8041 <root><a b="c" /></root>
8042 @@@test:domTree:
8043 document {
8044 element {
8045 element {
8046 node-name: 'a';
8047 attribute {
8048 node-name: 'b';
8049 value: 'c';
8050 }
8051 }
8052 }
8053 }
8054 @@XMLTest:
8055 @@@QName: xp.mtag.attr.3.test
8056 @@@DEnt:
8057 @@@@test:value:
8058 <root><a b='c'/></root>
8059 @@@test:domTree:
8060 document {
8061 element {
8062 element {
8063 node-name: 'a';
8064 attribute {
8065 node-name: 'b';
8066 value: 'c';
8067 }
8068 }
8069 }
8070 }
8071 @@XMLTest:
8072 @@@QName: xp.mtag.attr.4.test
8073 @@@DEnt:
8074 @@@@test:value:
8075 <root><a b="c" d="e"/></root>
8076 @@@test:domTree:
8077 document {
8078 element {
8079 element {
8080 node-name: 'a';
8081 attribute {
8082 node-name: 'b';
8083 value: 'c';
8084 }
8085 attribute {
8086 node-name: 'd';
8087 value: 'e';
8088 }
8089 }
8090 }
8091 }
8092
8093 @@XMLTest:
8094 @@@QName: xp.attvalue.lt.1.test
8095 @@@DEnt:
8096 @@@@test:value:
8097 <a b="aa<dd"/>
8098 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
8099 @@XMLTest:
8100 @@@QName: xp.attvalue.lt.2.test
8101 @@@DEnt:
8102 @@@@test:value:
8103 <a b='aa<dd'/>
8104 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
8105 @@XMLTest:
8106 @@@QName: xp.attvalue.amp.1.test
8107 @@@DEnt:
8108 @@@@test:value:
8109 <a b="aa& dd"/>
8110 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 12); }
8111 @@XMLTest:
8112 @@@QName: xp.attvalue.amp.2.test
8113 @@@DEnt:
8114 @@@@test:value:
8115 <a b='aa& dd'/>
8116 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 12); }
8117 @@XMLTest:
8118 @@@QName: xp.attvalue.amp.3.test
8119 @@@DEnt:
8120 @@@@test:value:
8121 <a b="aa&# dd"/>
8122 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 13); }
8123 @@XMLTest:
8124 @@@QName: xp.attvalue.amp.4.test
8125 @@@DEnt:
8126 @@@@test:value:
8127 <a b="aa&#x dd"/>
8128 @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 14); }
8129
8130 @@XMLTest:
8131 @@@QName: xp.unique.att.spec.1.test
8132 @@@DEnt:
8133 @@@@test:value:
8134 <a b="c" b="d"/>
8135 @@@c:erred: <[[xp|wf-unique-att-spec]]> { (1, 4)..(1, 14); }
8136 @@XMLTest:
8137 @@@QName: xp.unique.att.spec.2.test
8138 @@@DEnt:
8139 @@@@test:value:
8140 <a d:b="c" d:b="d" xmlns:d="about:2"/>
8141 @@@c:erred: <[[xp|wf-unique-att-spec]]> { (1, 4)..(1, 18); }
8142
8143 @@XMLTest:
8144 @@@QName: xp.no.external.entity.references.1.test
8145 @@@DEnt:
8146 @@@@test:value:
8147 <!DOCTYPE a [
8148 <!ENTITY ent SYSTEM "something">
8149 ]>
8150 <a b="c&ent;"/>
8151 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (4, 8)..(4, 12); }
8152 @@XMLTest:
8153 @@@QName: xp.no.external.entity.references.2.test
8154 @@@DEnt:
8155 @@@@test:value:
8156 <!DOCTYPE a [
8157 <!NOTATION n SYSTEM "notation">
8158 <!ENTITY ent SYSTEM "something" NDATA n>
8159 ]>
8160 <a b="c&ent;"/>
8161 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (5, 8)..(5, 12); }
8162 @@XMLTest:
8163 @@@QName: xp.no.external.entity.references.3.test
8164 @@@DEnt:
8165 @@@@test:value:
8166 <!DOCTYPE a [
8167 <!ENTITY ent SYSTEM "something">
8168 <!ENTITY ent2 "ddd&ent;">
8169 ]>
8170 <a b="c&ent2;"/>
8171 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 4)..(1, 8); }
8172 @@XMLTest:
8173 @@@QName: xp.no.external.entity.references.4.test
8174 @@@DEnt:
8175 @@@@test:value:
8176 <!DOCTYPE a [
8177 <!NOTATION n SYSTEM "notation">
8178 <!ENTITY ent SYSTEM "something" NDATA n>
8179 <!ENTITY ent2 "ddd&ent;">
8180 ]>
8181 <a b="c&ent2;"/>
8182 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 4)..(1, 8); }
8183 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
8184 @@XMLTest:
8185 @@@QName: xp.no.lt.in.attr.value.1.test
8186 @@@DEnt:
8187 @@@@test:value:
8188 <!DOCTYPE a [
8189 <!ENTITY ent "aa<bb">
8190 ]>
8191 <a b="c&ent;"/>
8192 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8193 @@@c:erred:
8194 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8195 @@@@enImplNote: When entity node is created.
8196 @@XMLTest:
8197 @@@QName: xp.no.lt.in.attr.value.2.test
8198 @@@DEnt:
8199 @@@@test:value:
8200 <!DOCTYPE a [
8201 <!ENTITY ent "aa<bb">
8202 <!ENTITY ent2 "ccc&ent;">
8203 ]>
8204 <a b="c&ent2;"/>
8205 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8206 @@@c:erred:
8207 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8208 @@@@enImplNote: When entity node is created.
8209 @@XMLTest:
8210 @@@QName: xp.no.lt.in.attr.value.3.test
8211 @@@DEnt:
8212 @@@@test:value:
8213 <!DOCTYPE a [
8214 <!ENTITY ent "aa&#x3C;bb">
8215 ]>
8216 <a b="c&ent;"/>
8217 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8218 @@@c:erred:
8219 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8220 @@@@enImplNote: When entity node is created.
8221 @@XMLTest:
8222 @@@QName: xp.no.lt.in.attr.value.4.test
8223 @@@DEnt:
8224 @@@@test:value:
8225 <!DOCTYPE a [
8226 <!ENTITY ent "aa&#x3C;bb">
8227 <!ENTITY ent2 "ccc&ent;">
8228 ]>
8229 <a b="c&ent2;"/>
8230 @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8231 @@@c:erred:
8232 @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8233 @@@@enImplNote: When entity node is created.
8234 @@XMLTest:
8235 @@@QName: xp.ger.lt.in.attr.value.1.test
8236 @@@DEnt:
8237 @@@@test:value:
8238 <!DOCTYPE a [
8239 <!ENTITY ent "aa&lt;bb">
8240 ]>
8241 <a b="c&ent;"/>
8242 @@@test:domTree:
8243 document {
8244 document-type {
8245 general-entity {
8246 node-name: 'ent';
8247 text-content: 'aa<bb';
8248 }
8249 }
8250 element {
8251 attribute {
8252 node-name: 'b';
8253 text { data: 'c'; }
8254 general-entity-reference {
8255 is-expanded: true;
8256 node-name: 'ent';
8257 text-content: 'aa<bb';
8258 }
8259 }
8260 }
8261 }
8262 @@XMLTest:
8263 @@@QName: xp.ger.lt.in.attr.value.2.test
8264 @@@DEnt:
8265 @@@@test:value:
8266 <!DOCTYPE a [
8267 <!ENTITY ent "aa&lt;bb">
8268 <!ENTITY ent2 "ccc&ent;">
8269 ]>
8270 <a b="c&ent2;"/>
8271 @@@test:domTree:
8272 document {
8273 document-type {
8274 general-entity {
8275 node-name: 'ent';
8276 text-content: 'aa<bb';
8277 }
8278 general-entity {
8279 node-name: 'ent2';
8280 text { data: 'ccc'; }
8281 general-entity-reference {
8282 node-name: 'ent';
8283 text-content: 'aa<bb';
8284 is-expanded: true;
8285 }
8286 }
8287 }
8288 element {
8289 attribute {
8290 node-name: 'b';
8291 text { data: 'c'; }
8292 general-entity-reference {
8293 node-name: 'ent2';
8294 text { data: 'ccc'; }
8295 general-entity-reference {
8296 node-name: 'ent';
8297 text-content: 'aa<bb';
8298 is-expanded: true;
8299 }
8300 is-expanded: true;
8301 }
8302 }
8303 }
8304 }
8305
8306 @@XMLTest:
8307 @@@QName: xp.doctype.intsubset.pi.test
8308 @@@DEnt:
8309 @@@@test:value:
8310 <!DOCTYPE a [
8311 <?pi data ?>
8312 ]>
8313 <a></a>
8314 @@@test:domTree:
8315 document {
8316 xml-version: '1.0';
8317 xml-encoding: null;
8318 xml-standalone: false;
8319 document-type {
8320 node-name: 'a';
8321 pi {
8322 target: 'pi';
8323 data: 'data ';
8324 }
8325 }
8326 element {
8327 namespace-uri: null;
8328 prefix: null;
8329 local-name: 'a';
8330 text-content: '';
8331 }
8332 }
8333 @@@enImplNote:
8334 A DOM PI node in doctype node is a manakai extension.
8335
8336
8337 @@XMLTest:
8338 @@@QName: xp.doctype.intsubset.entity.general.internal.test
8339 @@@DEnt:
8340 @@@@test:value:
8341 <!DOCTYPE a [
8342 <!ENTITY entity "entity value">
8343 ]>
8344 <a></a>
8345 @@@test:domTree:
8346 document {
8347 xml-version: '1.0';
8348 xml-encoding: null;
8349 xml-standalone: false;
8350 document-type {
8351 node-name: 'a';
8352 general-entity {
8353 node-name: 'entity';
8354 text-content: 'entity value';
8355 has-replacement-tree: true;
8356 }
8357 }
8358 element {
8359 namespace-uri: null;
8360 prefix: null;
8361 local-name: 'a';
8362 text-content: '';
8363 }
8364 }
8365 @@XMLTest:
8366 @@@QName: xp.doctype.intsubset.entity.parameter.internal.test
8367 @@@DEnt:
8368 @@@@test:value:
8369 <!DOCTYPE a [
8370 <!ENTITY % entity "entity value">
8371 ]>
8372 <a></a>
8373 @@@test:domTree:
8374 document {
8375 xml-version: '1.0';
8376 xml-encoding: null;
8377 xml-standalone: false;
8378 document-type {
8379 node-name: 'a';
8380 }
8381 element {
8382 namespace-uri: null;
8383 prefix: null;
8384 local-name: 'a';
8385 text-content: '';
8386 }
8387 }
8388
8389 @@XMLTest:
8390 @@@QName: xp.doctype.internal.entity.root.element.text.only.test
8391 @@@DEnt:
8392 @@@@test:value:
8393 <!DOCTYPE a [
8394 <!ENTITY entity "entity value">
8395 ]>
8396 <a>&entity;</a>
8397 @@@test:domTree:
8398 document {
8399 xml-version: '1.0';
8400 xml-encoding: null;
8401 xml-standalone: false;
8402 document-type {
8403 node-name: 'a';
8404 general-entity {
8405 node-name: 'entity';
8406 text-content: 'entity value';
8407 has-replacement-tree: true;
8408 }
8409 }
8410 element {
8411 namespace-uri: null;
8412 prefix: null;
8413 local-name: 'a';
8414 general-entity-reference {
8415 node-name: 'entity';
8416 text {
8417 data: 'entity value';
8418 }
8419 is-expanded: true;
8420 }
8421 }
8422 }
8423 @@XMLTest:
8424 @@@QName: xp.doctype.internal.entity.root.element.text.mult.test
8425 @@@DEnt:
8426 @@@@test:value:
8427 <!DOCTYPE a [
8428 <!ENTITY entity "entity value">
8429 ]>
8430 <a>&entity; and &entity;</a>
8431 @@@test:domTree:
8432 document {
8433 xml-version: '1.0';
8434 xml-encoding: null;
8435 xml-standalone: false;
8436 document-type {
8437 node-name: 'a';
8438 general-entity {
8439 node-name: 'entity';
8440 text-content: 'entity value';
8441 has-replacement-tree: true;
8442 }
8443 }
8444 element {
8445 namespace-uri: null;
8446 prefix: null;
8447 local-name: 'a';
8448 general-entity-reference {
8449 node-name: 'entity';
8450 text {
8451 data: 'entity value';
8452 }
8453 is-expanded: true;
8454 }
8455 text { data: ' and '; }
8456 general-entity-reference {
8457 node-name: 'entity';
8458 text {
8459 data: 'entity value';
8460 }
8461 is-expanded: true;
8462 }
8463 }
8464 }
8465 @@XMLTest:
8466 @@@QName: xp.doctype.internal.entity.root.element.text.element.test
8467 @@@DEnt:
8468 @@@@test:value:
8469 <!DOCTYPE a [
8470 <!ENTITY entity "entity <p>value</p> with <e>element</e> ">
8471 ]>
8472 <a>&entity;</a>
8473 @@@test:domTree:
8474 document {
8475 xml-version: '1.0';
8476 xml-encoding: null;
8477 xml-standalone: false;
8478 document-type {
8479 node-name: 'a';
8480 general-entity {
8481 node-name: 'entity';
8482 has-replacement-tree: true;
8483 text { data: 'entity '; }
8484 element {
8485 node-name: 'p';
8486 text-content: 'value';
8487 }
8488 text { data: ' with '; }
8489 element {
8490 node-name: 'e';
8491 text-content: 'element';
8492 }
8493 text { data: ' '; }
8494 }
8495 }
8496 element {
8497 namespace-uri: null;
8498 prefix: null;
8499 local-name: 'a';
8500 general-entity-reference {
8501 node-name: 'entity';
8502 is-expanded: true;
8503 text {
8504 data: 'entity ';
8505 }
8506 element {
8507 namespace-uri: null;
8508 prefix: null;
8509 local-name: 'p';
8510 text {
8511 data: 'value';
8512 }
8513 }
8514 text {
8515 data: ' with ';
8516 }
8517 element {
8518 namespace-uri: null;
8519 prefix: null;
8520 local-name: 'e';
8521 text {
8522 data: 'element';
8523 }
8524 }
8525 text {
8526 data: ' ';
8527 }
8528 }
8529 }
8530 }
8531 @@XMLTest:
8532 @@@QName: xp.doctype.internal.entity.root.element.text.in.ent.test
8533 @@@DEnt:
8534 @@@@test:value:
8535 <!DOCTYPE a [
8536 <!ENTITY entity1 "entity value">
8537 <!ENTITY entity2 "e&entity1;n">
8538 ]>
8539 <a>&entity2;</a>
8540 @@@test:domTree:
8541 document {
8542 xml-version: '1.0';
8543 xml-encoding: null;
8544 xml-standalone: false;
8545 document-type {
8546 node-name: 'a';
8547 general-entity {
8548 node-name: 'entity1';
8549 text-content: 'entity value';
8550 }
8551 general-entity {
8552 node-name: 'entity2';
8553 text { data: 'e'; }
8554 general-entity-reference {
8555 node-name: 'entity1';
8556 text-content: 'entity value';
8557 is-expanded: true;
8558 }
8559 text { data: 'n'; }
8560 }
8561 }
8562 element {
8563 namespace-uri: null;
8564 prefix: null;
8565 local-name: 'a';
8566 general-entity-reference {
8567 node-name: 'entity2';
8568 text { data: 'e'; }
8569 is-expanded: true;
8570 general-entity-reference {
8571 node-name: 'entity1';
8572 text {
8573 data: 'entity value';
8574 }
8575 is-expanded: true;
8576 }
8577 text { data: 'n'; }
8578 }
8579 }
8580 }
8581
8582 @@XMLTest:
8583 @@@QName: xp.doctype.entity.value.charref.test
8584 @@@DEnt:
8585 @@@@test:value:
8586 <!DOCTYPE a [
8587 <!ENTITY entity1 "entity &#x21;value&#35;">
8588 <!ENTITY entity2 '&#x21;value&#35;'>
8589 ]>
8590 <a></a>
8591 @@@test:domTree:
8592 document {
8593 document-type {
8594 general-entity {
8595 node-name: 'entity1';
8596 text-content: 'entity !value#';
8597 has-replacement-tree: true;
8598 }
8599 general-entity {
8600 node-name: 'entity2';
8601 text-content: '!value#';
8602 has-replacement-tree: true;
8603 }
8604 }
8605 element { }
8606 }
8607
8608 @@XMLTest:
8609 @@@QName: xp.predefined.in.content.test
8610 @@@DEnt:
8611 @@@@test:value:
8612 <a>_&lt;_&gt;_&quot;_&apos;_&amp;_</a>
8613 @@@test:domTree:
8614 document {
8615 element {
8616 text-content: '_<_>_"_' U+0027 '_&_';
8617 }
8618 }
8619 @@XMLTest:
8620 @@@QName: xp.predefined.in.attr.test
8621 @@@DEnt:
8622 @@@@test:value:
8623 <a at="_&lt;_&gt;_&quot;_&apos;_&amp;_"></a>
8624 @@@test:domTree:
8625 document {
8626 element {
8627 attribute {
8628 node-name: 'at';
8629 text-content: '_<_>_"_' U+0027 '_&_';
8630 }
8631 }
8632 }
8633 @@XMLTest:
8634 @@@QName: xp.predefined.in.content.in.entity.test
8635 @@@DEnt:
8636 @@@@test:value:
8637 <!DOCTYPE a [
8638 <!ENTITY ent "_&lt;_&gt;_&quot;_&apos;_&amp;_">
8639 ]>
8640 <a>&ent;</a>
8641 @@@test:domTree:
8642 document {
8643 document-type {
8644 general-entity {
8645 node-name: 'ent';
8646 text-content: '_<_>_"_' U+0027 '_&_';
8647 }
8648 }
8649 element {
8650 text-content: '_<_>_"_' U+0027 '_&_';
8651 }
8652 }
8653 @@XMLTest:
8654 @@@QName: xp.predefined.decl.ignore.test
8655 @@@DEnt:
8656 @@@@test:value:
8657 <!DOCTYPE a [
8658 <!ENTITY lt "&#x26;#x3C;">
8659 <!ENTITY gt "&#x3E;">
8660 <!ENTITY amp "&#x26;#x26;">
8661 <!ENTITY quot "&#x22;">
8662 <!ENTITY apos "&#x27;">
8663 <!ENTITY other "other">
8664 ]>
8665 <a>_&lt;_&gt;_&quot;_&apos;_&amp;_&other;_</a>
8666 @@@test:domTree:
8667 document {
8668 document-type {
8669 general-entity {
8670 node-name: 'other';
8671 text-content: 'other';
8672 }
8673 }
8674 element {
8675 text-content: '_<_>_"_' U+0027 '_&_other_';
8676 }
8677 }
8678
8679 @@XMLTest:
8680 @@@QName: xp.doctype.internal.attr.empty.test
8681 @@@DEnt:
8682 @@@@test:value:
8683 <!DOCTYPE a [
8684 <!ATTLIST a>
8685 ]>
8686 <a></a>
8687 @@@test:domTree:
8688 document {
8689 xml-version: '1.0';
8690 xml-encoding: null;
8691 xml-standalone: false;
8692 document-type {
8693 node-name: 'a';
8694 element-type-definition {
8695 node-name: 'a';
8696 }
8697 }
8698 element {
8699 namespace-uri: null;
8700 local-name: 'a';
8701 }
8702 }
8703 @@XMLTest:
8704 @@@QName: xp.doctype.internal.attr.cdata.implied.test
8705 @@@DEnt:
8706 @@@@test:value:
8707 <!DOCTYPE a [
8708 <!ATTLIST a
8709 at CDATA #IMPLIED
8710 >
8711 ]>
8712 <a></a>
8713 @@@test:domTree:
8714 document {
8715 xml-version: '1.0';
8716 xml-encoding: null;
8717 xml-standalone: false;
8718 document-type {
8719 node-name: 'a';
8720 element-type-definition {
8721 node-name: 'a';
8722 attribute-definition {
8723 node-name: 'at';
8724 declared-type: const (CDATA_ATTR);
8725 allowed-tokens: DOMStringList ();
8726 default-type: const (IMPLIED_DEFAULT);
8727 text-content: '';
8728 }
8729 }
8730 }
8731 element {
8732 namespace-uri: null;
8733 local-name: 'a';
8734 }
8735 }
8736 @@XMLTest:
8737 @@@QName: xp.doctype.internal.attr.types.implied.test
8738 @@@DEnt:
8739 @@@@test:value:
8740 <!DOCTYPE a [
8741 <!ATTLIST a
8742 at1 ID #IMPLIED
8743 at2 IDREF #IMPLIED
8744 at3 IDREFS #IMPLIED
8745 at4 ENTITY #IMPLIED
8746 at5 ENTITIES #IMPLIED
8747 at6 NMTOKEN #IMPLIED
8748 at7 NMTOKENS #IMPLIED
8749 at8 NOTATION (n1 | n2|n3) #IMPLIED
8750 at9 (e1| e2| e3 ) #IMPLIED
8751 >
8752 ]>
8753 <a></a>
8754 @@@test:domTree:
8755 document {
8756 xml-version: '1.0';
8757 xml-encoding: null;
8758 xml-standalone: false;
8759 document-type {
8760 node-name: 'a';
8761 element-type-definition {
8762 node-name: 'a';
8763 attribute-definition {
8764 node-name: 'at1';
8765 declared-type: const (ID_ATTR);
8766 allowed-tokens: DOMStringList ();
8767 default-type: const (IMPLIED_DEFAULT);
8768 text-content: '';
8769 }
8770 attribute-definition {
8771 node-name: 'at2';
8772 declared-type: const (IDREF_ATTR);
8773 allowed-tokens: DOMStringList ();
8774 default-type: const (IMPLIED_DEFAULT);
8775 text-content: '';
8776 }
8777 attribute-definition {
8778 node-name: 'at3';
8779 declared-type: const (IDREFS_ATTR);
8780 allowed-tokens: DOMStringList ();
8781 default-type: const (IMPLIED_DEFAULT);
8782 text-content: '';
8783 }
8784 attribute-definition {
8785 node-name: 'at4';
8786 declared-type: const (ENTITY_ATTR);
8787 allowed-tokens: DOMStringList ();
8788 default-type: const (IMPLIED_DEFAULT);
8789 text-content: '';
8790 }
8791 attribute-definition {
8792 node-name: 'at5';
8793 declared-type: const (ENTITIES_ATTR);
8794 allowed-tokens: DOMStringList ();
8795 default-type: const (IMPLIED_DEFAULT);
8796 text-content: '';
8797 }
8798 attribute-definition {
8799 node-name: 'at6';
8800 declared-type: const (NMTOKEN_ATTR);
8801 allowed-tokens: DOMStringList ();
8802 default-type: const (IMPLIED_DEFAULT);
8803 text-content: '';
8804 }
8805 attribute-definition {
8806 node-name: 'at7';
8807 declared-type: const (NMTOKENS_ATTR);
8808 allowed-tokens: DOMStringList ();
8809 default-type: const (IMPLIED_DEFAULT);
8810 text-content: '';
8811 }
8812 attribute-definition {
8813 node-name: 'at8';
8814 declared-type: const (NOTATION_ATTR);
8815 allowed-tokens: DOMStringList ('n1', 'n2', 'n3');
8816 default-type: const (IMPLIED_DEFAULT);
8817 text-content: '';
8818 }
8819 attribute-definition {
8820 node-name: 'at9';
8821 declared-type: const (ENUMERATION_ATTR);
8822 allowed-tokens: DOMStringList ('e1', 'e2', 'e3');
8823 default-type: const (IMPLIED_DEFAULT);
8824 text-content: '';
8825 }
8826 }
8827 }
8828 element {
8829 namespace-uri: null;
8830 local-name: 'a';
8831 }
8832 }
8833 @@XMLTest:
8834 @@@QName: xp.doctype.internal.attr.cdata.defaults.test
8835 @@@DEnt:
8836 @@@@test:value:
8837 <!DOCTYPE a [
8838 <!ATTLIST a
8839 at1 CDATA #IMPLIED
8840 at2 CDATA #REQUIRED
8841 at3 CDATA #FIXED "value3"
8842 at4 CDATA "value4"
8843 at5 CDATA #FIXED 'value5'
8844 at6 CDATA 'value6'
8845 >
8846 ]>
8847 <a></a>
8848 @@@test:domTree:
8849 document {
8850 xml-version: '1.0';
8851 xml-encoding: null;
8852 xml-standalone: false;
8853 document-type {
8854 node-name: 'a';
8855 element-type-definition {
8856 node-name: 'a';
8857 attribute-definition {
8858 node-name: 'at1';
8859 declared-type: const (CDATA_ATTR);
8860 allowed-tokens: DOMStringList ();
8861 default-type: const (IMPLIED_DEFAULT);
8862 text-content: '';
8863 }
8864 attribute-definition {
8865 node-name: 'at2';
8866 declared-type: const (CDATA_ATTR);
8867 allowed-tokens: DOMStringList ();
8868 default-type: const (REQUIRED_DEFAULT);
8869 text-content: '';
8870 }
8871 attribute-definition {
8872 node-name: 'at3';
8873 declared-type: const (CDATA_ATTR);
8874 allowed-tokens: DOMStringList ();
8875 default-type: const (FIXED_DEFAULT);
8876 text-content: 'value3';
8877 }
8878 attribute-definition {
8879 node-name: 'at4';
8880 declared-type: const (CDATA_ATTR);
8881 allowed-tokens: DOMStringList ();
8882 default-type: const (EXPLICIT_DEFAULT);
8883 text-content: 'value4';
8884 }
8885 attribute-definition {
8886 node-name: 'at5';
8887 declared-type: const (CDATA_ATTR);
8888 allowed-tokens: DOMStringList ();
8889 default-type: const (FIXED_DEFAULT);
8890 text-content: 'value5';
8891 }
8892 attribute-definition {
8893 node-name: 'at6';
8894 declared-type: const (CDATA_ATTR);
8895 allowed-tokens: DOMStringList ();
8896 default-type: const (EXPLICIT_DEFAULT);
8897 text-content: 'value6';
8898 }
8899 }
8900 }
8901 element {
8902 namespace-uri: null;
8903 local-name: 'a';
8904 attribute {
8905 node-name: 'at3';
8906 text-content: 'value3';
8907 specified: false;
8908 }
8909 attribute {
8910 node-name: 'at4';
8911 text-content: 'value4';
8912 specified: false;
8913 }
8914 attribute {
8915 node-name: 'at5';
8916 text-content: 'value5';
8917 specified: false;
8918 }
8919 attribute {
8920 node-name: 'at6';
8921 text-content: 'value6';
8922 specified: false;
8923 }
8924 }
8925 }
8926
8927 @@XMLTest:
8928 @@@QName: xp.doctype.internal.attr.cdata.default.normalize.test
8929 @@@DEnt:
8930 @@@@test:value:
8931 <!DOCTYPE a [
8932 <!ATTLIST a
8933 at CDATA " default &#x0A;value "
8934 >
8935 ]>
8936 <a></a>
8937 @@@test:domTree:
8938 document {
8939 xml-version: '1.0';
8940 xml-encoding: null;
8941 xml-standalone: false;
8942 document-type {
8943 node-name: 'a';
8944 element-type-definition {
8945 node-name: 'a';
8946 attribute-definition {
8947 node-name: 'at';
8948 declared-type: const (CDATA_ATTR);
8949 allowed-tokens: DOMStringList ();
8950 default-type: const (EXPLICIT_DEFAULT);
8951 text-content: ' default ' U+000A 'value ';
8952 }
8953 }
8954 }
8955 element {
8956 namespace-uri: null;
8957 local-name: 'a';
8958 attribute {
8959 node-name: 'at';
8960 text-content: ' default ' U+000A 'value ';
8961 specified: false;
8962 }
8963 }
8964 }
8965 @@XMLTest:
8966 @@@QName: xp.doctype.internal.attr.nmtoken.default.normalize.test
8967 @@@DEnt:
8968 @@@@test:value:
8969 <!DOCTYPE a [
8970 <!ATTLIST a
8971 at NMTOKEN " default &#x0A;value "
8972 >
8973 ]>
8974 <a></a>
8975 @@@test:domTree:
8976 document {
8977 xml-version: '1.0';
8978 xml-encoding: null;
8979 xml-standalone: false;
8980 document-type {
8981 node-name: 'a';
8982 element-type-definition {
8983 node-name: 'a';
8984 attribute-definition {
8985 node-name: 'at';
8986 declared-type: const (NMTOKEN_ATTR);
8987 allowed-tokens: DOMStringList ();
8988 default-type: const (EXPLICIT_DEFAULT);
8989 text-content: ' default ' U+000A 'value ';
8990 }
8991 }
8992 }
8993 element {
8994 namespace-uri: null;
8995 local-name: 'a';
8996 attribute {
8997 node-name: 'at';
8998 text-content: ' default ' U+000A 'value ';
8999 specified: false;
9000 }
9001 }
9002 }
9003
9004 @@XMLTest:
9005 @@@QName: xp.doctype.attrtype.no-value.test
9006 @@@DEnt:
9007 @@@@test:value:
9008 <!DOCTYPE a>
9009 <a at=" at value "></a>
9010 @@@test:domTree:
9011 document {
9012 xml-version: '1.0';
9013 xml-encoding: null;
9014 xml-standalone: false;
9015 document-type { }
9016 element {
9017 namespace-uri: null;
9018 local-name: 'a';
9019 attribute {
9020 namespace-uri: null;
9021 local-name: 'at';
9022 value: ' at value ';
9023 text {
9024 data: ' at value ';
9025 }
9026 schema-type-info: TypeInfo (null, null);
9027 specified: true;
9028 }
9029 }
9030 }
9031 @@XMLTest:
9032 @@@QName: xp.doctype.attrtype.cdata.test
9033 @@@DEnt:
9034 @@@@test:value:
9035 <!DOCTYPE a [
9036 <!ATTLIST a
9037 at CDATA #IMPLIED
9038 >
9039 ]>
9040 <a at=" at value "></a>
9041 @@@test:domTree:
9042 document {
9043 xml-version: '1.0';
9044 xml-encoding: null;
9045 xml-standalone: false;
9046 document-type { }
9047 element {
9048 namespace-uri: null;
9049 local-name: 'a';
9050 attribute {
9051 namespace-uri: null;
9052 local-name: 'at';
9053 value: ' at value ';
9054 text {
9055 data: ' at value ';
9056 }
9057 schema-type-info:
9058 TypeInfo ('http://www.w3.org/TR/REC-xml', 'CDATA');
9059 specified: true;
9060 }
9061 }
9062 }
9063 @@XMLTest:
9064 @@@QName: xp.doctype.attrtype.nmtoken.test
9065 @@@DEnt:
9066 @@@@test:value:
9067 <!DOCTYPE a [
9068 <!ATTLIST a
9069 at NMTOKEN #IMPLIED
9070 >
9071 ]>
9072 <a at=" at value "></a>
9073 @@@test:domTree:
9074 document {
9075 xml-version: '1.0';
9076 xml-encoding: null;
9077 xml-standalone: false;
9078 document-type { }
9079 element {
9080 namespace-uri: null;
9081 local-name: 'a';
9082 attribute {
9083 namespace-uri: null;
9084 local-name: 'at';
9085 value: 'at value';
9086 text {
9087 data: ' at value ';
9088 }
9089 schema-type-info:
9090 TypeInfo ('http://www.w3.org/TR/REC-xml', 'NMTOKEN');
9091 specified: true;
9092 }
9093 }
9094 }
9095
9096 @@XMLTest:
9097 @@@QName: xp.doctype.attr.normalization.1.test
9098 @@@DEnt:
9099 @@@@test:value:
9100 <a at=" at &#xA;value "></a>
9101 @@@test:domTree:
9102 document {
9103 element {
9104 attribute {
9105 node-name: 'at';
9106 value: ' at ' U+000A 'value ';
9107 schema-type-info: TypeInfo (null, null);
9108 specified: true;
9109 }
9110 }
9111 }
9112 @@XMLTest:
9113 @@@QName: xp.doctype.attr.normalization.2.test
9114 @@@DEnt:
9115 @@@@test:value:
9116 <a at=" at &#xD;value "></a>
9117 @@@test:domTree:
9118 document {
9119 element {
9120 attribute {
9121 value: ' at ' U+000D 'value ';
9122 schema-type-info: TypeInfo (null, null);
9123 specified: true;
9124 }
9125 }
9126 }
9127 @@XMLTest:
9128 @@@QName: xp.doctype.attr.normalization.3.test
9129 @@@DEnt:
9130 @@@@test:value:
9131 <a at=" at &#x9;value "></a>
9132 @@@test:domTree:
9133 document {
9134 element {
9135 attribute {
9136 node-name: 'at';
9137 value: ' at ' U+0009 'value ';
9138 schema-type-info: TypeInfo (null, null);
9139 specified: true;
9140 }
9141 }
9142 }
9143
9144 @@XMLTest:
9145 @@@QName: xp.doctype.attr.specified.1.test
9146 @@@DEnt:
9147 @@@@test:value:
9148 <!DOCTYPE a [
9149 <!ATTLIST a
9150 at CDATA "default"
9151 >
9152 ]>
9153 <a></a>
9154 @@@test:domTree:
9155 document {
9156 document-type { }
9157 element {
9158 attribute {
9159 node-name: 'at';
9160 value: 'default';
9161 specified: false;
9162 }
9163 }
9164 }
9165 @@XMLTest:
9166 @@@QName: xp.doctype.attr.specified.2.test
9167 @@@DEnt:
9168 @@@@test:value:
9169 <!DOCTYPE a [
9170 <!ATTLIST a
9171 at CDATA "default"
9172 >
9173 ]>
9174 <a at2="specified"></a>
9175 @@@test:domTree:
9176 document {
9177 document-type { }
9178 element {
9179 attribute {
9180 node-name: 'at';
9181 value: 'default';
9182 specified: false;
9183 }
9184 attribute {
9185 node-name: 'at2';
9186 value: 'specified';
9187 specified: true;
9188 }
9189 }
9190 }
9191 @@XMLTest:
9192 @@@QName: xp.doctype.attr.specified.3.test
9193 @@@DEnt:
9194 @@@@test:value:
9195 <!DOCTYPE a [
9196 <!ATTLIST a
9197 at CDATA "default"
9198 >
9199 ]>
9200 <a at="specified"></a>
9201 @@@test:domTree:
9202 document {
9203 document-type { }
9204 element {
9205 attribute {
9206 node-name: 'at';
9207 value: 'specified';
9208 specified: true;
9209 }
9210 }
9211 }
9212
9213 @@XMLTest:
9214 @@@QName: xp.attr.literal.charref.test
9215 @@@DEnt:
9216 @@@@test:value:
9217 <a at1 = "value&#33;_&#x25;value"
9218 at2 = 'value&#x25;_&#33;value'></a>
9219 @@@test:domTree:
9220 document {
9221 element {
9222 attribute {
9223 node-name: 'at1';
9224 text-content: 'value!_%value';
9225 }
9226 attribute {
9227 node-name: 'at2';
9228 text-content: 'value%_!value';
9229 }
9230 }
9231 }
9232 @@XMLTest:
9233 @@@QName: xp.attr.literal.entref.test
9234 @@@DEnt:
9235 @@@@test:value:
9236 <!DOCTYPE a [
9237 <!ENTITY ent "entity&#x26;#33;_&#x26;#x29;value">
9238 ]>
9239 <a at1 = "value&ent;value"
9240 at2 = 'value&ent;value'></a>
9241 @@@test:domTree:
9242 document {
9243 document-type {
9244 general-entity {
9245 node-name: 'ent';
9246 text-content: 'entity!_)value';
9247 }
9248 }
9249 element {
9250 attribute {
9251 node-name: 'at1';
9252 text-content: 'valueentity!_)valuevalue';
9253 }
9254 attribute {
9255 node-name: 'at2';
9256 text-content: 'valueentity!_)valuevalue';
9257 }
9258 }
9259 }
9260 @@XMLTest:
9261 @@@QName: xp.attr.literal.entref.nest.test
9262 @@@DEnt:
9263 @@@@test:value:
9264 <!DOCTYPE a [
9265 <!ENTITY ent1 "entity&#x26;#33;_&#x26;#x29;value">
9266 <!ENTITY ent2 "@&ent1;@">
9267 ]>
9268 <a at1 = "value&ent2;value"
9269 at2 = 'value&ent2;value'></a>
9270 @@@test:domTree:
9271 document {
9272 document-type {
9273 general-entity {
9274 node-name: 'ent1';
9275 text-content: 'entity!_)value';
9276 }
9277 general-entity {
9278 node-name: 'ent2';
9279 text-content: '@entity!_)value@';
9280 }
9281 }
9282 element {
9283 attribute {
9284 node-name: 'at1';
9285 text-content: 'value@entity!_)value@value';
9286 }
9287 attribute {
9288 node-name: 'at2';
9289 text-content: 'value@entity!_)value@value';
9290 }
9291 }
9292 }
9293
9294 @@XMLTest:
9295 @@@QName: xp.element.content.ncr.1.test
9296 @@@DEnt:
9297 @@@@test:value:
9298 <e>&#33;</e>
9299 @@@test:domTree:
9300 document {
9301 element {
9302 text-content: '!';
9303 }
9304 }
9305 @@XMLTest:
9306 @@@QName: xp.element.content.ncr.2.test
9307 @@@DEnt:
9308 @@@@test:value:
9309 <e>aaaa&#33;bbbb</e>
9310 @@@test:domTree:
9311 document {
9312 element {
9313 text-content: 'aaaa!bbbb';
9314 }
9315 }
9316 @@XMLTest:
9317 @@@QName: xp.attrval.ncr.1.test
9318 @@@DEnt:
9319 @@@@test:value:
9320 <e a="&#33;"/>
9321 @@@test:domTree:
9322 document {
9323 element {
9324 attribute {
9325 node-name: 'a';
9326 text-content: '!';
9327 }
9328 }
9329 }
9330 @@XMLTest:
9331 @@@QName: xp.attrval.ncr.2.test
9332 @@@DEnt:
9333 @@@@test:value:
9334 <e a="aaaaa&#33;bbbbb"/>
9335 @@@test:domTree:
9336 document {
9337 element {
9338 attribute {
9339 node-name: 'a';
9340 text-content: 'aaaaa!bbbbb';
9341 }
9342 }
9343 }
9344 @@XMLTest:
9345 @@@QName: xp.attrval.ncr.3.test
9346 @@@DEnt:
9347 @@@@test:value:
9348 <e a='&#33;'/>
9349 @@@test:domTree:
9350 document {
9351 element {
9352 attribute {
9353 node-name: 'a';
9354 text-content: '!';
9355 }
9356 }
9357 }
9358 @@XMLTest:
9359 @@@QName: xp.attrval.ncr.4.test
9360 @@@DEnt:
9361 @@@@test:value:
9362 <e a='aaaaa&#33;bbbbb'/>
9363 @@@test:domTree:
9364 document {
9365 element {
9366 attribute {
9367 node-name: 'a';
9368 text-content: 'aaaaa!bbbbb';
9369 }
9370 }
9371 }
9372 @@XMLTest:
9373 @@@QName: xp.entval.ncr.1.test
9374 @@@DEnt:
9375 @@@@test:value:
9376 <!DOCTYPE e [
9377 <!ENTITY ent "&#33;">
9378 ]>
9379 <e/>
9380 @@@test:domTree:
9381 document {
9382 document-type {
9383 general-entity {
9384 node-name: 'ent';
9385 text-content: '!';
9386 }
9387 }
9388 element { }
9389 }
9390 @@XMLTest:
9391 @@@QName: xp.entval.ncr.2.test
9392 @@@DEnt:
9393 @@@@test:value:
9394 <!DOCTYPE e [
9395 <!ENTITY ent "aaaaa&#33;bbbbb">
9396 ]>
9397 <e/>
9398 @@@test:domTree:
9399 document {
9400 document-type {
9401 general-entity {
9402 node-name: 'ent';
9403 text-content: 'aaaaa!bbbbb';
9404 }
9405 }
9406 element { }
9407 }
9408 @@XMLTest:
9409 @@@QName: xp.element.content.reptxt.ncr.1.test
9410 @@@DEnt:
9411 @@@@test:value:
9412 <!DOCTYPE e [
9413 <!ENTITY ent "&#38;#33;">
9414 ]>
9415 <e>&ent;</e>
9416 @@@test:domTree:
9417 document {
9418 document-type { }
9419 element {
9420 general-entity-reference {
9421 node-name: 'ent';
9422 text-content: '!';
9423 is-expanded: true;
9424 }
9425 }
9426 }
9427 @@XMLTest:
9428 @@@QName: xp.element.content.reptxt.ncr.2.test
9429 @@@DEnt:
9430 @@@@test:value:
9431 <!DOCTYPE e [
9432 <!ENTITY ent "aaaaa&#38;#33;bbbbb">
9433 ]>
9434 <e>&ent;</e>
9435 @@@test:domTree:
9436 document {
9437 document-type { }
9438 element {
9439 general-entity-reference {
9440 node-name: 'ent';
9441 text-content: 'aaaaa!bbbbb';
9442 is-expanded: true;
9443 }
9444 }
9445 }
9446 @@XMLTest:
9447 @@@QName: xp.element.content.reptxt.reptxt.ncr.1.test
9448 @@@DEnt:
9449 @@@@test:value:
9450 <!DOCTYPE e [
9451 <!ENTITY ent "&#38;#33;">
9452 <!ENTITY ent2 "&ent;">
9453 ]>
9454 <e>&ent2;</e>
9455 @@@test:domTree:
9456 document {
9457 document-type { }
9458 element {
9459 general-entity-reference {
9460 node-name: 'ent2';
9461 general-entity-reference {
9462 node-name: 'ent';
9463 text-content: '!';
9464 is-expanded: true;
9465 }
9466 is-expanded: true;
9467 }
9468 }
9469 }
9470 @@XMLTest:
9471 @@@QName: xp.element.content.reptxt.reptxt.ncr.2.test
9472 @@@DEnt:
9473 @@@@test:value:
9474 <!DOCTYPE e [
9475 <!ENTITY ent "aa&#38;#33;bb">
9476 <!ENTITY ent2 "&ent;">
9477 ]>
9478 <e>&ent2;</e>
9479 @@@test:domTree:
9480 document {
9481 document-type { }
9482 element {
9483 general-entity-reference {
9484 node-name: 'ent2';
9485 general-entity-reference {
9486 node-name: 'ent';
9487 text-content: 'aa!bb';
9488 is-expanded: true;
9489 }
9490 is-expanded: true;
9491 }
9492 }
9493 }
9494 @@XMLTest:
9495 @@@QName: xp.attval.reptxt.ncr.1.test
9496 @@@DEnt:
9497 @@@@test:value:
9498 <!DOCTYPE e [
9499 <!ENTITY ent "&#38;#33;">
9500 ]>
9501 <e a="&ent;"/>
9502 @@@test:domTree:
9503 document {
9504 document-type { }
9505 element {
9506 attribute {
9507 node-name: 'a';
9508 general-entity-reference {
9509 node-name: 'ent';
9510 text-content: '!';
9511 is-expanded: true;
9512 }
9513 }
9514 }
9515 }
9516 @@XMLTest:
9517 @@@QName: xp.attval.reptxt.ncr.2.test
9518 @@@DEnt:
9519 @@@@test:value:
9520 <!DOCTYPE e [
9521 <!ENTITY ent "aaaaa&#38;#33;bbbbb">
9522 ]>
9523 <e a="&ent;"/>
9524 @@@test:domTree:
9525 document {
9526 document-type { }
9527 element {
9528 attribute {
9529 node-name: 'a';
9530 general-entity-reference {
9531 node-name: 'ent';
9532 text-content: 'aaaaa!bbbbb';
9533 is-expanded: true;
9534 }
9535 }
9536 }
9537 }
9538 @@XMLTest:
9539 @@@QName: xp.attval.reptxt.reptxt.ncr.1.test
9540 @@@DEnt:
9541 @@@@test:value:
9542 <!DOCTYPE e [
9543 <!ENTITY ent "&#38;#33;">
9544 <!ENTITY ent2 "&ent;">
9545 ]>
9546 <e a="&ent2;"/>
9547 @@@test:domTree:
9548 document {
9549 document-type { }
9550 element {
9551 attribute {
9552 node-name: 'a';
9553 general-entity-reference {
9554 node-name: 'ent2';
9555 is-expanded: true;
9556 general-entity-reference {
9557 node-name: 'ent';
9558 text-content: '!';
9559 is-expanded: true;
9560 }
9561 }
9562 }
9563 }
9564 }
9565 @@XMLTest:
9566 @@@QName: xp.attval.reptxt.reptxt.ncr.2.test
9567 @@@DEnt:
9568 @@@@test:value:
9569 <!DOCTYPE e [
9570 <!ENTITY ent "aa&#38;#33;bb">
9571 <!ENTITY ent2 "&ent;">
9572 ]>
9573 <e a="&ent2;"/>
9574 @@@test:domTree:
9575 document {
9576 document-type { }
9577 element {
9578 attribute {
9579 node-name: 'a';
9580 general-entity-reference {
9581 node-name: 'ent2';
9582 is-expanded: true;
9583 general-entity-reference {
9584 node-name: 'ent';
9585 text-content: 'aa!bb';
9586 is-expanded: true;
9587 }
9588 }
9589 }
9590 }
9591 }
9592
9593 @@XMLTest:
9594 @@@QName: xp.element.content.hcr.1.test
9595 @@@DEnt:
9596 @@@@test:value:
9597 <e>&#x21;</e>
9598 @@@test:domTree:
9599 document {
9600 element {
9601 text-content: '!';
9602 }
9603 }
9604 @@XMLTest:
9605 @@@QName: xp.element.content.hcr.2.test
9606 @@@DEnt:
9607 @@@@test:value:
9608 <e>aaaa&#x21;bbbb</e>
9609 @@@test:domTree:
9610 document {
9611 element {
9612 text-content: 'aaaa!bbbb';
9613 }
9614 }
9615 @@XMLTest:
9616 @@@QName: xp.attrval.hcr.1.test
9617 @@@DEnt:
9618 @@@@test:value:
9619 <e a="&#x21;"/>
9620 @@@test:domTree:
9621 document {
9622 element {
9623 attribute {
9624 node-name: 'a';
9625 text-content: '!';
9626 }
9627 }
9628 }
9629 @@XMLTest:
9630 @@@QName: xp.attrval.hcr.2.test
9631 @@@DEnt:
9632 @@@@test:value:
9633 <e a="aaaaa&#x21;bbbbb"/>
9634 @@@test:domTree:
9635 document {
9636 element {
9637 attribute {
9638 node-name: 'a';
9639 text-content: 'aaaaa!bbbbb';
9640 }
9641 }
9642 }
9643 @@XMLTest:
9644 @@@QName: xp.attrval.hcr.3.test
9645 @@@DEnt:
9646 @@@@test:value:
9647 <e a='&#x21;'/>
9648 @@@test:domTree:
9649 document {
9650 element {
9651 attribute {
9652 node-name: 'a';
9653 text-content: '!';
9654 }
9655 }
9656 }
9657 @@XMLTest:
9658 @@@QName: xp.attrval.hcr.4.test
9659 @@@DEnt:
9660 @@@@test:value:
9661 <e a='aaaaa&#x21;bbbbb'/>
9662 @@@test:domTree:
9663 document {
9664 element {
9665 attribute {
9666 node-name: 'a';
9667 text-content: 'aaaaa!bbbbb';
9668 }
9669 }
9670 }
9671 @@XMLTest:
9672 @@@QName: xp.entval.hcr.1.test
9673 @@@DEnt:
9674 @@@@test:value:
9675 <!DOCTYPE e [
9676 <!ENTITY ent "&#x21;">
9677 ]>
9678 <e/>
9679 @@@test:domTree:
9680 document {
9681 document-type {
9682 general-entity {
9683 node-name: 'ent';
9684 text-content: '!';
9685 }
9686 }
9687 element { }
9688 }
9689 @@XMLTest:
9690 @@@QName: xp.entval.hcr.2.test
9691 @@@DEnt:
9692 @@@@test:value:
9693 <!DOCTYPE e [
9694 <!ENTITY ent "aaaaa&#x21;bbbbb">
9695 ]>
9696 <e/>
9697 @@@test:domTree:
9698 document {
9699 document-type {
9700 general-entity {
9701 node-name: 'ent';
9702 text-content: 'aaaaa!bbbbb';
9703 }
9704 }
9705 element { }
9706 }
9707 @@XMLTest:
9708 @@@QName: xp.element.content.reptxt.hcr.1.test
9709 @@@DEnt:
9710 @@@@test:value:
9711 <!DOCTYPE e [
9712 <!ENTITY ent "&#38;#x21;">
9713 ]>
9714 <e>&ent;</e>
9715 @@@test:domTree:
9716 document {
9717 document-type { }
9718 element {
9719 general-entity-reference {
9720 node-name: 'ent';
9721 text-content: '!';
9722 is-expanded: true;
9723 }
9724 }
9725 }
9726 @@XMLTest:
9727 @@@QName: xp.element.content.reptxt.hcr.2.test
9728 @@@DEnt:
9729 @@@@test:value:
9730 <!DOCTYPE e [
9731 <!ENTITY ent "aaaaa&#38;#x21;bbbbb">
9732 ]>
9733 <e>&ent;</e>
9734 @@@test:domTree:
9735 document {
9736 document-type { }
9737 element {
9738 general-entity-reference {
9739 node-name: 'ent';
9740 text-content: 'aaaaa!bbbbb';
9741 is-expanded: true;
9742 }
9743 }
9744 }
9745 @@XMLTest:
9746 @@@QName: xp.element.content.reptxt.reptxt.hcr.1.test
9747 @@@DEnt:
9748 @@@@test:value:
9749 <!DOCTYPE e [
9750 <!ENTITY ent "&#38;#x21;">
9751 <!ENTITY ent2 "&ent;">
9752 ]>
9753 <e>&ent2;</e>
9754 @@@test:domTree:
9755 document {
9756 document-type { }
9757 element {
9758 general-entity-reference {
9759 node-name: 'ent2';
9760 is-expanded: true;
9761 general-entity-reference {
9762 node-name: 'ent';
9763 text-content: '!';
9764 is-expanded: true;
9765 }
9766 }
9767 }
9768 }
9769 @@XMLTest:
9770 @@@QName: xp.element.content.reptxt.reptxt.hcr.2.test
9771 @@@DEnt:
9772 @@@@test:value:
9773 <!DOCTYPE e [
9774 <!ENTITY ent "aa&#38;#x21;bb">
9775 <!ENTITY ent2 "&ent;">
9776 ]>
9777 <e>&ent2;</e>
9778 @@@test:domTree:
9779 document {
9780 document-type { }
9781 element {
9782 general-entity-reference {
9783 node-name: 'ent2';
9784 is-expanded: true;
9785 general-entity-reference {
9786 node-name: 'ent';
9787 is-expanded: true;
9788 text-content: 'aa!bb';
9789 }
9790 }
9791 }
9792 }
9793 @@XMLTest:
9794 @@@QName: xp.attval.reptxt.hcr.1.test
9795 @@@DEnt:
9796 @@@@test:value:
9797 <!DOCTYPE e [
9798 <!ENTITY ent "&#38;#x21;">
9799 ]>
9800 <e a="&ent;"/>
9801 @@@test:domTree:
9802 document {
9803 document-type { }
9804 element {
9805 attribute {
9806 node-name: 'a';
9807 general-entity-reference {
9808 node-name: 'ent';
9809 is-expanded: true;
9810 text-content: '!';
9811 }
9812 }
9813 }
9814 }
9815 @@XMLTest:
9816 @@@QName: xp.attval.reptxt.hcr.2.test
9817 @@@DEnt:
9818 @@@@test:value:
9819 <!DOCTYPE e [
9820 <!ENTITY ent "aaaaa&#38;#x21;bbbbb">
9821 ]>
9822 <e a="&ent;"/>
9823 @@@test:domTree:
9824 document {
9825 document-type { }
9826 element {
9827 attribute {
9828 node-name: 'a';
9829 general-entity-reference {
9830 node-name: 'ent';
9831 is-expanded: true;
9832 text-content: 'aaaaa!bbbbb';
9833 }
9834 }
9835 }
9836 }
9837 @@XMLTest:
9838 @@@QName: xp.attval.reptxt.reptxt.hcr.1.test
9839 @@@DEnt:
9840 @@@@test:value:
9841 <!DOCTYPE e [
9842 <!ENTITY ent "&#38;#x21;">
9843 <!ENTITY ent2 "&ent;">
9844 ]>
9845 <e a="&ent2;"/>
9846 @@@test:domTree:
9847 document {
9848 document-type { }
9849 element {
9850 attribute {
9851 node-name: 'a';
9852 general-entity-reference {
9853 node-name: 'ent2';
9854 is-expanded: true;
9855 general-entity-reference {
9856 node-name: 'ent';
9857 is-expanded: true;
9858 text-content: '!';
9859 }
9860 }
9861 }
9862 }
9863 }
9864 @@XMLTest:
9865 @@@QName: xp.attval.reptxt.reptxt.hcr.2.test
9866 @@@DEnt:
9867 @@@@test:value:
9868 <!DOCTYPE e [
9869 <!ENTITY ent "aa&#38;#x21;bb">
9870 <!ENTITY ent2 "&ent;">
9871 ]>
9872 <e a="&ent2;"/>
9873 @@@test:domTree:
9874 document {
9875 document-type { }
9876 element {
9877 attribute {
9878 node-name: 'a';
9879 general-entity-reference {
9880 node-name: 'ent2';
9881 is-expanded: true;
9882 general-entity-reference {
9883 node-name: 'ent';
9884 is-expanded: true;
9885 text-content: 'aa!bb';
9886 }
9887 }
9888 }
9889 }
9890 }
9891
9892 @@XMLTest:
9893 @@@QName: xp.element.content.ncr.legal.char.1.0.1.test
9894 @@@DEnt:
9895 @@@@test:value:
9896 <?xml version="1.0"?>
9897 <e>&#0;</e>
9898 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9899 @@XMLTest:
9900 @@@QName: xp.element.content.ncr.legal.char.1.1.1.test
9901 @@@DEnt:
9902 @@@@test:value:
9903 <?xml version="1.1"?>
9904 <e>&#0;</e>
9905 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9906 @@XMLTest:
9907 @@@QName: xp.element.content.ncr.legal.char.1.0.2.test
9908 @@@DEnt:
9909 @@@@test:value:
9910 <?xml version="1.0"?>
9911 <e>&#1;</e>
9912 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9913 @@XMLTest:
9914 @@@QName: xp.element.content.ncr.legal.char.1.1.2.test
9915 @@@DEnt:
9916 @@@@test:value:
9917 <?xml version="1.1"?>
9918 <e>&#1;</e>
9919 @@@test:domTree:
9920 document {
9921 xml-version: '1.1';
9922 element {
9923 text-content: U+0001;
9924 }
9925 }
9926 @@XMLTest:
9927 @@@QName: xp.element.content.hcr.legal.char.1.0.1.test
9928 @@@DEnt:
9929 @@@@test:value:
9930 <?xml version="1.0"?>
9931 <e>&#x0;</e>
9932 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9933 @@XMLTest:
9934 @@@QName: xp.element.content.hcr.legal.char.1.1.1.test
9935 @@@DEnt:
9936 @@@@test:value:
9937 <?xml version="1.1"?>
9938 <e>&#x0;</e>
9939 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9940 @@XMLTest:
9941 @@@QName: xp.element.content.hcr.legal.char.1.0.2.test
9942 @@@DEnt:
9943 @@@@test:value:
9944 <?xml version="1.0"?>
9945 <e>&#x1;</e>
9946 @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9947 @@XMLTest:
9948 @@@QName: xp.element.content.hcr.legal.char.1.1.2.test
9949 @@@DEnt:
9950 @@@@test:value:
9951 <?xml version="1.1"?>
9952 <e>&#x1;</e>
9953 @@@test:domTree:
9954 document {
9955 xml-version: '1.1';
9956 element {
9957 text-content: U+0001;
9958 }
9959 }
9960
9961 @@XMLTest:
9962 @@@QName: xp.element.content.ger.entity.declared.nodtd.1.test
9963 @@@DEnt:
9964 @@@@test:value:
9965 <p>&entity;</p>
9966 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 4)..(1, 11); }
9967 @@XMLTest:
9968 @@@QName: xp.element.content.ger.entity.declared.nodtd.2.test
9969 @@@DEnt:
9970 @@@@test:value:
9971 <?xml version="1.0" standalone="yes"?>
9972 <p>&entity;</p>
9973 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9974 @@XMLTest:
9975 @@@QName: xp.element.content.ger.entity.declared.nodtd.3.test
9976 @@@DEnt:
9977 @@@@test:value:
9978 <?xml version="1.0" standalone="no"?>
9979 <p>&entity;</p>
9980 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9981 @@XMLTest:
9982 @@@QName: xp.element.content.ger.entity.declared.nodtd.-1.test
9983 @@@DEnt:
9984 @@@@test:value:
9985 <p>&lt;&gt;&amp;&quot;&apos;</p>
9986 @@@test:domTree:
9987 document {
9988 element {
9989 text-content: '<>&"' U+0027;
9990 }
9991 }
9992 @@XMLTest:
9993 @@@QName: xp.element.content.ger.entity.declared.nopref.1.test
9994 @@@DEnt:
9995 @@@@test:value:
9996 <!DOCTYPE p []>
9997 <p>&entity;</p>
9998 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
9999 @@XMLTest:
10000 @@@QName: xp.element.content.ger.entity.declared.nopref.2.test
10001 @@@DEnt:
10002 @@@@test:value:
10003 <!DOCTYPE p [
10004 <!ENTITY other "aa">
10005 <!ENTITY % another "aa">
10006 ]>
10007 <p>&entity;</p>
10008 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 4)..(5, 11); }
10009 @@XMLTest:
10010 @@@QName: xp.element.content.ger.entity.declared.nopref.3.test
10011 @@@DEnt:
10012 @@@@test:value:
10013 <?xml version="1.0" standalone="yes"?>
10014 <!DOCTYPE p []>
10015 <p>&entity;</p>
10016 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10017 @@XMLTest:
10018 @@@QName: xp.element.content.ger.entity.declared.nopref.4.test
10019 @@@DEnt:
10020 @@@@test:value:
10021 <?xml version="1.0" standalone="no"?>
10022 <!DOCTYPE p []>
10023 <p>&entity;</p>
10024 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10025 @@XMLTest:
10026 @@@QName: xp.element.content.ger.entity.declared.nopref.5.test
10027 @@@DEnt:
10028 @@@@test:value:
10029 <?xml version="1.0" standalone="yes"?>
10030 <!DOCTYPE p [
10031 <!ENTITY other "aa">
10032 <!ENTITY % another "aa">
10033 ]>
10034 <p>&entity;</p>
10035 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10036 @@XMLTest:
10037 @@@QName: xp.element.content.ger.entity.declared.nopref.6.test
10038 @@@DEnt:
10039 @@@@test:value:
10040 <?xml version="1.0" standalone="no"?>
10041 <!DOCTYPE p [
10042 <!ENTITY other "aa">
10043 <!ENTITY % another "aa">
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.nopref.-1.test
10049 @@@DEnt:
10050 @@@@test:value:
10051 <!DOCTYPE p [
10052 <!ENTITY entity "value">
10053 ]>
10054 <p>&entity;</p>
10055 @@@test:domTree:
10056 document {
10057 document-type {
10058 general-entity {
10059 node-name: 'entity';
10060 text-content: 'value';
10061 }
10062 }
10063 element {
10064 general-entity-reference {
10065 node-name: 'entity';
10066 is-expanded: true;
10067 text-content: 'value';
10068 }
10069 }
10070 }
10071 @@XMLTest:
10072 @@@QName: xp.element.content.ger.entity.declared.nopref.-2.test
10073 @@@DEnt:
10074 @@@@test:value:
10075 <!DOCTYPE p [
10076 <!ENTITY entity "value">
10077 <!ENTITY another SYSTEM "another">
10078 ]>
10079 <p>&entity;</p>
10080 @@@test:domTree:
10081 document {
10082 document-type {
10083 general-entity {
10084 node-name: 'entity';
10085 text-content: 'value';
10086 }
10087 general-entity {
10088 node-name: 'another';
10089 public-id: null;
10090 system-id: 'another';
10091 }
10092 }
10093 element {
10094 general-entity-reference {
10095 node-name: 'entity';
10096 is-expanded: true;
10097 text-content: 'value';
10098 }
10099 }
10100 }
10101 @@XMLTest:
10102 @@@QName: xp.element.content.ger.entity.declared.standalone.1.test
10103 @@@DEnt:
10104 @@@@test:value:
10105 <?xml version="1.0" standalone="yes"?>
10106 <p>&entity;</p>
10107 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
10108 @@XMLTest:
10109 @@@QName: xp.element.content.ger.entity.declared.standalone.2.test
10110 @@@DEnt:
10111 @@@@test:value:
10112 <?xml version="1.0" standalone="yes"?>
10113 <!DOCTYPE p []>
10114 <p>&entity;</p>
10115 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10116 @@XMLTest:
10117 @@@QName: xp.element.content.ger.entity.declared.standalone.3.test
10118 @@@DEnt:
10119 @@@@test:value:
10120 <?xml version="1.0" standalone="yes"?>
10121 <!DOCTYPE p [
10122 <!ENTITY % para "<!-- -->">
10123 %para;
10124 ]>
10125 <p>&entity;</p>
10126 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10127 @@XMLTest:
10128 @@@QName: xp.element.content.ger.entity.declared.standalone.-1.test
10129 @@@DEnt:
10130 @@@@test:value:
10131 <?xml version="1.0" standalone="no"?>
10132 <!DOCTYPE p [
10133 <!ENTITY % para "<!-- -->">
10134 %para;
10135 ]>
10136 <p>&entity;</p>
10137 @@@test:domTree:
10138 document {
10139 document-type { }
10140 element {
10141 general-entity-reference {
10142 is-expanded: false;
10143 }
10144 }
10145 }
10146 @@XMLTest:
10147 @@@QName: xp.element.content.ger.entity.declared.standalone.-2.test
10148 @@@DEnt:
10149 @@@@test:value:
10150 <!DOCTYPE p [
10151 <!ENTITY % para "<!-- -->">
10152 %para;
10153 ]>
10154 <p>&entity;</p>
10155 @@@test:domTree:
10156 document {
10157 document-type { }
10158 element {
10159 general-entity-reference {
10160 is-expanded: false;
10161 }
10162 }
10163 }
10164 @@XMLTest:
10165 @@@QName: xp.element.content.ger.entity.declared.standalone.4.test
10166 @@@DEnt:
10167 @@@@test:value:
10168 <?xml version="1.0" standalone="yes"?>
10169 <!DOCTYPE p [
10170 <!ENTITY % para SYSTEM "para">
10171 %para;
10172 ]>
10173 <p>&entity;</p>
10174 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10175 @@XMLTest:
10176 @@@QName: xp.element.content.ger.entity.declared.standalone.-3.test
10177 @@@DEnt:
10178 @@@@test:value:
10179 <?xml version="1.0" standalone="no"?>
10180 <!DOCTYPE p [
10181 <!ENTITY % para SYSTEM "para">
10182 %para;
10183 ]>
10184 <p>&entity;</p>
10185 @@@test:domTree:
10186 document {
10187 document-type { }
10188 element {
10189 general-entity-reference {
10190 is-expanded: false;
10191 }
10192 }
10193 }
10194 @@XMLTest:
10195 @@@QName: xp.element.content.ger.entity.declared.standalone.-4.test
10196 @@@DEnt:
10197 @@@@test:value:
10198 <!DOCTYPE p [
10199 <!ENTITY % para SYSTEM "para">
10200 %para;
10201 ]>
10202 <p>&entity;</p>
10203 @@@test:domTree:
10204 document {
10205 document-type { }
10206 element {
10207 general-entity-reference {
10208 is-expanded: false;
10209 }
10210 }
10211 }
10212 @@XMLTest:
10213 @@@QName: xp.element.content.ger.entity.declared.standalone.5.test
10214 @@@DEnt:
10215 @@@@test:value:
10216 <?xml version="1.0" standalone="yes"?>
10217 <!DOCTYPE p SYSTEM "dtd">
10218 <p>&entity;</p>
10219 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10220 @@XMLTest:
10221 @@@QName: xp.element.content.ger.entity.declared.standalone.-5.test
10222 @@@DEnt:
10223 @@@@test:value:
10224 <?xml version="1.0" standalone="no"?>
10225 <!DOCTYPE p SYSTEM "dtd">
10226 <p>&entity;</p>
10227 @@@test:domTree:
10228 document {
10229 document-type { }
10230 element {
10231 general-entity-reference {
10232 is-expanded: false;
10233 }
10234 }
10235 }
10236 @@XMLTest:
10237 @@@QName: xp.element.content.ger.entity.declared.standalone.-6.test
10238 @@@DEnt:
10239 @@@@test:value:
10240 <!DOCTYPE p SYSTEM "dtd">
10241 <p>&entity;</p>
10242 @@@test:domTree:
10243 document {
10244 document-type { }
10245 element {
10246 general-entity-reference {
10247 is-expanded: false;
10248 }
10249 }
10250 }
10251
10252 @@XMLTest:
10253 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.1.test
10254 @@@DEnt:
10255 @@@@test:value:
10256 <!DOCTYPE p [
10257 <!ENTITY c "&entity;">
10258 ]>
10259 <p>&c;</p>
10260 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10261 @@XMLTest:
10262 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.2.test
10263 @@@DEnt:
10264 @@@@test:value:
10265 <!DOCTYPE p [
10266 <!ENTITY other "aa">
10267 <!ENTITY % another "aa">
10268 <!ENTITY c "&entity;">
10269 ]>
10270 <p>&c;</p>
10271 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10272 @@XMLTest:
10273 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.3.test
10274 @@@DEnt:
10275 @@@@test:value:
10276 <?xml version="1.0" standalone="yes"?>
10277 <!DOCTYPE p [
10278 <!ENTITY c "&entity;">
10279 ]>
10280 <p>&c;</p>
10281 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10282 @@XMLTest:
10283 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.4.test
10284 @@@DEnt:
10285 @@@@test:value:
10286 <?xml version="1.0" standalone="no"?>
10287 <!DOCTYPE p [
10288 <!ENTITY c "&entity;">
10289 ]>
10290 <p>&c;</p>
10291 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10292 @@XMLTest:
10293 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.5.test
10294 @@@DEnt:
10295 @@@@test:value:
10296 <?xml version="1.0" standalone="yes"?>
10297 <!DOCTYPE p [
10298 <!ENTITY other "aa">
10299 <!ENTITY % another "aa">
10300 <!ENTITY c "&entity;">
10301 ]>
10302 <p>&c;</p>
10303 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10304 @@XMLTest:
10305 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.6.test
10306 @@@DEnt:
10307 @@@@test:value:
10308 <?xml version="1.0" standalone="no"?>
10309 <!DOCTYPE p [
10310 <!ENTITY other "aa">
10311 <!ENTITY % another "aa">
10312 <!ENTITY c "&entity;">
10313 ]>
10314 <p>&c;</p>
10315 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10316 @@XMLTest:
10317 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.-1.test
10318 @@@DEnt:
10319 @@@@test:value:
10320 <!DOCTYPE p [
10321 <!ENTITY entity "value">
10322 <!ENTITY c "&entity;">
10323 ]>
10324 <p>&c;</p>
10325 @@@test:domTree:
10326 document {
10327 document-type {
10328 general-entity {
10329 node-name: 'entity';
10330 text-content: 'value';
10331 }
10332 general-entity {
10333 node-name: 'c';
10334 general-entity-reference {
10335 node-name: 'entity';
10336 text-content: 'value';
10337 }
10338 }
10339 }
10340 element {
10341 general-entity-reference {
10342 node-name: 'c';
10343 general-entity-reference {
10344 node-name: 'entity';
10345 text-content: 'value';
10346 }
10347 }
10348 }
10349 }
10350 @@XMLTest:
10351 @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.-2.test
10352 @@@DEnt:
10353 @@@@test:value:
10354 <!DOCTYPE p [
10355 <!ENTITY entity "value">
10356 <!ENTITY another SYSTEM "another">
10357 <!ENTITY c "&entity;">
10358 ]>
10359 <p>&c;</p>
10360 @@@test:domTree:
10361 document {
10362 document-type {
10363 general-entity {
10364 node-name: 'entity';
10365 text-content: 'value';
10366 }
10367 general-entity {
10368 node-name: 'c';
10369 general-entity-reference {
10370 node-name: 'entity';
10371 is-expanded: true;
10372 text-content: 'value';
10373 }
10374 }
10375 general-entity {
10376 node-name: 'another';
10377 public-id: null;
10378 system-id: 'another';
10379 has-replacement-tree: false;
10380 }
10381 }
10382 element {
10383 general-entity-reference {
10384 node-name: 'c';
10385 is-expanded: true;
10386 general-entity-reference {
10387 node-name: 'entity';
10388 is-expanded: true;
10389 text-content: 'value';
10390 }
10391 }
10392 }
10393 }
10394 @@XMLTest:
10395 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.2.test
10396 @@@DEnt:
10397 @@@@test:value:
10398 <?xml version="1.0" standalone="yes"?>
10399 <!DOCTYPE p [
10400 <!ENTITY c "&entity;">
10401 ]>
10402 <p>&c;</p>
10403 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10404 @@XMLTest:
10405 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.3.test
10406 @@@DEnt:
10407 @@@@test:value:
10408 <?xml version="1.0" standalone="yes"?>
10409 <!DOCTYPE p [
10410 <!ENTITY % para "<!-- -->">
10411 %para;
10412 <!ENTITY c "&entity;">
10413 ]>
10414 <p>&c;</p>
10415 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10416 @@XMLTest:
10417 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-1.test
10418 @@@DEnt:
10419 @@@@test:value:
10420 <?xml version="1.0" standalone="no"?>
10421 <!DOCTYPE p [
10422 <!ENTITY c "&entity;">
10423 <!ENTITY % para "<!-- -->">
10424 %para;
10425 ]>
10426 <p>&c;</p>
10427 @@@test:domTree:
10428 document {
10429 document-type {
10430 general-entity {
10431 node-name: 'c';
10432 general-entity-reference {
10433 node-name: 'entity';
10434 is-expanded: false;
10435 }
10436 }
10437 }
10438 element {
10439 general-entity-reference {
10440 node-name: 'c';
10441 general-entity-reference {
10442 node-name: 'entity';
10443 is-expanded: false;
10444 }
10445 }
10446 }
10447 }
10448 @@XMLTest:
10449 @@@QName:
10450 xp.reptxt.element.content.ger.entity.declared.standalone.-1.2.test
10451 @@@DEnt:
10452 @@@@test:value:
10453 <?xml version="1.0" standalone="no"?>
10454 <!DOCTYPE p [
10455 <!ENTITY % para "<!-- -->">
10456 %para;
10457 <!ENTITY c "&entity;">
10458 ]>
10459 <p>&c;</p>
10460 @@@test:domTree:
10461 document {
10462 document-type { }
10463 element {
10464 general-entity-reference {
10465 node-name: 'c';
10466 is-expanded: false;
10467 }
10468 }
10469 }
10470 @@XMLTest:
10471 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-2.test
10472 @@@DEnt:
10473 @@@@test:value:
10474 <!DOCTYPE p [
10475 <!ENTITY c "&entity;">
10476 <!ENTITY % para "<!-- -->">
10477 %para;
10478 ]>
10479 <p>&c;</p>
10480 @@@test:domTree:
10481 document {
10482 document-type { }
10483 element {
10484 general-entity-reference {
10485 node-name: 'c';
10486 is-expanded: true;
10487 general-entity-reference {
10488 node-name: 'entity';
10489 is-expanded: false;
10490 }
10491 }
10492 }
10493 }
10494 @@XMLTest:
10495 @@@QName:
10496 xp.reptxt.element.content.ger.entity.declared.standalone.-2.2.test
10497 @@@DEnt:
10498 @@@@test:value:
10499 <!DOCTYPE p [
10500 <!ENTITY % para "<!-- -->">
10501 %para;
10502 <!ENTITY c "&entity;">
10503 ]>
10504 <p>&c;</p>
10505 @@@test:domTree:
10506 document {
10507 document-type { }
10508 element {
10509 general-entity-reference {
10510 node-name: 'c';
10511 is-expanded: false;
10512 }
10513 }
10514 }
10515 @@XMLTest:
10516 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.4.test
10517 @@@DEnt:
10518 @@@@test:value:
10519 <?xml version="1.0" standalone="yes"?>
10520 <!DOCTYPE p [
10521 <!ENTITY % para SYSTEM "para">
10522 %para;
10523 <!ENTITY c "&entity;">
10524 ]>
10525 <p>&c;</p>
10526 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10527 @@XMLTest:
10528 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-3.test
10529 @@@DEnt:
10530 @@@@test:value:
10531 <?xml version="1.0" standalone="no"?>
10532 <!DOCTYPE p [
10533 <!ENTITY c "&entity;">
10534 <!ENTITY % para SYSTEM "para">
10535 %para;
10536 ]>
10537 <p>&c;</p>
10538 @@@test:domTree:
10539 document {
10540 document-type { }
10541 element {
10542 general-entity-reference {
10543 node-name: 'c';
10544 is-expanded: true;
10545 general-entity-reference {
10546 node-name: 'entity';
10547 is-expanded: false;
10548 }
10549 }
10550 }
10551 }
10552 @@XMLTest:
10553 @@@QName:
10554 xp.reptxt.element.content.ger.entity.declared.standalone.-3.2.test
10555 @@@DEnt:
10556 @@@@test:value:
10557 <?xml version="1.0" standalone="no"?>
10558 <!DOCTYPE p [
10559 <!ENTITY % para SYSTEM "para">
10560 %para;
10561 <!ENTITY c "&entity;">
10562 ]>
10563 <p>&c;</p>
10564 @@@test:domTree:
10565 document {
10566 document-type { }
10567 element {
10568 general-entity-reference {
10569 node-name: 'c';
10570 is-expanded: false;
10571 }
10572 }
10573 }
10574 @@XMLTest:
10575 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-4.test
10576 @@@DEnt:
10577 @@@@test:value:
10578 <!DOCTYPE p [
10579 <!ENTITY c "&entity;">
10580 <!ENTITY % para SYSTEM "para">
10581 %para;
10582 ]>
10583 <p>&c;</p>
10584 @@@test:domTree:
10585 document {
10586 document-type { }
10587 element {
10588 general-entity-reference {
10589 node-name: 'c';
10590 is-expanded: true;
10591 general-entity-reference {
10592 node-name: 'entity';
10593 is-expanded: false;
10594 }
10595 }
10596 }
10597 }
10598 @@XMLTest:
10599 @@@QName:
10600 xp.reptxt.element.content.ger.entity.declared.standalone.-4.2.test
10601 @@@DEnt:
10602 @@@@test:value:
10603 <!DOCTYPE p [
10604 <!ENTITY % para SYSTEM "para">
10605 %para;
10606 <!ENTITY c "&entity;">
10607 ]>
10608 <p>&c;</p>
10609 @@@test:domTree:
10610 document {
10611 document-type { }
10612 element {
10613 general-entity-reference {
10614 node-name: 'c';
10615 is-expanded: false;
10616 }
10617 }
10618 }
10619 @@XMLTest:
10620 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.5.test
10621 @@@DEnt:
10622 @@@@test:value:
10623 <?xml version="1.0" standalone="yes"?>
10624 <!DOCTYPE p SYSTEM "dtd" [
10625 <!ENTITY c "&entity;">
10626 ]>
10627 <p>&c;</p>
10628 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10629 @@XMLTest:
10630 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-5.test
10631 @@@DEnt:
10632 @@@@test:value:
10633 <?xml version="1.0" standalone="no"?>
10634 <!DOCTYPE p SYSTEM "dtd" [
10635 <!ENTITY c "&entity;">
10636 ]>
10637 <p>&c;</p>
10638 @@@test:domTree:
10639 document {
10640 document-type { }
10641 element {
10642 general-entity-reference {
10643 node-name: 'c';
10644 is-expanded: true;
10645 general-entity-reference {
10646 node-name: 'entity';
10647 is-expanded: false;
10648 }
10649 }
10650 }
10651 }
10652 @@XMLTest:
10653 @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-6.test
10654 @@@DEnt:
10655 @@@@test:value:
10656 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">]>
10657 <p>&c;</p>
10658 @@@test:domTree:
10659 document {
10660 document-type { }
10661 element {
10662 general-entity-reference {
10663 node-name: 'c';
10664 is-expanded: true;
10665 general-entity-reference {
10666 node-name: 'entity';
10667 is-expanded: false;
10668 }
10669 }
10670 }
10671 }
10672
10673 @@XMLTest:
10674 @@@QName: xp.attval.ger.entity.declared.nodtd.1.test
10675 @@@DEnt:
10676 @@@@test:value:
10677 <p a="&entity;"/>
10678 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 7)..(1, 14); }
10679 @@XMLTest:
10680 @@@QName: xp.attval.ger.entity.declared.nodtd.2.test
10681 @@@DEnt:
10682 @@@@test:value:
10683 <?xml version="1.0" standalone="yes"?>
10684 <p a="&entity;"/>
10685 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10686 @@XMLTest:
10687 @@@QName: xp.attval.ger.entity.declared.nodtd.3.test
10688 @@@DEnt:
10689 @@@@test:value:
10690 <?xml version="1.0" standalone="no"?>
10691 <p a="&entity;"/>
10692 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10693 @@XMLTest:
10694 @@@QName: xp.attval.ger.entity.declared.nodtd.-1.test
10695 @@@DEnt:
10696 @@@@test:value:
10697 <p a="&lt;&gt;&amp;&quot;&apos;"/>
10698 @@@test:domTree:
10699 document {
10700 element {
10701 attribute {
10702 node-name: 'a';
10703 text-content: '<>&"' U+0027;
10704 }
10705 }
10706 }
10707 @@XMLTest:
10708 @@@QName: xp.attval.ger.entity.declared.nopref.1.test
10709 @@@DEnt:
10710 @@@@test:value:
10711 <!DOCTYPE p []>
10712 <p a="&entity;"/>
10713 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10714 @@XMLTest:
10715 @@@QName: xp.attval.ger.entity.declared.nopref.2.test
10716 @@@DEnt:
10717 @@@@test:value:
10718 <!DOCTYPE p [
10719 <!ENTITY other "aa">
10720 <!ENTITY % another "aa">
10721 ]>
10722 <p a="&entity;"/>
10723 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 7)..(5, 14); }
10724 @@XMLTest:
10725 @@@QName: xp.attval.ger.entity.declared.nopref.3.test
10726 @@@DEnt:
10727 @@@@test:value:
10728 <?xml version="1.0" standalone="yes"?>
10729 <!DOCTYPE p []>
10730 <p a="&entity;"/>
10731 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10732 @@XMLTest:
10733 @@@QName: xp.attval.ger.entity.declared.nopref.4.test
10734 @@@DEnt:
10735 @@@@test:value:
10736 <?xml version="1.0" standalone="no"?>
10737 <!DOCTYPE p []>
10738 <p a="&entity;"/>
10739 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10740 @@XMLTest:
10741 @@@QName: xp.attval.ger.entity.declared.nopref.5.test
10742 @@@DEnt:
10743 @@@@test:value:
10744 <?xml version="1.0" standalone="yes"?>
10745 <!DOCTYPE p [
10746 <!ENTITY other "aa">
10747 <!ENTITY % another "aa">
10748 ]>
10749 <p a="&entity;"/>
10750 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10751 @@XMLTest:
10752 @@@QName: xp.attval.ger.entity.declared.nopref.6.test
10753 @@@DEnt:
10754 @@@@test:value:
10755 <?xml version="1.0" standalone="no"?>
10756 <!DOCTYPE p [
10757 <!ENTITY other "aa">
10758 <!ENTITY % another "aa">
10759 ]>
10760 <p a="&entity;"/>
10761 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10762 @@XMLTest:
10763 @@@QName: xp.attval.ger.entity.declared.nopref.-1.test
10764 @@@DEnt:
10765 @@@@test:value:
10766 <!DOCTYPE p [
10767 <!ENTITY entity "value">
10768 ]>
10769 <p a="&entity;"/>
10770 @@@test:domTree:
10771 document {
10772 document-type {
10773 general-entity {
10774 node-name: 'entity';
10775 text-content: 'value';
10776 }
10777 }
10778 element {
10779 attribute {
10780 node-name: 'a';
10781 general-entity-reference {
10782 node-name: 'entity';
10783 is-expanded: true;
10784 text-content: 'value';
10785 }
10786 }
10787 }
10788 }
10789 @@XMLTest:
10790 @@@QName: xp.attval.ger.entity.declared.nopref.-2.test
10791 @@@DEnt:
10792 @@@@test:value:
10793 <!DOCTYPE p [
10794 <!ENTITY entity "value">
10795 <!ENTITY another SYSTEM "another">
10796 ]>
10797 <p a="&entity;"/>
10798 @@@test:domTree:
10799 document {
10800 document-type {
10801 general-entity {
10802 node-name: 'entity';
10803 text-content: 'value';
10804 has-replacement-tree: true;
10805 }
10806 general-entity {
10807 node-name: 'another';
10808 public-id: null;
10809 system-id: 'another';
10810 has-replacement-tree: false;
10811 }
10812 }
10813 element {
10814 attribute {
10815 node-name: 'a';
10816 general-entity-reference {
10817 node-name: 'entity';
10818 is-expanded: true;
10819 text-content: 'value';
10820 }
10821 }
10822 }
10823 }
10824 @@XMLTest:
10825 @@@QName: xp.attval.ger.entity.declared.standalone.1.test
10826 @@@DEnt:
10827 @@@@test:value:
10828 <?xml version="1.0" standalone="yes"?>
10829 <p a="&entity;"/>
10830 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10831 @@XMLTest:
10832 @@@QName: xp.attval.ger.entity.declared.standalone.2.test
10833 @@@DEnt:
10834 @@@@test:value:
10835 <?xml version="1.0" standalone="yes"?>
10836 <!DOCTYPE p []>
10837 <p a="&entity;"/>
10838 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10839 @@XMLTest:
10840 @@@QName: xp.attval.ger.entity.declared.standalone.3.test
10841 @@@DEnt:
10842 @@@@test:value:
10843 <?xml version="1.0" standalone="yes"?>
10844 <!DOCTYPE p [
10845 <!ENTITY % para "<!-- -->">
10846 %para;
10847 ]>
10848 <p a="&entity;"/>
10849 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10850 @@XMLTest:
10851 @@@QName: xp.attval.ger.entity.declared.standalone.-1.test
10852 @@@DEnt:
10853 @@@@test:value:
10854 <?xml version="1.0" standalone="no"?>
10855 <!DOCTYPE p [
10856 <!ENTITY % para "<!-- -->">
10857 %para;
10858 ]>
10859 <p a="&entity;"/>
10860 @@@test:domTree:
10861 document {
10862 document-type { }
10863 element {
10864 attribute {
10865 node-name: 'a';
10866 general-entity-reference {
10867 is-expanded: false;
10868 }
10869 }
10870 }
10871 }
10872 @@XMLTest:
10873 @@@QName: xp.attval.ger.entity.declared.standalone.-2.test
10874 @@@DEnt:
10875 @@@@test:value:
10876 <!DOCTYPE p [
10877 <!ENTITY % para "<!-- -->">
10878 %para;
10879 ]>
10880 <p a="&entity;"/>
10881 @@@test:domTree:
10882 document {
10883 document-type { }
10884 element {
10885 attribute {
10886 node-name: 'a';
10887 general-entity-reference {
10888 is-expanded: false;
10889 }
10890 }
10891 }
10892 }
10893 @@XMLTest:
10894 @@@QName: xp.attval.ger.entity.declared.standalone.4.test
10895 @@@DEnt:
10896 @@@@test:value:
10897 <?xml version="1.0" standalone="yes"?>
10898 <!DOCTYPE p [
10899 <!ENTITY % para SYSTEM "para">
10900 %para;
10901 ]>
10902 <p a="&entity;"/>
10903 @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10904 @@XMLTest:
10905 @@@QName: xp.attval.ger.entity.declared.standalone.-3.test
10906 @@@DEnt:
10907 @@@@test:value:
10908 <?xml version="1.0" standalone="no"?>
10909 <!DOCTYPE p [
10910 <!ENTITY % para SYSTEM "para">
10911 %para;
10912 ]>
10913 <p a="&entity;"/>
10914 @@@test:domTree:
10915 document {
10916 document-type { }
10917 element {
10918 attribute {
10919 node-name: 'a';
10920 general-entity-reference {
10921 is-expanded: false;
10922 }
10923 }
10924 }
10925 }
10926 @@XMLTest:
10927 @@@QName: xp.attval.ger.entity.declared.standalone.-4.test
10928 @@@DEnt:
10929 @@@@test:value:
10930 <!DOCTYPE p [
10931 <!ENTITY % para SYSTEM "para">
10932 %para;
10933 ]>
10934 <p a="&entity;"/>
10935 @@@test:domTree:
10936 document {
10937 document-type { }
10938 element {
10939 attribute {
10940 node-name: 'a';
10941 general-entity-reference {
10942 is-expanded: false;
10943 }
10944 }
10945 }
10946 }
10947 @@XMLTest:
10948 @@@QName: xp.attval.ger.entity.declared.standalone.5.test
10949 @@@DEnt:
10950 @@@@test:value:
10951 <?xml version="1.0" standalone="yes"?>
10952 <!DOCTYPE p SYSTEM "dtd">
10953 <p a="&entity;"/>
10954 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10955 @@XMLTest:
10956 @@@QName: xp.attval.ger.entity.declared.standalone.-5.test
10957 @@@DEnt:
10958 @@@@test:value:
10959 <?xml version="1.0" standalone="no"?>
10960 <!DOCTYPE p SYSTEM "dtd">
10961 <p a="&entity;"/>
10962 @@@test:domTree:
10963 document {
10964 document-type { }
10965 element {
10966 attribute {
10967 node-name: 'a';
10968 general-entity-reference {
10969 is-expanded: false;
10970 }
10971 }
10972 }
10973 }
10974 @@XMLTest:
10975 @@@QName: xp.attval.ger.entity.declared.standalone.-6.test
10976 @@@DEnt:
10977 @@@@test:value:
10978 <!DOCTYPE p SYSTEM "dtd">
10979 <p a="&entity;"/>
10980 @@@test:domTree:
10981 document {
10982 document-type { }
10983 element {
10984 attribute {
10985 node-name: 'a';
10986 general-entity-reference {
10987 is-expanded: false;
10988 }
10989 }
10990 }
10991 }
10992
10993 @@XMLTest:
10994 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.1.test
10995 @@@DEnt:
10996 @@@@test:value:
10997 <!DOCTYPE p [
10998 <!ENTITY c "&entity;">
10999 ]>
11000 <p a="&c;"/>
11001 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11002 @@XMLTest:
11003 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.2.test
11004 @@@DEnt:
11005 @@@@test:value:
11006 <!DOCTYPE p [
11007 <!ENTITY other "aa">
11008 <!ENTITY % another "aa">
11009 <!ENTITY c "&entity;">
11010 ]>
11011 <p a="&c;"/>
11012 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11013 @@XMLTest:
11014 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.3.test
11015 @@@DEnt:
11016 @@@@test:value:
11017 <?xml version="1.0" standalone="yes"?>
11018 <!DOCTYPE p [
11019 <!ENTITY c "&entity;">
11020 ]>
11021 <p a="&c;"/>
11022 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11023 @@XMLTest:
11024 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.4.test
11025 @@@DEnt:
11026 @@@@test:value:
11027 <?xml version="1.0" standalone="no"?>
11028 <!DOCTYPE p [
11029 <!ENTITY c "&entity;">
11030 ]>
11031 <p a="&c;"/>
11032 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11033 @@XMLTest:
11034 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.5.test
11035 @@@DEnt:
11036 @@@@test:value:
11037 <?xml version="1.0" standalone="yes"?>
11038 <!DOCTYPE p [
11039 <!ENTITY other "aa">
11040 <!ENTITY % another "aa">
11041 <!ENTITY c "&entity;">
11042 ]>
11043 <p a="&c;"/>
11044 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11045 @@XMLTest:
11046 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.6.test
11047 @@@DEnt:
11048 @@@@test:value:
11049 <?xml version="1.0" standalone="no"?>
11050 <!DOCTYPE p [
11051 <!ENTITY other "aa">
11052 <!ENTITY % another "aa">
11053 <!ENTITY c "&entity;">
11054 ]>
11055 <p a="&c;"/>
11056 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11057 @@XMLTest:
11058 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.-1.test
11059 @@@DEnt:
11060 @@@@test:value:
11061 <!DOCTYPE p [
11062 <!ENTITY entity "value">
11063 <!ENTITY c "&entity;">
11064 ]>
11065 <p a="&c;"/>
11066 @@@test:domTree:
11067 document {
11068 document-type {
11069 general-entity {
11070 node-name: 'entity';
11071 text-content: 'value';
11072 }
11073 general-entity {
11074 node-name: 'c';
11075 general-entity-reference {
11076 node-name: 'entity';
11077 text-content: 'value';
11078 }
11079 }
11080 }
11081 element {
11082 attribute {
11083 node-name: 'a';
11084 general-entity-reference {
11085 node-name: 'c';
11086 general-entity-reference {
11087 node-name: 'entity';
11088 text-content: 'value';
11089 }
11090 }
11091 }
11092 }
11093 }
11094 @@XMLTest:
11095 @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.-2.test
11096 @@@DEnt:
11097 @@@@test:value:
11098 <!DOCTYPE p [
11099 <!ENTITY entity "value">
11100 <!ENTITY another SYSTEM "another">
11101 <!ENTITY c "&entity;">
11102 ]>
11103 <p a="&c;"/>
11104 @@@test:domTree:
11105 document {
11106 document-type {
11107 general-entity {
11108 node-name: 'entity';
11109 text-content: 'value';
11110 }
11111 general-entity {
11112 node-name: 'c';
11113 general-entity-reference {
11114 node-name: 'entity';
11115 text-content: 'value';
11116 }
11117 }
11118 general-entity {
11119 node-name: 'another';
11120 public-id: null;
11121 system-id: 'another';
11122 has-replacement-tree: false;
11123 }
11124 }
11125 element {
11126 attribute {
11127 node-name: 'a';
11128 general-entity-reference {
11129 node-name: 'c';
11130 general-entity-reference {
11131 node-name: 'entity';
11132 text-content: 'value';
11133 }
11134 }
11135 }
11136 }
11137 }
11138 @@XMLTest:
11139 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.2.test
11140 @@@DEnt:
11141 @@@@test:value:
11142 <?xml version="1.0" standalone="yes"?>
11143 <!DOCTYPE p [
11144 <!ENTITY c "&entity;">
11145 ]>
11146 <p a="&c;"/>
11147 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11148 @@XMLTest:
11149 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.3.test
11150 @@@DEnt:
11151 @@@@test:value:
11152 <?xml version="1.0" standalone="yes"?>
11153 <!DOCTYPE p [
11154 <!ENTITY % para "<!-- -->">
11155 %para;
11156 <!ENTITY c "&entity;">
11157 ]>
11158 <p a="&c;"/>
11159 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11160 @@XMLTest:
11161 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-1.test
11162 @@@DEnt:
11163 @@@@test:value:
11164 <?xml version="1.0" standalone="no"?>
11165 <!DOCTYPE p [
11166 <!ENTITY c "&entity;">
11167 <!ENTITY % para "<!-- -->">
11168 %para;
11169 ]>
11170 <p a="&c;"/>
11171 @@@test:domTree:
11172 document {
11173 document-type {
11174 general-entity {
11175 node-name: 'c';
11176 general-entity-reference {
11177 node-name: 'entity';
11178 is-expanded: false;
11179 }
11180 }
11181 }
11182 element {
11183 attribute {
11184 node-name: 'a';
11185 general-entity-reference {
11186 node-name: 'c';
11187 general-entity-reference {
11188 node-name: 'entity';
11189 is-expanded: false;
11190 }
11191 }
11192 }
11193 }
11194 }
11195 @@XMLTest:
11196 @@@QName:
11197 xp.reptxt.attval.ger.entity.declared.standalone.-1.2.test
11198 @@@DEnt:
11199 @@@@test:value:
11200 <?xml version="1.0" standalone="no"?>
11201 <!DOCTYPE p [
11202 <!ENTITY % para "<!-- -->">
11203 %para;
11204 <!ENTITY c "&entity;">
11205 ]>
11206 <p a="&c;"/>
11207 @@@test:domTree:
11208 document {
11209 document-type { }
11210 element {
11211 attribute {
11212 node-name: 'a';
11213 general-entity-reference {
11214 node-name: 'c';
11215 is-expanded: false;
11216 }
11217 }
11218 }
11219 }
11220 @@XMLTest:
11221 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-2.test
11222 @@@DEnt:
11223 @@@@test:value:
11224 <!DOCTYPE p [
11225 <!ENTITY c "&entity;">
11226 <!ENTITY % para "<!-- -->">
11227 %para;
11228 ]>
11229 <p a="&c;"/>
11230 @@@test:domTree:
11231 document {
11232 document-type { }
11233 element {
11234 attribute {
11235 node-name: 'a';
11236 general-entity-reference {
11237 node-name: 'c';
11238 is-expanded: true;
11239 general-entity-reference {
11240 node-name: 'entity';
11241 is-expanded: false;
11242 }
11243 }
11244 }
11245 }
11246 }
11247 @@XMLTest:
11248 @@@QName:
11249 xp.reptxt.attval.ger.entity.declared.standalone.-2.2.test
11250 @@@DEnt:
11251 @@@@test:value:
11252 <!DOCTYPE p [
11253 <!ENTITY % para "<!-- -->">
11254 %para;
11255 <!ENTITY c "&entity;">
11256 ]>
11257 <p a="&c;"/>
11258 @@@test:domTree:
11259 document {
11260 document-type { }
11261 element {
11262 attribute {
11263 node-name: 'a';
11264 general-entity-reference {
11265 node-name: 'c';
11266 is-expanded: false;
11267 }
11268 }
11269 }
11270 }
11271 @@XMLTest:
11272 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.4.test
11273 @@@DEnt:
11274 @@@@test:value:
11275 <?xml version="1.0" standalone="yes"?>
11276 <!DOCTYPE p [
11277 <!ENTITY % para SYSTEM "para">
11278 %para;
11279 <!ENTITY c "&entity;">
11280 ]>
11281 <p a="&c;"/>
11282 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11283 @@XMLTest:
11284 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-3.test
11285 @@@DEnt:
11286 @@@@test:value:
11287 <?xml version="1.0" standalone="no"?>
11288 <!DOCTYPE p [
11289 <!ENTITY c "&entity;">
11290 <!ENTITY % para SYSTEM "para">
11291 %para;
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: true;
11303 general-entity-reference {
11304 node-name: 'entity';
11305 is-expanded: false;
11306 }
11307 }
11308 }
11309 }
11310 }
11311 @@XMLTest:
11312 @@@QName:
11313 xp.reptxt.attval.ger.entity.declared.standalone.-3.2.test
11314 @@@DEnt:
11315 @@@@test:value:
11316 <?xml version="1.0" standalone="no"?>
11317 <!DOCTYPE p [
11318 <!ENTITY % para SYSTEM "para">
11319 %para;
11320 <!ENTITY c "&entity;">
11321 ]>
11322 <p a="&c;"/>
11323 @@@test:domTree:
11324 document {
11325 document-type { }
11326 element {
11327 attribute {
11328 node-name: 'a';
11329 general-entity-reference {
11330 node-name: 'c';
11331 is-expanded: false;
11332 }
11333 }
11334 }
11335 }
11336 @@XMLTest:
11337 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-4.test
11338 @@@DEnt:
11339 @@@@test:value:
11340 <!DOCTYPE p [
11341 <!ENTITY c "&entity;">
11342 <!ENTITY % para SYSTEM "para">
11343 %para;
11344 ]>
11345 <p a="&c;"/>
11346 @@@test:domTree:
11347 document {
11348 document-type { }
11349 element {
11350 attribute {
11351 node-name: 'a';
11352 general-entity-reference {
11353 node-name: 'c';
11354 is-expanded: true;
11355 general-entity-reference {
11356 node-name: 'entity';
11357 is-expanded: false;
11358 }
11359 }
11360 }
11361 }
11362 }
11363 @@XMLTest:
11364 @@@QName:
11365 xp.reptxt.attval.ger.entity.declared.standalone.-4.2.test
11366 @@@DEnt:
11367 @@@@test:value:
11368 <!DOCTYPE p [
11369 <!ENTITY % para SYSTEM "para">
11370 %para;
11371 <!ENTITY c "&entity;">
11372 ]>
11373 <p a="&c;"/>
11374 @@@test:domTree:
11375 document {
11376 document-type { }
11377 element {
11378 attribute {
11379 node-name: 'a';
11380 general-entity-reference {
11381 node-name: 'c';
11382 is-expanded: false;
11383 }
11384 }
11385 }
11386 }
11387 @@XMLTest:
11388 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.5.test
11389 @@@DEnt:
11390 @@@@test:value:
11391 <?xml version="1.0" standalone="yes"?>
11392 <!DOCTYPE p SYSTEM "dtd" [
11393 <!ENTITY c "&entity;">
11394 ]>
11395 <p a="&c;"/>
11396 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11397 @@XMLTest:
11398 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-5.test
11399 @@@DEnt:
11400 @@@@test:value:
11401 <?xml version="1.0" standalone="no"?>
11402 <!DOCTYPE p SYSTEM "dtd" [
11403 <!ENTITY c "&entity;">
11404 ]>
11405 <p a="&c;"/>
11406 @@@test:domTree:
11407 document {
11408 document-type { }
11409 element {
11410 attribute {
11411 node-name: 'a';
11412 general-entity-reference {
11413 node-name: 'c';
11414 is-expanded: true;
11415 general-entity-reference {
11416 node-name: 'entity';
11417 is-expanded: false;
11418 }
11419 }
11420 }
11421 }
11422 }
11423 @@XMLTest:
11424 @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-6.test
11425 @@@DEnt:
11426 @@@@test:value:
11427 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">]>
11428 <p a="&c;"/>
11429 @@@test:domTree:
11430 document {
11431 document-type { }
11432 element {
11433 attribute {
11434 node-name: 'a';
11435 general-entity-reference {
11436 node-name: 'c';
11437 is-expanded: true;
11438 general-entity-reference {
11439 node-name: 'entity';
11440 is-expanded: false;
11441 }
11442 }
11443 }
11444 }
11445 }
11446
11447 @@XMLTest:
11448 @@@QName: xp.attlist.dup.entity.declared.1.test
11449 @@@DEnt:
11450 @@@@test:value:
11451 <!DOCTYPE p [
11452 <!ATTLIST p a CDATA "no-entity">
11453 <!ATTLIST p a CDATA "&entity;">
11454 ]>
11455 <p/>
11456 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 21)..(3, 29); }
11457 @@XMLTest:
11458 @@@QName: xp.attlist.dup.entity.declared.2.test
11459 @@@DEnt:
11460 @@@@test:value:
11461 <!DOCTYPE p [
11462 <!ATTLIST p a CDATA "no-entity"
11463 a CDATA "&entity;">
11464 ]>
11465 <p/>
11466 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 21)..(3, 29); }
11467 @@XMLTest:
11468 @@@QName: xp.attlist.unused.entity.declared.1.test
11469 @@@DEnt:
11470 @@@@test:value:
11471 <!DOCTYPE p [
11472 <!ATTLIST q a CDATA "&entity;">
11473 ]>
11474 <p/>
11475 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 21)..(2, 29); }
11476 @@XMLTest:
11477 @@@QName: xp.attlist.unused.entity.declared.2.test
11478 @@@DEnt:
11479 @@@@test:value:
11480 <!DOCTYPE p [
11481 <!ATTLIST p a CDATA "&entity;">
11482 ]>
11483 <p a="bb"/>
11484 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 21)..(2, 29); }
11485
11486 @@XMLTest:
11487 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.1.test
11488 @@@DEnt:
11489 @@@@test:value:
11490 <!DOCTYPE p [
11491 <!ENTITY c "&entity;">
11492 <!ATTLIST p a CDATA "&c;">
11493 ]>
11494 <p/>
11495 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11496 @@XMLTest:
11497 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.2.test
11498 @@@DEnt:
11499 @@@@test:value:
11500 <!DOCTYPE p [
11501 <!ENTITY other "aa">
11502 <!ENTITY % another "aa">
11503 <!ENTITY c "&entity;">
11504 <!ATTLIST p a CDATA "&c;">
11505 ]>
11506 <p/>
11507 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11508 @@XMLTest:
11509 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.3.test
11510 @@@DEnt:
11511 @@@@test:value:
11512 <?xml version="1.0" standalone="yes"?>
11513 <!DOCTYPE p [
11514 <!ENTITY c "&entity;">
11515 <!ATTLIST p a CDATA "&c;">
11516 ]>
11517 <p/>
11518 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11519 @@XMLTest:
11520 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.4.test
11521 @@@DEnt:
11522 @@@@test:value:
11523 <?xml version="1.0" standalone="no"?>
11524 <!DOCTYPE p [
11525 <!ENTITY c "&entity;">
11526 <!ATTLIST p a CDATA "&c;">
11527 ]>
11528 <p/>
11529 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11530 @@XMLTest:
11531 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.5.test
11532 @@@DEnt:
11533 @@@@test:value:
11534 <?xml version="1.0" standalone="yes"?>
11535 <!DOCTYPE p [
11536 <!ENTITY other "aa">
11537 <!ENTITY % another "aa">
11538 <!ENTITY c "&entity;">
11539 <!ATTLIST p a CDATA "&c;">
11540 ]>
11541 <p/>
11542 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11543 @@XMLTest:
11544 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.6.test
11545 @@@DEnt:
11546 @@@@test:value:
11547 <?xml version="1.0" standalone="no"?>
11548 <!DOCTYPE p [
11549 <!ENTITY other "aa">
11550 <!ENTITY % another "aa">
11551 <!ENTITY c "&entity;">
11552 <!ATTLIST p a CDATA "&c;">
11553 ]>
11554 <p/>
11555 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11556 @@XMLTest:
11557 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.-1.test
11558 @@@DEnt:
11559 @@@@test:value:
11560 <!DOCTYPE p [
11561 <!ENTITY entity "value">
11562 <!ENTITY c "&entity;">
11563 <!ATTLIST p a CDATA "&c;">
11564 ]>
11565 <p/>
11566 @@@test:domTree:
11567 document {
11568 document-type {
11569 general-entity {
11570 node-name: 'entity';
11571 text-content: 'value';
11572 }
11573 general-entity {
11574 node-name: 'c';
11575 general-entity-reference {
11576 node-name: 'entity';
11577 is-expanded: true;
11578 text-content: 'value';
11579 }
11580 }
11581 element-type-definition {
11582 node-name: 'p';
11583 attribute-definition {
11584 node-name: 'a';
11585 general-entity-reference {
11586 node-name: 'c';
11587 is-expanded: true;
11588 general-entity-reference {
11589 node-name: 'entity';
11590 is-expanded: true;
11591 text-content: 'value';
11592 }
11593 }
11594 }
11595 }
11596 }
11597 element {
11598 attribute {
11599 node-name: 'a';
11600 specified: false;
11601 general-entity-reference {
11602 node-name: 'c';
11603 general-entity-reference {
11604 node-name: 'entity';
11605 text-content: 'value';
11606 }
11607 }
11608 }
11609 }
11610 }
11611 @@XMLTest:
11612 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.-2.test
11613 @@@DEnt:
11614 @@@@test:value:
11615 <!DOCTYPE p [
11616 <!ENTITY entity "value">
11617 <!ENTITY another SYSTEM "another">
11618 <!ENTITY c "&entity;">
11619 <!ATTLIST p a CDATA "&c;">
11620 ]>
11621 <p/>
11622 @@@test:domTree:
11623 document {
11624 document-type {
11625 general-entity {
11626 node-name: 'entity';
11627 text-content: 'value';
11628 }
11629 general-entity {
11630 node-name: 'c';
11631 general-entity-reference {
11632 node-name: 'entity';
11633 text-content: 'value';
11634 }
11635 }
11636 general-entity {
11637 node-name: 'another';
11638 public-id: null;
11639 system-id: 'another';
11640 has-replacement-tree: false;
11641 }
11642 element-type-definition {
11643 node-name: 'p';
11644 attribute-definition {
11645 node-name: 'a';
11646 general-entity-reference {
11647 node-name: 'c';
11648 is-expanded: true;
11649 general-entity-reference {
11650 node-name: 'entity';
11651 is-expanded: true;
11652 text-content: 'value';
11653 }
11654 }
11655 }
11656 }
11657 }
11658 element {
11659 attribute {
11660 node-name: 'a';
11661 specified: false;
11662 general-entity-reference {
11663 node-name: 'c';
11664 general-entity-reference {
11665 node-name: 'entity';
11666 text-content: 'value';
11667 }
11668 }
11669 }
11670 }
11671 }
11672 @@XMLTest:
11673 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.2.test
11674 @@@DEnt:
11675 @@@@test:value:
11676 <?xml version="1.0" standalone="yes"?>
11677 <!DOCTYPE p [
11678 <!ENTITY c "&entity;">
11679 <!ATTLIST p a CDATA "&c;">
11680 ]>
11681 <p/>
11682 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11683 @@XMLTest:
11684 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.3.test
11685 @@@DEnt:
11686 @@@@test:value:
11687 <?xml version="1.0" standalone="yes"?>
11688 <!DOCTYPE p [
11689 <!ENTITY % para "<!-- -->">
11690 %para;
11691 <!ENTITY c "&entity;">
11692 <!ATTLIST p a CDATA "&c;">
11693 ]>
11694 <p/>
11695 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11696 @@XMLTest:
11697 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-1.test
11698 @@@DEnt:
11699 @@@@test:value:
11700 <?xml version="1.0" standalone="no"?>
11701 <!DOCTYPE p [
11702 <!ENTITY c "&entity;">
11703 <!ATTLIST p a CDATA "&c;">
11704 <!ENTITY % para "<!-- -->">
11705 %para;
11706 ]>
11707 <p/>
11708 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11709 @@XMLTest:
11710 @@@QName:
11711 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-1.2.test
11712 @@@DEnt:
11713 @@@@test:value:
11714 <?xml version="1.0" standalone="no"?>
11715 <!DOCTYPE p [
11716 <!ENTITY % para "<!-- -->">
11717 %para;
11718 <!ENTITY c "&entity;">
11719 <!ATTLIST p a CDATA "&c;">
11720 ]>
11721 <p g="h"/>
11722 @@@test:domTree:
11723 document {
11724 document-type { }
11725 element {
11726 attribute {
11727 node-name: 'g';
11728 text-content: 'h';
11729 }
11730 }
11731 }
11732 @@XMLTest:
11733 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-2.test
11734 @@@DEnt:
11735 @@@@test:value:
11736 <!DOCTYPE p [
11737 <!ENTITY c "&entity;">
11738 <!ATTLIST p a CDATA "&c;">
11739 <!ENTITY % para "<!-- -->">
11740 %para;
11741 ]>
11742 <p/>
11743 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11744 @@XMLTest:
11745 @@@QName:
11746 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-2.2.test
11747 @@@DEnt:
11748 @@@@test:value:
11749 <!DOCTYPE p [
11750 <!ENTITY % para "<!-- -->">
11751 %para;
11752 <!ENTITY c "&entity;">
11753 <!ATTLIST p a CDATA "&c;">
11754 ]>
11755 <p g="h"/>
11756 @@@test:domTree:
11757 document {
11758 document-type { }
11759 element {
11760 attribute {
11761 node-name: 'g';
11762 text-content: 'h';
11763 }
11764 }
11765 }
11766 @@XMLTest:
11767 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.4.test
11768 @@@DEnt:
11769 @@@@test:value:
11770 <?xml version="1.0" standalone="yes"?>
11771 <!DOCTYPE p [
11772 <!ENTITY % para SYSTEM "para">
11773 %para;
11774 <!ENTITY c "&entity;">
11775 <!ATTLIST p a CDATA "&c;">
11776 ]>
11777 <p/>
11778 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11779 @@XMLTest:
11780 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-3.test
11781 @@@DEnt:
11782 @@@@test:value:
11783 <?xml version="1.0" standalone="no"?>
11784 <!DOCTYPE p [
11785 <!ENTITY c "&entity;">
11786 <!ATTLIST p a CDATA "&c;">
11787 <!ENTITY % para SYSTEM "para">
11788 %para;
11789 ]>
11790 <p/>
11791 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11792 @@XMLTest:
11793 @@@QName:
11794 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-3.2.test
11795 @@@DEnt:
11796 @@@@test:value:
11797 <?xml version="1.0" standalone="no"?>
11798 <!DOCTYPE p [
11799 <!ENTITY % para SYSTEM "para">
11800 %para;
11801 <!ENTITY c "&entity;">
11802 <!ATTLIST p a CDATA "&c;">
11803 ]>
11804 <p g="h"/>
11805 @@@test:domTree:
11806 document {
11807 document-type { }
11808 element {
11809 attribute {
11810 node-name: 'g';
11811 text-content: 'h';
11812 }
11813 }
11814 }
11815 @@XMLTest:
11816 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-4.test
11817 @@@DEnt:
11818 @@@@test:value:
11819 <!DOCTYPE p [
11820 <!ENTITY c "&entity;">
11821 <!ATTLIST p a CDATA "&c;">
11822 <!ENTITY % para SYSTEM "para">
11823 %para;
11824 ]>
11825 <p/>
11826 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11827 @@XMLTest:
11828 @@@QName:
11829 xp.reptxt.attlist.attval.ger.entity.declared.standalone.-4.2.test
11830 @@@DEnt:
11831 @@@@test:value:
11832 <!DOCTYPE p [
11833 <!ENTITY % para SYSTEM "para">
11834 %para;
11835 <!ENTITY c "&entity;">
11836 <!ATTLIST p a CDATA "&c;">
11837 ]>
11838 <p g="h"/>
11839 @@@test:domTree:
11840 document {
11841 document-type { }
11842 element {
11843 attribute {
11844 node-name: 'g';
11845 text-content: 'h';
11846 }
11847 }
11848 }
11849 @@XMLTest:
11850 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.5.test
11851 @@@DEnt:
11852 @@@@test:value:
11853 <?xml version="1.0" standalone="yes"?>
11854 <!DOCTYPE p SYSTEM "dtd" [
11855 <!ENTITY c "&entity;">
11856 <!ATTLIST p a CDATA "&c;">
11857 ]>
11858 <p/>
11859 @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11860 @@XMLTest:
11861 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-5.test
11862 @@@DEnt:
11863 @@@@test:value:
11864 <?xml version="1.0" standalone="no"?>
11865 <!DOCTYPE p SYSTEM "dtd" [
11866 <!ENTITY c "&entity;">
11867 <!ATTLIST p a CDATA "&c;">
11868 ]>
11869 <p/>
11870 @@@test:domTree:
11871 document {
11872 document-type { }
11873 element {
11874 attribute {
11875 node-name: 'a';
11876 specified: false;
11877 general-entity-reference {
11878 node-name: 'c';
11879 is-expanded: true;
11880 general-entity-reference {
11881 node-name: 'entity';
11882 is-expanded: false;
11883 }
11884 }
11885 }
11886 }
11887 }
11888 @@XMLTest:
11889 @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-6.test
11890 @@@DEnt:
11891 @@@@test:value:
11892 <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">
11893 <!ATTLIST p a CDATA "&c;">
11894 ]>
11895 <p/>
11896 @@@test:domTree:
11897 document {
11898 document-type { }
11899 element {
11900 attribute {
11901 node-name: 'a';
11902 specified: false;
11903 general-entity-reference {
11904 node-name: 'c';
11905 is-expanded: true;
11906 general-entity-reference {
11907 node-name: 'entity';
11908 is-expanded: false;
11909 }
11910 }
11911 }
11912 }
11913 }
11914
11915 @@XMLTest:
11916 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.1.test
11917 @@@DEnt:
11918 @@@@test:value:
11919 <!DOCTYPE p [
11920 <!ATTLIST p a CDATA "&entity;">
11921 ]>
11922 <p/>
11923 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
11924 @@XMLTest:
11925 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.2.test
11926 @@@DEnt:
11927 @@@@test:value:
11928 <!DOCTYPE p [
11929 <!ENTITY other "aa">
11930 <!ENTITY % another "aa">
11931 <!ATTLIST p a CDATA "&entity;">
11932 ]>
11933 <p/>
11934 @@@c:erred: <[[xp|wf-entity-declared]]> { (4, 22)..(4, 29); }
11935 @@XMLTest:
11936 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.3.test
11937 @@@DEnt:
11938 @@@@test:value:
11939 <?xml version="1.0" standalone="yes"?>
11940 <!DOCTYPE p [
11941 <!ATTLIST p a CDATA "&entity;">
11942 ]>
11943 <p/>
11944 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11945 @@XMLTest:
11946 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.4.test
11947 @@@DEnt:
11948 @@@@test:value:
11949 <?xml version="1.0" standalone="no"?>
11950 <!DOCTYPE p [
11951 <!ATTLIST p a CDATA "&entity;">
11952 ]>
11953 <p/>
11954 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11955 @@XMLTest:
11956 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.5.test
11957 @@@DEnt:
11958 @@@@test:value:
11959 <?xml version="1.0" standalone="yes"?>
11960 <!DOCTYPE p [
11961 <!ENTITY other "aa">
11962 <!ENTITY % another "aa">
11963 <!ATTLIST p a CDATA "&entity;">
11964 ]>
11965 <p/>
11966 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
11967 @@XMLTest:
11968 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.6.test
11969 @@@DEnt:
11970 @@@@test:value:
11971 <?xml version="1.0" standalone="no"?>
11972 <!DOCTYPE p [
11973 <!ENTITY other "aa">
11974 <!ENTITY % another "aa">
11975 <!ATTLIST p a CDATA "&entity;">
11976 ]>
11977 <p/>
11978 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
11979 @@XMLTest:
11980 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-1.test
11981 @@@DEnt:
11982 @@@@test:value:
11983 <!DOCTYPE p [
11984 <!ENTITY entity "value">
11985 <!ATTLIST p a CDATA "&entity;">
11986 ]>
11987 <p/>
11988 @@@test:domTree:
11989 document {
11990 document-type {
11991 general-entity {
11992 node-name: 'entity';
11993 text-content: 'value';
11994 }
11995 element-type-definition {
11996 node-name: 'p';
11997 attribute-definition {
11998 node-name: 'a';
11999 general-entity-reference {
12000 node-name: 'entity';
12001 is-expanded: true;
12002 text-content: 'value';
12003 }
12004 }
12005 }
12006 }
12007 element {
12008 attribute {
12009 node-name: 'a';
12010 specified: false;
12011 general-entity-reference {
12012 node-name: 'entity';
12013 is-expanded: true;
12014 text-content: 'value';
12015 }
12016 }
12017 }
12018 }
12019 @@XMLTest:
12020 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-1.2.test
12021 @@@DEnt:
12022 @@@@test:value:
12023 <!DOCTYPE p [
12024 <!ATTLIST p a CDATA "&entity;">
12025 <!ENTITY entity "value">
12026 ]>
12027 <p/>
12028 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12029 @@XMLTest:
12030 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-2.test
12031 @@@DEnt:
12032 @@@@test:value:
12033 <!DOCTYPE p [
12034 <!ENTITY entity "value">
12035 <!ENTITY another SYSTEM "another">
12036 <!ATTLIST p a CDATA "&entity;">
12037 ]>
12038 <p/>
12039 @@@test:domTree:
12040 document {
12041 document-type {
12042 element-type-definition {
12043 node-name: 'p';
12044 attribute-definition {
12045 node-name: 'a';
12046 general-entity-reference {
12047 node-name: 'entity';
12048 is-expanded: true;
12049 text-content: 'value';
12050 }
12051 }
12052 }
12053 general-entity {
12054 node-name: 'entity';
12055 text-content: 'value';
12056 has-replacement-tree: true;
12057 }
12058 general-entity {
12059 node-name: 'another';
12060 public-id: null;
12061 system-id: 'another';
12062 has-replacement-tree: false;
12063 }
12064 }
12065 element {
12066 attribute {
12067 node-name: 'a';
12068 specified: false;
12069 general-entity-reference {
12070 node-name: 'entity';
12071 is-expanded: true;
12072 text-content: 'value';
12073 }
12074 }
12075 }
12076 }
12077 @@XMLTest:
12078 @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-2.2.test
12079 @@@DEnt:
12080 @@@@test:value:
12081 <!DOCTYPE p [
12082 <!ATTLIST p a CDATA "&entity;">
12083 <!ENTITY entity "value">
12084 <!ENTITY another SYSTEM "another">
12085 ]>
12086 <p/>
12087 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12088 @@XMLTest:
12089 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.2.test
12090 @@@DEnt:
12091 @@@@test:value:
12092 <?xml version="1.0" standalone="yes"?>
12093 <!DOCTYPE p [
12094 <!ATTLIST p a CDATA "&entity;">
12095 ]>
12096 <p/>
12097 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12098 @@XMLTest:
12099 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.3.test
12100 @@@DEnt:
12101 @@@@test:value:
12102 <?xml version="1.0" standalone="yes"?>
12103 <!DOCTYPE p [
12104 <!ATTLIST p a CDATA "&entity;">
12105 <!ENTITY % para "<!-- -->">
12106 %para;
12107 ]>
12108 <p/>
12109 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12110 @@XMLTest:
12111 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.3.2.test
12112 @@@DEnt:
12113 @@@@test:value:
12114 <?xml version="1.0" standalone="yes"?>
12115 <!DOCTYPE p [
12116 <!ENTITY % para "<!-- -->">
12117 %para;
12118 <!ATTLIST p a CDATA "&entity;">
12119 ]>
12120 <p/>
12121 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
12122 @@@enImplNote:
12123 The <XML::ATTLIST> declaration is processed since
12124 it is a <XA::standalone> document.
12125 @@XMLTest:
12126 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-1.test
12127 @@@DEnt:
12128 @@@@test:value:
12129 <?xml version="1.0" standalone="no"?>
12130 <!DOCTYPE p [
12131 <!ATTLIST p a CDATA "&entity;">
12132 <!ENTITY % para "<!-- -->">
12133 %para;
12134 ]>
12135 <p/>
12136 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12137 @@XMLTest:
12138 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-1.2.test
12139 @@@DEnt:
12140 @@@@test:value:
12141 <?xml version="1.0" standalone="no"?>
12142 <!DOCTYPE p [
12143 <!ATTLIST p b CDATA #IMPLIED>
12144 <!ENTITY % para "<!-- -->">
12145 %para;
12146 <!ATTLIST p a CDATA "&entity;">
12147 ]>
12148 <p c="d"/>
12149 @@@c:erred:
12150 <[[xp|warning-attribute-definition-not-processed]]> { (6, 13)..(6, 30); }
12151 @@@test:domTree:
12152 document {
12153 document-type {
12154 element-type-definition {
12155 node-name: 'p';
12156 attribute-definition {
12157 node-name: 'b';
12158 }
12159 }
12160 }
12161 element {
12162 attribute {
12163 node-name: 'c';
12164 text-content: 'd';
12165 }
12166 }
12167 }
12168 @@@enImplNote:
12169 The second <XML::ATTLIST> declaration is read but not processed
12170 and its <XML::&entity;> general entity reference violates
12171 entity declared validty constraint rather than well-formedness
12172 constraint.
12173 @@XMLTest:
12174 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-2.test
12175 @@@DEnt:
12176 @@@@test:value:
12177 <!DOCTYPE p [
12178 <!ATTLIST p a CDATA "&entity;">
12179 <!ENTITY % para "<!-- -->">
12180 %para;
12181 ]>
12182 <p/>
12183 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12184 @@XMLTest:
12185 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-2.2.test
12186 @@@DEnt:
12187 @@@@test:value:
12188 <!DOCTYPE p [
12189 <!ATTLIST p b CDATA #IMPLIED>
12190 <!ENTITY % para "<!-- -->">
12191 %para;
12192 <!ATTLIST p a CDATA "&entity;">
12193 ]>
12194 <p c="d"/>
12195 @@@c:erred:
12196 <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 30); }
12197 @@@test:domTree:
12198 document {
12199 document-type {
12200 element-type-definition {
12201 node-name: 'p';
12202 attribute-definition {
12203 node-name: 'b';
12204 }
12205 }
12206 }
12207 element {
12208 attribute {
12209 node-name: 'c';
12210 text-content: 'd';
12211 }
12212 }
12213 }
12214 @@XMLTest:
12215 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.4.test
12216 @@@DEnt:
12217 @@@@test:value:
12218 <?xml version="1.0" standalone="yes"?>
12219 <!DOCTYPE p [
12220 <!ATTLIST p a CDATA "&entity;">
12221 <!ENTITY % para SYSTEM "p">
12222 %para;
12223 ]>
12224 <p/>
12225 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12226 @@XMLTest:
12227 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.4.2.test
12228 @@@DEnt:
12229 @@@@test:value:
12230 <?xml version="1.0" standalone="yes"?>
12231 <!DOCTYPE p [
12232 <!ENTITY % para SYSTEM "p">
12233 %para;
12234 <!ATTLIST p a CDATA "&entity;">
12235 ]>
12236 <p/>
12237 @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
12238 @@@enImplNote:
12239 The <XML::ATTLIST> declaration is processed since
12240 it is a <XA::standalone> document.
12241 @@XMLTest:
12242 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-3.test
12243 @@@DEnt:
12244 @@@@test:value:
12245 <?xml version="1.0" standalone="no"?>
12246 <!DOCTYPE p [
12247 <!ATTLIST p a CDATA "&entity;">
12248 <!ENTITY % para SYSTEM "p">
12249 %para;
12250 ]>
12251 <p/>
12252 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12253 @@@enImplNote:
12254 Is this well-formed? It has a parameter entity reference,
12255 therefore, it does not violates Entity Declared WFC, isn't it?
12256
12257 Note that Firefox 1.5 and Opera 9 TP1 reports that this document has a
12258 fatal error (also note that they does not support unexpanded).
12259
12260 See also:
12261 <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>
12262 @@XMLTest:
12263 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-3.2.test
12264 @@@DEnt:
12265 @@@@test:value:
12266 <?xml version="1.0" standalone="no"?>
12267 <!DOCTYPE p [
12268 <!ATTLIST p b CDATA #IMPLIED>
12269 <!ENTITY % para SYSTEM "p">
12270 %para;
12271 <!ATTLIST p a CDATA "&entity;">
12272 ]>
12273 <p c="d"/>
12274 @@@c:erred:
12275 <[[xp|warning-attribute-definition-not-processed]]> { (6, 13)..(6, 30); }
12276 @@@test:domTree:
12277 document {
12278 document-type {
12279 element-type-definition {
12280 node-name: 'p';
12281 attribute-definition {
12282 node-name: 'b';
12283 }
12284 }
12285 }
12286 element {
12287 attribute {
12288 node-name: 'c';
12289 text-content: 'd';
12290 }
12291 }
12292 }
12293 @@@enImplNote:
12294 The second <XML::ATTLIST> declaration is read but not processed
12295 and its <XML::&entity;> general entity reference violates
12296 entity declared validty constraint rather than well-formedness
12297 constraint.
12298 @@XMLTest:
12299 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-4.test
12300 @@@DEnt:
12301 @@@@test:value:
12302 <!DOCTYPE p [
12303 <!ATTLIST p a CDATA "&entity;">
12304 <!ENTITY % para SYSTEM "p">
12305 %para;
12306 ]>
12307 <p/>
12308 @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12309 @@XMLTest:
12310 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-4.2.test
12311 @@@DEnt:
12312 @@@@test:value:
12313 <!DOCTYPE p [
12314 <!ATTLIST p b CDATA #IMPLIED>
12315 <!ENTITY % para SYSTEM "p">
12316 %para;
12317 <!ATTLIST p a CDATA "&entity;">
12318 ]>
12319 <p c="d"/>
12320 @@@c:erred:
12321 <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 30); }
12322 @@@test:domTree:
12323 document {
12324 document-type {
12325 element-type-definition {
12326 node-name: 'p';
12327 attribute-definition {
12328 node-name: 'b';
12329 }
12330 }
12331 }
12332 element {
12333 attribute {
12334 node-name: 'c';
12335 text-content: 'd';
12336 }
12337 }
12338 }
12339 @@XMLTest:
12340 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.5.test
12341 @@@DEnt:
12342 @@@@test:value:
12343 <?xml version="1.0" standalone="yes"?>
12344 <!DOCTYPE p SYSTEM "dtd" [
12345 <!ATTLIST p a CDATA "&entity;">
12346 ]>
12347 <p/>
12348 @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12349 @@@enImplNote:
12350 This document has an error - result is implementation dependent.
12351 @@XMLTest:
12352 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-5.test
12353 @@@DEnt:
12354 @@@@test:value:
12355 <?xml version="1.0" standalone="no"?>
12356 <!DOCTYPE p SYSTEM "dtd" [
12357 <!ATTLIST p a CDATA "&entity;">
12358 ]>
12359 <p/>
12360 @@@test:domTree:
12361 document {
12362 document-type {
12363 element-type-definition {
12364 node-name: 'p';
12365 attribute-definition {
12366 node-name: 'a';
12367 general-entity-reference {
12368 node-name: 'entity';
12369 is-expanded: false;
12370 }
12371 }
12372 }
12373 }
12374 element {
12375 attribute {
12376 node-name: 'a';
12377 specified: false;
12378 general-entity-reference {
12379 node-name: 'entity';
12380 is-expanded: false;
12381 }
12382 }
12383 }
12384 }
12385 @@@enImplNote:
12386 This document has an error - result is implementation dependent.
12387 @@XMLTest:
12388 @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-6.test
12389 @@@DEnt:
12390 @@@@test:value:
12391 <!DOCTYPE p SYSTEM "dtd" [
12392 <!ATTLIST p a CDATA "&entity;">
12393 ]>
12394 <p/>
12395 @@@test:domTree:
12396 document {
12397 document-type {
12398 element-type-definition {
12399 node-name: 'p';
12400 attribute-definition {
12401 node-name: 'a';
12402 general-entity-reference {
12403 node-name: 'entity';
12404 is-expanded: false;
12405 }
12406 }
12407 }
12408 }
12409 element {
12410 attribute {
12411 node-name: 'a';
12412 specified: false;
12413 general-entity-reference {
12414 node-name: 'entity';
12415 is-expanded: false;
12416 }
12417 }
12418 }
12419 }
12420 @@@enImplNote:
12421 This document has an error - result is implementation dependent.
12422
12423 @@enImplNote:
12424 {TODO:: Entity declared WFC for
12425
12426 - General entity references in entity value??
12427
12428 }
12429
12430 @@XMLTest:
12431 @@@QName: xp.element.content.parsed.entity.reference.test
12432 @@@DEnt:
12433 @@@@test:value:
12434 <!DOCTYPE p [
12435 <!NOTATION n SYSTEM "notation">
12436 <!ENTITY ext SYSTEM "system" NDATA n>
12437 ]>
12438 <p>&ext;</p>
12439 @@@c:erred: <[[xp|wf-parsed-entity]]> { (5, 4)..(5, 8); }
12440 @@XMLTest:
12441 @@@QName: xp.attval.parsed.entity.reference.test
12442 @@@DEnt:
12443 @@@@test:value:
12444 <!DOCTYPE p [
12445 <!NOTATION n SYSTEM "notation">
12446 <!ENTITY ext SYSTEM "system" NDATA n>
12447 ]>
12448 <p a="&ext;"/>
12449 # @@@c:erred: <[[xp|wf-parsed-entity]]> { (5, 7)..(5, 11); }
12450 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (5, 7)..(5, 11); }
12451 @@XMLTest:
12452 @@@QName: xp.element.content.reptxt.parsed.entity.reference.test
12453 @@@DEnt:
12454 @@@@test:value:
12455 <!DOCTYPE p [
12456 <!NOTATION n SYSTEM "notation">
12457 <!ENTITY ext SYSTEM "system" NDATA n>
12458 <!ENTITY c "&#x26;ext;">
12459 ]>
12460 <p>&c;</p>
12461 @@@c:erred: <[[xp|wf-parsed-entity]]> { (1, 1)..(1, 5); }
12462 @@XMLTest:
12463 @@@QName: xp.attval.reptxt.parsed.entity.reference.test
12464 @@@DEnt:
12465 @@@@test:value:
12466 <!DOCTYPE p [
12467 <!NOTATION n SYSTEM "notation">
12468 <!ENTITY ext SYSTEM "system" NDATA n>
12469 <!ENTITY c "&#x26;ext;">
12470 ]>
12471 <p a="&c;"/>
12472 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 1)..(1, 5); }
12473 @@@c:erred:
12474 @@@@@: <[[xp|wf-parsed-entity]]> { }
12475 @@@@enImplNote: During entity node construction.
12476 @@XMLTest:
12477 @@@QName: xp.element.content.entval.parsed.entity.reference.test
12478 @@@DEnt:
12479 @@@@test:value:
12480 <!DOCTYPE p [
12481 <!NOTATION n SYSTEM "notation">
12482 <!ENTITY ext SYSTEM "system" NDATA n>
12483 <!ENTITY c "&ext;">
12484 ]>
12485 <p>&c;</p>
12486 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
12487 @@XMLTest:
12488 @@@QName: xp.attval.entval.parsed.entity.reference.test
12489 @@@DEnt:
12490 @@@@test:value:
12491 <!DOCTYPE p [
12492 <!NOTATION n SYSTEM "notation">
12493 <!ENTITY ext SYSTEM "system" NDATA n>
12494 <!ENTITY c "&ext;">
12495 ]>
12496 <p a="&c;"/>
12497 @@@c:erred: <[[xp|wf-no-external-entity-references]]> { }
12498 @@@c:erred: <[[xp|wf-parsed-entity]]> { }
12499
12500 @@XMLTest:
12501 @@@QName: xp.element.content.no.recursion.direct.test
12502 @@@DEnt:
12503 @@@@test:value:
12504 <!DOCTYPE p [
12505 <!ENTITY c "&c;">
12506 ]>
12507 <p>&c;</p>
12508 @@@c:erred: <[[xp|wf-no-recursion]]> { (1, 1)..(1, 3); }
12509 @@XMLTest:
12510 @@@QName: xp.element.content.no.recursion.indirect.test
12511 @@@DEnt:
12512 @@@@test:value:
12513 <!DOCTYPE p [
12514 <!ENTITY d "&c;">
12515 <!ENTITY c "&d;">
12516 ]>
12517 <p>&c;</p>
12518 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12519 @@XMLTest:
12520 @@@QName: xp.attval.no.recursion.direct.test
12521 @@@DEnt:
12522 @@@@test:value:
12523 <!DOCTYPE p [
12524 <!ENTITY c "&c;">
12525 ]>
12526 <p a="&c;"/>
12527 @@@c:erred: <[[xp|wf-no-recursion]]> { (1, 1)..(1, 3); }
12528 @@XMLTest:
12529 @@@QName: xp.attval.no.recursion.indirect.test
12530 @@@DEnt:
12531 @@@@test:value:
12532 <!DOCTYPE p [
12533 <!ENTITY d "&c;">
12534 <!ENTITY c "&d;">
12535 ]>
12536 <p a="&c;"/>
12537 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12538 @@XMLTest:
12539 @@@QName: xp.reptxt.element.content.no.recursion.direct.test
12540 @@@DEnt:
12541 @@@@test:value:
12542 <!DOCTYPE p [
12543 <!ENTITY c "&c;">
12544 <!ENTITY e "&#x26;c;">
12545 ]>
12546 <p>&e;</p>
12547 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |e| */ (1, 1)..(1, 3); }
12548 @@XMLTest:
12549 @@@QName: xp.reptxt.element.content.no.recursion.indirect.test
12550 @@@DEnt:
12551 @@@@test:value:
12552 <!DOCTYPE p [
12553 <!ENTITY d "&c;">
12554 <!ENTITY c "&d;">
12555 <!ENTITY e "&#x26;c;">
12556 ]>
12557 <p>&e;</p>
12558 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12559 @@XMLTest:
12560 @@@QName: xp.reptxt.attval.no.recursion.direct.test
12561 @@@DEnt:
12562 @@@@test:value:
12563 <!DOCTYPE p [
12564 <!ENTITY c "&c;">
12565 <!ENTITY e "&#x26;c;">
12566 ]>
12567 <p a="&e;"/>
12568 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |e| */ (1, 1)..(1, 3); }
12569 @@XMLTest:
12570 @@@QName: xp.reptxt.attval.no.recursion.indirect.test
12571 @@@DEnt:
12572 @@@@test:value:
12573 <!DOCTYPE p [
12574 <!ENTITY d "&c;">
12575 <!ENTITY c "&d;">
12576 <!ENTITY e "&#x26;c;">
12577 ]>
12578 <p a="&e;"/>
12579 @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12580
12581 @@XMLTest:
12582 @@@QName: xp.ENTITY.system.ndata.name.test
12583 @@@DEnt:
12584 @@@@test:value:
12585 <!DOCTYPE a [
12586 <!NOTATION n SYSTEM "n">
12587 <!ENTITY % e SYSTEM "sys" NDATA n>
12588 ]><a/>
12589 @@@c:erred: <[[xp|wf-syntax-error]]> { (3, 26)..(3, 30); }
12590 @@XMLTest:
12591 @@@QName: xp.ENTITY.public.ndata.name.test
12592 @@@DEnt:
12593 @@@@test:value:
12594 <!DOCTYPE a [
12595 <!NOTATION n SYSTEM "n">
12596 <!ENTITY % e PUBLIC "pub" "sys" NDATA n>
12597 ]><a/>
12598 @@@c:erred: <[[xp|wf-syntax-error]]> { (3, 33)..(3, 37); }
12599 @@XMLTest:
12600 @@@QName: xp.ENTITY.public.ndata.name.-1.test
12601 @@@DEnt:
12602 @@@@test:value:
12603 <!DOCTYPE a [
12604 <!NOTATION n SYSTEM "n">
12605 <!ENTITY % e PUBLIC "pub" "sys" >
12606 ]><a/>
12607 @@@test:domTree:
12608 document { }
12609
12610 @@XMLTest:
12611 @@@QName: xp.ENTITY.pubid.1.test
12612 @@@DEnt:
12613 @@@@test:value:
12614 <!DOCTYPE a [
12615 <!ENTITY e PUBLIC "p" "s">
12616 ]><a/>
12617 @@@test:domTree:
12618 document {
12619 document-type {
12620 general-entity {
12621 node-name: 'e';
12622 public-id: 'p';
12623 system-id: 's';
12624 }
12625 }
12626 element { }
12627 }
12628 @@XMLTest:
12629 @@@QName: xp.ENTITY.pubid.2.test
12630 @@@DEnt:
12631 @@@@test:value:
12632 <!DOCTYPE a [
12633 <!ENTITY e PUBLIC " p " "s">
12634 ]><a/>
12635 @@@test:domTree:
12636 document {
12637 document-type {
12638 general-entity {
12639 node-name: 'e';
12640 public-id: 'p';
12641 system-id: 's';
12642 }
12643 }
12644 element { }
12645 }
12646 @@XMLTest:
12647 @@@QName: xp.ENTITY.pubid.3.test
12648 @@@DEnt:
12649 @@@@test:value:
12650 <!DOCTYPE a [
12651 <!ENTITY e PUBLIC " p $u000Aq$u000A " "s">
12652 ]><a/>
12653 @@@test:domTree:
12654 document {
12655 document-type {
12656 general-entity {
12657 node-name: 'e';
12658 public-id: 'p q';
12659 system-id: 's';
12660 }
12661 }
12662 element { }
12663 }
12664 @@XMLTest:
12665 @@@QName: xp.ENTITY.pubid.4.test
12666 @@@DEnt:
12667 @@@@test:value:
12668 <!DOCTYPE a [
12669 <!ENTITY e PUBLIC " p $u000D$u000Aq" "s">
12670 ]><a/>
12671 @@@test:domTree:
12672 document {
12673 document-type {
12674 general-entity {
12675 node-name: 'e';
12676 public-id: 'p q';
12677 system-id: 's';
12678 }
12679 }
12680 element { }
12681 }
12682 @@XMLTest:
12683 @@@QName: xp.ENTITY.pubid.5.test
12684 @@@DEnt:
12685 @@@@test:value:
12686 <?xml version="1.1"?>
12687 <!DOCTYPE a [
12688 <!ENTITY e PUBLIC " p $u000D$u0085q" "s">
12689 ]><a/>
12690 @@@test:domTree:
12691 document {
12692 document-type {
12693 general-entity {
12694 node-name: 'e';
12695 public-id: 'p q';
12696 system-id: 's';
12697 }
12698 }
12699 element { }
12700 }
12701
12702 @@XMLTest:
12703 @@@QName: xp.ENTITY.ignored.test
12704 @@@DEnt:
12705 @@@@test:value:
12706 <!DOCTYPE a [
12707 <!ENTITY e "a">
12708 <!ENTITY e "b">
12709 ]><a/>
12710 @@@test:domTree:
12711 document {
12712 document-type {
12713 general-entity {
12714 node-name: 'e';
12715 text-content: 'a';
12716 }
12717 }
12718 element { }
12719 }
12720 @@@c:erred:
12721 <[[xp|warning-entity-declaration-ignored]]> { (3, 1)..(3, 15); }
12722 @@XMLTest:
12723 @@@QName: xp.ENTITY.ignored.2.test
12724 @@@DEnt:
12725 @@@@test:value:
12726 <!DOCTYPE a [
12727 <!ENTITY % e "a">
12728 <!ENTITY % e "b">
12729 ]><a/>
12730 @@@test:domTree:
12731 document { }
12732 @@@c:erred:
12733 <[[xp|warning-entity-declaration-ignored]]> { (3, 1)..(3, 17); }
12734
12735 @@XMLTest:
12736 @@@QName: xp.ENTITY.predefined.1.test
12737 @@@DEnt:
12738 @@@@test:value:
12739 <!DOCTYPE a [
12740 <!ENTITY lt "&#38;#60;">
12741 <!ENTITY gt "&#62;">
12742 <!ENTITY amp "&#38;#38;">
12743 <!ENTITY apos "&#39;">
12744 <!ENTITY quot "&#34;">
12745 <!ENTITY e "f">
12746 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12747 @@@test:domTree:
12748 document {
12749 document-type {
12750 general-entity {
12751 node-name: 'e';
12752 text-content: 'f';
12753 }
12754 }
12755 element {
12756 text-content: '<>&' U+0027 '"';
12757 }
12758 }
12759 @@XMLTest:
12760 @@@QName: xp.ENTITY.predefined.2.test
12761 @@@DEnt:
12762 @@@@test:value:
12763 <!DOCTYPE a [
12764 <!ENTITY lt "&#38;#60;">
12765 <!ENTITY gt "&#x26;#62;">
12766 <!ENTITY amp "&#38;#38;">
12767 <!ENTITY apos "&#x26;#39;">
12768 <!ENTITY quot "&#x26;#34;">
12769 <!ENTITY e "f">
12770 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12771 @@@test:domTree:
12772 document {
12773 document-type {
12774 general-entity {
12775 node-name: 'e';
12776 text-content: 'f';
12777 }
12778 }
12779 element {
12780 text-content: '<>&' U+0027 '"';
12781 }
12782 }
12783 @@XMLTest:
12784 @@@QName: xp.ENTITY.predefined.3.test
12785 @@@DEnt:
12786 @@@@test:value:
12787 <!DOCTYPE a [
12788 <!ENTITY lt "&#60;">
12789 <!ENTITY gt "&#62;">
12790 <!ENTITY amp "&#38;">
12791 <!ENTITY apos "&#39;">
12792 <!ENTITY quot "&#34;">
12793 <!ENTITY e "f">
12794 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12795 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (2, 1)..(2, 24); }
12796 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (4, 1)..(4, 24); }
12797 @@@test:domTree:
12798 document {
12799 document-type {
12800 general-entity {
12801 node-name: 'e';
12802 text-content: 'f';
12803 }
12804 }
12805 element {
12806 text-content: '<>&' U+0027 '"';
12807 }
12808 }
12809 @@XMLTest:
12810 @@@QName: xp.ENTITY.predefined.4.test
12811 @@@DEnt:
12812 @@@@test:value:
12813 <!DOCTYPE a [
12814 <!ENTITY lt "1">
12815 <!ENTITY gt "2">
12816 <!ENTITY amp "3">
12817 <!ENTITY apos "4">
12818 <!ENTITY quot "5">
12819 <!ENTITY e "f">
12820 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12821 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (2, 1)..(2, 24); }
12822 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (3, 1)..(3, 24); }
12823 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (4, 1)..(4, 24); }
12824 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (5, 1)..(5, 24); }
12825 @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (6, 1)..(6, 24); }
12826 @@@test:domTree:
12827 document {
12828 document-type {
12829 general-entity {
12830 node-name: 'e';
12831 text-content: 'f';
12832 }
12833 }
12834 element {
12835 text-content: '<>&' U+0027 '"';
12836 }
12837 }
12838 @@XMLTest:
12839 @@@QName: xp.ENTITY.predefined.5.test
12840 @@@DEnt:
12841 @@@@test:value:
12842 <!DOCTYPE a [
12843 <!ENTITY lt SYSTEM "1">
12844 <!ENTITY gt SYSTEM "2">
12845 <!ENTITY amp SYSTEM "3">
12846 <!ENTITY apos SYSTEM "4">
12847 <!ENTITY quot SYSTEM "5">
12848 <!ENTITY e "f">
12849 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12850 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (2, 1)..(2, 27); }
12851 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (3, 1)..(3, 27); }
12852 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (4, 1)..(4, 27); }
12853 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (5, 1)..(5, 27); }
12854 @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (6, 1)..(6, 27); }
12855 @@@test:domTree:
12856 document {
12857 document-type {
12858 general-entity {
12859 node-name: 'e';
12860 text-content: 'f';
12861 }
12862 }
12863 element {
12864 text-content: '<>&' U+0027 '"';
12865 }
12866 }
12867 @@XMLTest:
12868 @@@QName: xp.ENTITY.predefined.6.test
12869 @@@DEnt:
12870 @@@@test:value:
12871 <!DOCTYPE a [
12872 <!ENTITY % lt SYSTEM "1">
12873 <!ENTITY % gt SYSTEM "2">
12874 <!ENTITY % amp SYSTEM "3">
12875 <!ENTITY % apos SYSTEM "4">
12876 <!ENTITY % quot SYSTEM "5">
12877 <!ENTITY e "f">
12878 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12879 @@@test:domTree:
12880 document {
12881 document-type {
12882 general-entity {
12883 node-name: 'e';
12884 text-content: 'f';
12885 }
12886 }
12887 element {
12888 text-content: '<>&' U+0027 '"';
12889 }
12890 }
12891 @@XMLTest:
12892 @@@QName: xp.ENTITY.predefined.7.test
12893 @@@DEnt:
12894 @@@@test:value:
12895 <!DOCTYPE a [
12896 <!ENTITY lt "&#38;#x3C;">
12897 <!ENTITY gt "&#x3E;">
12898 <!ENTITY amp "&#38;#x26;">
12899 <!ENTITY apos "&#x27;">
12900 <!ENTITY quot "&#x22;">
12901 <!ENTITY e "f">
12902 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12903 @@@test:domTree:
12904 document {
12905 document-type {
12906 general-entity {
12907 node-name: 'e';
12908 text-content: 'f';
12909 }
12910 }
12911 element {
12912 text-content: '<>&' U+0027 '"';
12913 }
12914 }
12915 @@XMLTest:
12916 @@@QName: xp.ENTITY.predefined.8.test
12917 @@@DEnt:
12918 @@@@test:value:
12919 <!DOCTYPE a [
12920 <!ENTITY lt "&#38;#x3c;">
12921 <!ENTITY gt "&#x3e;">
12922 <!ENTITY amp "&#38;#x26;">
12923 <!ENTITY apos "&#x27;">
12924 <!ENTITY quot "&#x22;">
12925 <!ENTITY e "f">
12926 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12927 @@@test:domTree:
12928 document {
12929 document-type {
12930 general-entity {
12931 node-name: 'e';
12932 text-content: 'f';
12933 }
12934 }
12935 element {
12936 text-content: '<>&' U+0027 '"';
12937 }
12938 }
12939 @@XMLTest:
12940 @@@QName: xp.ENTITY.predefined.9.test
12941 @@@DEnt:
12942 @@@@test:value:
12943 <!DOCTYPE a [
12944 <!ENTITY lt "&#38;#x00003C;">
12945 <!ENTITY gt "&#x0003E;">
12946 <!ENTITY amp "&#38;#x026;">
12947 <!ENTITY apos "&#x000027;">
12948 <!ENTITY quot "&#x0022;">
12949 <!ENTITY e "f">
12950 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12951 @@@test:domTree:
12952 document {
12953 document-type {
12954 general-entity {
12955 node-name: 'e';
12956 text-content: 'f';
12957 }
12958 }
12959 element {
12960 text-content: '<>&' U+0027 '"';
12961 }
12962 }
12963 @@XMLTest:
12964 @@@QName: xp.ENTITY.predefined.10.test
12965 @@@DEnt:
12966 @@@@test:value:
12967 <!DOCTYPE a [
12968 <!ENTITY lt "&#38;#00060;">
12969 <!ENTITY gt "&#062;">
12970 <!ENTITY amp "&#38;#000038;">
12971 <!ENTITY apos "&#0000039;">
12972 <!ENTITY quot "&#0034;">
12973 <!ENTITY e "f">
12974 ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12975 @@@test:domTree:
12976 document {
12977 document-type {
12978 general-entity {
12979 node-name: 'e';
12980 text-content: 'f';
12981 }
12982 }
12983 element {
12984 text-content: '<>&' U+0027 '"';
12985 }
12986 }
12987
12988 @@XMLTest:
12989 @@@QName: xp.processed.1.test
12990 @@@DEnt:
12991 @@@@test:value:
12992 <a/>
12993 @@@test:domTree:
12994 document {
12995 all-declarations-processed: true;
12996 element { }
12997 }
12998 @@XMLTest:
12999 @@@QName: xp.processed.2.test
13000 @@@DEnt:
13001 @@@@test:value:
13002 <!DOCTYPE a [
13003 <!ENTITY e "f">
13004 <!ATTLIST a b NMTOKEN " c ">
13005 ]><a>&e;</a>
13006 @@@test:domTree:
13007 document {
13008 document-type {
13009 general-entity {
13010 node-name: 'e';
13011 }
13012 element-type-definition {
13013 node-name: 'a';
13014 attribute-definition {
13015 node-name: 'b';
13016 }
13017 }
13018 }
13019 all-declarations-processed: true;
13020 element {
13021 attribute {
13022 node-name: 'b';
13023 node-value: 'c';
13024 }
13025 text-content: 'f';
13026 }
13027 }
13028 @@XMLTest:
13029 @@@QName: xp.processed.3.test
13030 @@@DEnt:
13031 @@@@test:value:
13032 <!DOCTYPE a [
13033 <!ENTITY % p SYSTEM "p">
13034 %p;
13035 <!ENTITY e "f">
13036 <!ATTLIST a b NMTOKEN " c ">
13037 ]><a d="e">&e;</a>
13038 @@@test:domTree:
13039 document {
13040 document-type { }
13041 all-declarations-processed: false;
13042 element {
13043 attribute {
13044 node-name: 'd';
13045 node-value: 'e';
13046 }
13047 general-entity-reference {
13048 node-name: 'e';
13049 is-expanded: false;
13050 }
13051 }
13052 }
13053 @@@c:erred:
13054 <[[xp|warning-entity-declaration-not-processed]]> { (4, 1)..(4, 20); }
13055 @@@c:erred:
13056 <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 31); }
13057 @@XMLTest:
13058 @@@QName: xp.processed.4.test
13059 @@@DEnt:
13060 @@@@test:value:
13061 <?xml version="1.1" standalone="yes"?>
13062 <!DOCTYPE a [
13063 <!ENTITY % p SYSTEM "p">
13064 %p;
13065 <!ENTITY e "f">
13066 <!ATTLIST a b NMTOKEN " c ">
13067 ]><a>&e;</a>
13068 @@@test:domTree:
13069 document {
13070 document-type {
13071 general-entity {
13072 node-name: 'e';
13073 }
13074 element-type-definition {
13075 node-name: 'a';
13076 attribute-definition {
13077 node-name: 'b';
13078 }
13079 }
13080 }
13081 all-declarations-processed: false;
13082 element {
13083 attribute {
13084 node-name: 'b';
13085 node-value: 'c';
13086 }
13087 text-content: 'f';
13088 }
13089 }
13090 @@XMLTest:
13091 @@@QName: xp.processed.5.test
13092 @@@DEnt:
13093 @@@@test:value:
13094 <!DOCTYPE a SYSTEM "p" [
13095 <!ENTITY e "f">
13096 <!ATTLIST a b NMTOKEN " c ">
13097 ]><a>&e;</a>
13098 @@@test:domTree:
13099 document {
13100 document-type {
13101 general-entity {
13102 node-name: 'e';
13103 }
13104 element-type-definition {
13105 node-name: 'a';
13106 attribute-definition {
13107 node-name: 'b';
13108 }
13109 }
13110 }
13111 all-declarations-processed: false;
13112 element {
13113 attribute {
13114 node-name: 'b';
13115 node-value: 'c';
13116 }
13117 text-content: 'f';
13118 }
13119 }
13120
13121 @@XMLTest:
13122 @@@QName: xp.PEs.in.internal.subset.1.test
13123 @@@DEnt:
13124 @@@@test:value:
13125 <!DOCTYPE a [
13126 <!ENTITY % p " ">
13127 <!ENTITY % q "%p;">
13128 ]><a/>
13129 @@@c:erred: <[[xp|wf-pes-in-internal-subset]]> { (3, 15)..(3, 17); }
13130 @@XMLTest:
13131 @@@QName: xp.PEs.in.internal.subset.2.test
13132 @@@DEnt:
13133 @@@@test:value:
13134 <!DOCTYPE a [
13135 <!ENTITY % p " ">
13136 <!ENTITY % q '%p;'>
13137 ]><a/>
13138 @@@c:erred: <[[xp|wf-pes-in-internal-subset]]> { (3, 15)..(3, 17); }
13139
13140 @@XMLTest:
13141 @@@QName: xp.name.pitarget.content.1.0.2.test
13142 @@@DEnt:
13143 @@@@test:value:
13144 <?xml version="1.0"?>
13145 <p>
13146 <?$u3001$u3002?>
13147 </p>
13148 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13149 @@XMLTest:
13150 @@@QName: xp.name.pitarget.content.1.1.2.test
13151 @@@DEnt:
13152 @@@@test:value:
13153 <?xml version="1.1"?>
13154 <p>$
13155 <?$u3001$u3002?>$
13156 </p>
13157 @@@test:domTree:
13158 document {
13159 xml-version: '1.1';
13160 element {
13161 pi {
13162 node-name: U+3001 U+3002;
13163 }
13164 }
13165 }
13166 @@XMLTest:
13167 @@@QName: xp.name.pitarget.content.1.0.3.test
13168 @@@DEnt:
13169 @@@@test:value:
13170 <?xml version="1.0"?>
13171 <p>
13172 <?$u3005b?>
13173 </p>
13174 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13175 @@XMLTest:
13176 @@@QName: xp.name.pitarget.content.1.1.3.test
13177 @@@DEnt:
13178 @@@@test:value:
13179 <?xml version="1.1"?>
13180 <p>$
13181 <?$u3005b?>$
13182 </p>
13183 @@@test:domTree:
13184 document {
13185 xml-version: '1.1';
13186 element {
13187 pi {
13188 node-name: U+3005 'b';
13189 }
13190 }
13191 }
13192 @@XMLTest:
13193 @@@QName: xp.name.pitarget.content.names.1.0.1.test
13194 @@@DEnt:
13195 @@@@test:value:
13196 <?xml version="1.0"?>
13197 <p>
13198 <?a:b?>
13199 </p>
13200 @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13201 @@XMLTest:
13202 @@@QName: xp.name.pitarget.content.names.1.1.1.test
13203 @@@DEnt:
13204 @@@@test:value:
13205 <?xml version="1.1"?>
13206 <p>
13207 <?a:b?>
13208 </p>
13209 @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13210 @@XMLTest:
13211 @@@QName: xp.name.pitarget.intsubset.1.0.2.test
13212 @@@DEnt:
13213 @@@@test:value:
13214 <?xml version="1.0"?>
13215 <!DOCTYPE p [
13216 <?$u3001$u3002?>
13217 ]><p/>
13218 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13219 @@XMLTest:
13220 @@@QName: xp.name.pitarget.intsubset.1.1.2.test
13221 @@@DEnt:
13222 @@@@test:value:
13223 <?xml version="1.1"?>
13224 <!DOCTYPE p [
13225 <?$u3001$u3002?>
13226 ]><p/>
13227 @@@test:domTree:
13228 document {
13229 xml-version: '1.1';
13230 document-type {
13231 pi {
13232 node-name: U+3001 U+3002;
13233 }
13234 }
13235 element { }
13236 }
13237 @@XMLTest:
13238 @@@QName: xp.name.pitarget.intsubset.1.0.3.test
13239 @@@DEnt:
13240 @@@@test:value:
13241 <?xml version="1.0"?>
13242 <!DOCTYPE p [
13243 <?$u3005b?>
13244 ]><p/>
13245 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13246 @@XMLTest:
13247 @@@QName: xp.name.pitarget.intsubset.1.1.3.test
13248 @@@DEnt:
13249 @@@@test:value:
13250 <?xml version="1.1"?>
13251 <!DOCTYPE p [
13252 <?$u3005b?>
13253 ]><p/>
13254 @@@test:domTree:
13255 document {
13256 xml-version: '1.1';
13257 document-type {
13258 pi {
13259 node-name: U+3005 'b';
13260 }
13261 }
13262 element { }
13263 }
13264 @@XMLTest:
13265 @@@QName: xp.name.pitarget.intsubset.names.1.0.1.test
13266 @@@DEnt:
13267 @@@@test:value:
13268 <?xml version="1.0"?>
13269 <!DOCTYPE p [
13270 <?a:b?>
13271 ]><p/>
13272 @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13273 @@XMLTest:
13274 @@@QName: xp.name.pitarget.intsubset.names.1.1.1.test
13275 @@@DEnt:
13276 @@@@test:value:
13277 <?xml version="1.1"?>
13278 <!DOCTYPE p [
13279 <?a:b?>
13280 ]><p/>
13281 @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13282 @@XMLTest:
13283 @@@QName: xp.name.doctypedecl.stag.etag.1.0.2.test
13284 @@@DEnt:
13285 @@@@test:value:
13286 <?xml version="1.0"?>
13287 <!DOCTYPE $u3001$u3002>
13288 <$u3001$u3002>
13289 </$u3001$u3002>
13290 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 11)..(2, 12); }
13291 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 2)..(3, 3); }
13292 # @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 3)..(4, 4); }
13293 @@XMLTest:
13294 @@@QName: xp.name.doctypedecl.stag.etag.1.1.2.test
13295 @@@DEnt:
13296 @@@@test:value:
13297 <?xml version="1.1"?>
13298 <!DOCTYPE $u3001$u3002>
13299 <$u3001$u3002>
13300 </$u3001$u3002>
13301 @@@test:domTree:
13302 document {
13303 xml-version: '1.1';
13304 document-type {
13305 node-name: U+3001 U+3002;
13306 }
13307 element {
13308 node-name: U+3001 U+3002;
13309 }
13310 }
13311 @@XMLTest:
13312 @@@QName: xp.name.doctypedecl.stag.etag.1.0.3.test
13313 @@@DEnt:
13314 @@@@test:value:
13315 <?xml version="1.0"?>
13316 <!DOCTYPE $u3005b>
13317 <$u3005b>
13318 </$u3005b>
13319 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 11)..(2, 12); }
13320 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 2)..(3, 3); }
13321 # @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 3)..(4, 4); }
13322 @@XMLTest:
13323 @@@QName: xp.name.doctype.decl.stag.etag.1.1.3.test
13324 @@@DEnt:
13325 @@@@test:value:
13326 <?xml version="1.1"?>
13327 <!DOCTYPE $u3005b>
13328 <$u3005b>
13329 </$u3005b>
13330 @@@test:domTree:
13331 document {
13332 xml-version: '1.1';
13333 document-type {
13334 node-name: U+3005 'b';
13335 }
13336 element {
13337 node-name: U+3005 'b';
13338 }
13339 }
13340 @@XMLTest:
13341 @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.1.test
13342 @@@DEnt:
13343 @@@@test:value:
13344 <?xml version="1.0"?>
13345 <!DOCTYPE a:b>
13346 <a:b xmlns:a="http://a.example/">
13347 </a:b>
13348 @@@test:domTree:
13349 document {
13350 xml-version: '1.0';
13351 document-type {
13352 node-name: 'a:b';
13353 }
13354 element {
13355 prefix: 'a';
13356 local-name: 'b';
13357 namespace-uri: 'http://a.example/';
13358 attribute {
13359 namespace-uri: 'http://www.w3.org/2000/xmlns/';
13360 prefix: 'xmlns';
13361 local-name: 'a';
13362 value: 'http://a.example/';
13363 specified: true;
13364 }
13365 }
13366 }
13367 @@XMLTest:
13368 @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.1.test
13369 @@@DEnt:
13370 @@@@test:value:
13371 <?xml version="1.1"?>
13372 <!DOCTYPE a:b>
13373 <a:b xmlns:a="http://a.example/">
13374 </a:b>
13375 @@@test:domTree:
13376 document {
13377 xml-version: '1.1';
13378 document-type {
13379 node-name: 'a:b';
13380 }
13381 element {
13382 prefix: 'a';
13383 local-name: 'b';
13384 namespace-uri: 'http://a.example/';
13385 attribute {
13386 namespace-uri: 'http://www.w3.org/2000/xmlns/';
13387 prefix: 'xmlns';
13388 local-name: 'a';
13389 specified: true;
13390 }
13391 }
13392 }
13393 @@XMLTest:
13394 @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.2.test
13395 @@@DEnt:
13396 @@@@test:value:
13397 <?xml version="1.0"?>
13398 <!DOCTYPE :ab>
13399 <:ab>
13400 </:ab>
13401 @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13402 @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13403 @@@c:erred: <[[xp|nsc-prefix-declared]]> { /* prefix || */ }
13404 @@XMLTest:
13405 @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.2.test
13406 @@@DEnt:
13407 @@@@test:value:
13408 <?xml version="1.1"?>
13409 <!DOCTYPE :ab>
13410 <:ab>
13411 </:ab>
13412 @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13413 @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13414 @@@c:erred: <[[xp|nsc-prefix-declared]]> { /* prefix || */ }
13415 @@XMLTest:
13416 @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.3.test
13417 @@@DEnt:
13418 @@@@test:value:
13419 <?xml version="1.0"?>
13420 <!DOCTYPE a:$u3005>
13421 <a:$u3005 xmlns:a="http://a.example/">
13422 </a:$u3005>
13423 @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13424 @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13425 @@XMLTest:
13426 @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.3.test
13427 @@@DEnt:
13428 @@@@test:value:
13429 <?xml version="1.1"?>
13430 <!DOCTYPE a:$u3005>
13431 <a:$u3005 xmlns:a="http://a.example/">
13432 </a:$u3005>
13433 @@@test:domTree:
13434 document {
13435 xml-version: '1.1';
13436 document-type {
13437 node-name: 'a:' U+3005;
13438 }
13439 element {
13440 prefix: 'a';
13441 local-name: U+3005;
13442 namespace-uri: 'http://a.example/';
13443 attribute {
13444 namespace-uri: 'http://www.w3.org/2000/xmlns/';
13445 prefix: 'xmlns';
13446 local-name: 'a';
13447 value: 'http://a.example/';
13448 specified: true;
13449 }
13450 }
13451 }
13452 @@XMLTest:
13453 @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.4.test
13454 @@@DEnt:
13455 @@@@test:value:
13456 <?xml version="1.0"?>
13457 <!DOCTYPE a:b>
13458 <a:b>
13459 </a:b>
13460 @@@c:erred: <[[xp|nsc-prefix-declared]]> { (3, 1)..(3, 5); }
13461 @@XMLTest:
13462 @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.4.test
13463 @@@DEnt:
13464 @@@@test:value:
13465 <?xml version="1.1"?>
13466 <!DOCTYPE a:b>
13467 <a:b>
13468 </a:b>
13469 @@@c:erred: <[[xp|nsc-prefix-declared]]> { (3, 1)..(3, 5); }
13470 @@XMLTest:
13471 @@@QName: xp.name.emptyelemtag.1.0.2.test
13472 @@@DEnt:
13473 @@@@test:value:
13474 <?xml version="1.0"?>
13475 <$u3001$u3002/>
13476 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 2)..(2, 3); }
13477 @@XMLTest:
13478 @@@QName: xp.name.emptyelemtag.1.1.2.test
13479 @@@DEnt:
13480 @@@@test:value:
13481 <?xml version="1.1"?>
13482 <$u3001$u3002/>
13483 @@@test:domTree:
13484 document {
13485 xml-version: '1.1';
13486 element {
13487 node-name: U+3001 U+3002;
13488 }
13489 }
13490 @@XMLTest:
13491 @@@QName: xp.name.emptyelemtag.1.0.3.test
13492 @@@DEnt:
13493 @@@@test:value:
13494 <?xml version="1.0"?>
13495 <$u3005b/>
13496 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 2)..(2, 3); }
13497 @@XMLTest:
13498 @@@QName: xp.name.emptyelemtag.1.1.3.test
13499 @@@DEnt:
13500 @@@@test:value:
13501 <?xml version="1.1"?>
13502 <$u3005b/>
13503 @@@test:domTree:
13504 document {
13505 xml-version: '1.1';
13506 element {
13507 node-name: U+3005 'b';
13508 }
13509 }
13510 @@XMLTest:
13511 @@@QName: xp.name.emptyelemtag.names.1.0.1.test
13512 @@@DEnt:
13513 @@@@test:value:
13514 <?xml version="1.0"?>
13515 <a:b/>
13516 @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 6); }
13517 @@XMLTest:
13518 @@@QName: xp.name.emptyelemtag.names.1.1.1.test
13519 @@@DEnt:
13520 @@@@test:value:
13521 <?xml version="1.1"?>
13522 <a:b/>
13523 @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 6); }
13524 @@XMLTest:
13525 @@@QName: xp.name.attr.1.0.2.test
13526 @@@DEnt:
13527 @@@@test:value:
13528 <?xml version="1.0"?>
13529 <a $u3001$u3002=""/>
13530 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 4)..(2, 5); }
13531 @@XMLTest:
13532 @@@QName: xp.name.attr.1.1.2.test
13533 @@@DEnt:
13534 @@@@test:value:
13535 <?xml version="1.1"?>
13536 <a $u3001$u3002=""/>
13537 @@@test:domTree:
13538 document {
13539 xml-version: '1.1';
13540 element {
13541 attribute {
13542 node-name: U+3001 U+3002;
13543 }
13544 }
13545 }
13546 @@XMLTest:
13547 @@@QName: xp.name.attr.1.0.3.test
13548 @@@DEnt:
13549 @@@@test:value:
13550 <?xml version="1.0"?>
13551 <a $u3005b=""/>
13552 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 4)..(2, 5); }
13553 @@XMLTest:
13554 @@@QName: xp.name.attr.1.1.3.test
13555 @@@DEnt:
13556 @@@@test:value:
13557 <?xml version="1.1"?>
13558 <a $u3005b=""/>
13559 @@@test:domTree:
13560 document {
13561 xml-version: '1.1';
13562 element {
13563 attribute {
13564 node-name: U+3005 'b';
13565 }
13566 }
13567 }
13568 @@XMLTest:
13569 @@@QName: xp.name.attr.names.1.0.1.test
13570 @@@DEnt:
13571 @@@@test:value:
13572 <?xml version="1.0"?>
13573 <a a:b=""/>
13574 @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 11); }
13575 @@XMLTest:
13576 @@@QName: xp.name.attr.names.1.1.1.test
13577 @@@DEnt:
13578 @@@@test:value:
13579 <?xml version="1.1"?>
13580 <a a:b=""/>
13581 @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 11); }
13582 @@XMLTest:
13583 @@@QName: xp.name.attr.names.1.0.2.test
13584 @@@DEnt:
13585 @@@@test:value:
13586 <?xml version="1.0"?>
13587 <a :ab=""/>
13588 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (2, 4)..(2, 6); }
13589 @@@c:erred: <[[xp|nsc-prefix-declared]]> { }
13590 @@XMLTest:
13591 @@@QName: xp.name.attr.names.1.1.2.test
13592 @@@DEnt:
13593 @@@@test:value:
13594 <?xml version="1.1"?>
13595 <a :ab=""/>
13596 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (2, 4)..(2, 6); }
13597 @@@c:erred: <[[xp|nsc-prefix-declared]]> { }
13598 @@XMLTest:
13599 @@@QName: xp.name.attlist.1.0.2.test
13600 @@@DEnt:
13601 @@@@test:value:
13602 <?xml version="1.0"?>
13603 <!DOCTYPE p [
13604 <!NOTATION $u3001$u3002 SYSTEM "n">
13605 <!ATTLIST $u3001$u3002
13606 $u3001$u3002
13607 NOTATION
13608 ($u3001$u3002)
13609 #IMPLIED>
13610 ]><p/>
13611 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13612 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 11)..(4, 12); }
13613 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 1)..(5, 2); }
13614 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (7, 2)..(7, 3); }
13615 @@XMLTest:
13616 @@@QName: xp.name.attlist.1.1.2.test
13617 @@@DEnt:
13618 @@@@test:value:
13619 <?xml version="1.1"?>
13620 <!DOCTYPE p [
13621 <!NOTATION $u3001$u3002 SYSTEM "n">
13622 <!ATTLIST $u3001$u3002
13623 $u3001$u3002
13624 NOTATION
13625 ($u3001$u3002)
13626 #IMPLIED>
13627 ]><p/>
13628 @@@test:domTree:
13629 document {
13630 xml-version: '1.1';
13631 document-type {
13632 notation {
13633 node-name: U+3001 U+3002;
13634 }
13635 element-type-definition {
13636 node-name: U+3001 U+3002;
13637 attribute-definition {
13638 node-name: U+3001 U+3002;
13639 allowed-tokens: DOMStringList (U+3001 U+3002);
13640 }
13641 }
13642 }
13643 element { }
13644 }
13645 @@XMLTest:
13646 @@@QName: xp.name.attlist.1.0.3.test
13647 @@@DEnt:
13648 @@@@test:value:
13649 <?xml version="1.0"?>
13650 <!DOCTYPE p [
13651 <!NOTATION $u3005b SYSTEM "n">
13652 <!ATTLIST $u3005b
13653 $u3005b
13654 NOTATION
13655 ($u3005b)
13656 #IMPLIED>
13657 ]><p/>
13658 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13659 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 11)..(4, 12); }
13660 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 1)..(5, 2); }
13661 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (7, 2)..(7, 3); }
13662 @@XMLTest:
13663 @@@QName: xp.name.attlist.1.1.3.test
13664 @@@DEnt:
13665 @@@@test:value:
13666 <?xml version="1.1"?>
13667 <!DOCTYPE p [
13668 <!NOTATION $u3005b SYSTEM "n">
13669 <!ATTLIST $u3005b
13670 $u3005b
13671 NOTATION
13672 ($u3005b)
13673 #IMPLIED>
13674 ]><p/>
13675 @@@test:domTree:
13676 document {
13677 xml-version: '1.1';
13678 document-type {
13679 notation {
13680 node-name: U+3005 'b';
13681 }
13682 element-type-definition {
13683 node-name: U+3005 'b';
13684 attribute-definition {
13685 node-name: U+3005 'b';
13686 allowed-tokens: DOMStringList (U+3005 'b');
13687 }
13688 }
13689 }
13690 element { }
13691 }
13692 @@XMLTest:
13693 @@@QName: xp.name.attlist.names.1.0.1.test
13694 @@@DEnt:
13695 @@@@test:value:
13696 <?xml version="1.0"?>
13697 <!DOCTYPE p [
13698 <!NOTATION a:b SYSTEM "n">
13699 <!ATTLIST a:b
13700 a:b
13701 NOTATION
13702 (a:b)
13703 #IMPLIED>
13704 ]><p/>
13705 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13706 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13707 @@XMLTest:
13708 @@@QName: xp.name.attlist.names.1.1.1.test
13709 @@@DEnt:
13710 @@@@test:value:
13711 <?xml version="1.1"?>
13712 <!DOCTYPE p [
13713 <!NOTATION a:b SYSTEM "n">
13714 <!ATTLIST a:b
13715 a:b
13716 NOTATION
13717 (a:b)
13718 #IMPLIED>
13719 ]><p/>
13720 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13721 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13722 @@XMLTest:
13723 @@@QName: xp.name.attlist.names.1.0.2.test
13724 @@@DEnt:
13725 @@@@test:value:
13726 <?xml version="1.0"?>
13727 <!DOCTYPE p [
13728 <!NOTATION :ab SYSTEM "n">
13729 <!ATTLIST :ab
13730 :ab
13731 NOTATION
13732 (:ab)
13733 #IMPLIED>
13734 ]><p/>
13735 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13736 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (4, 11)..(4, 13); }
13737 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (5, 1)..(5, 3); }
13738 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13739 @@XMLTest:
13740 @@@QName: xp.name.attlist.names.1.1.2.test
13741 @@@DEnt:
13742 @@@@test:value:
13743 <?xml version="1.1"?>
13744 <!DOCTYPE p [
13745 <!NOTATION :ab SYSTEM "n">
13746 <!ATTLIST :ab
13747 :ab
13748 NOTATION
13749 (:ab)
13750 #IMPLIED>
13751 ]><p/>
13752 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13753 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (4, 11)..(4, 13); }
13754 @@@c:erred: <[[xp|nswf-legal-qname]]>{ (5, 1)..(5, 3); }
13755 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13756 @@XMLTest:
13757 @@@QName: xp.name.gent.1.0.2.test
13758 @@@DEnt:
13759 @@@@test:value:
13760 <?xml version="1.0"?>
13761 <!DOCTYPE p [
13762 <!ENTITY $u3001$u3002 "n">
13763 ]>
13764 <p a="&$u3001$u3002;">
13765 &$u3001$u3002;
13766 </p>
13767 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 10)..(3, 11); }
13768 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 8)..(5, 9); }
13769 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (6, 2)..(6, 3); }
13770 @@XMLTest:
13771 @@@QName: xp.name.ger.1.1.2.test
13772 @@@DEnt:
13773 @@@@test:value:
13774 <?xml version="1.1"?>
13775 <!DOCTYPE p [
13776 <!ENTITY $u3001$u3002 "n">
13777 ]>
13778 <p a="&$u3001$u3002;">$
13779 &$u3001$u3002;$
13780 </p>
13781 @@@test:domTree:
13782 document {
13783 xml-version: '1.1';
13784 document-type {
13785 general-entity {
13786 node-name: U+3001 U+3002;
13787 }
13788 }
13789 element {
13790 attribute {
13791 node-name: 'a';
13792 general-entity-reference {
13793 node-name: U+3001 U+3002;
13794 }
13795 }
13796 general-entity-reference {
13797 node-name: U+3001 U+3002;
13798 }
13799 }
13800 }
13801 @@XMLTest:
13802 @@@QName: xp.name.ger.1.0.3.test
13803 @@@DEnt:
13804 @@@@test:value:
13805 <?xml version="1.0"?>
13806 <!DOCTYPE p [
13807 <!ENTITY $u3005b "n">
13808 ]>
13809 <p a="&$u3005b;">
13810 &$u3005b;
13811 </p>
13812 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 10)..(3, 11); }
13813 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 8)..(5, 9); }
13814 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (6, 2)..(6, 3); }
13815 @@XMLTest:
13816 @@@QName: xp.name.ger.1.1.3.test
13817 @@@DEnt:
13818 @@@@test:value:
13819 <?xml version="1.1"?>
13820 <!DOCTYPE p [
13821 <!ENTITY $u3005b "n">
13822 ]>
13823 <p a="&$u3005b;">$
13824 &$u3005b;$
13825 </p>
13826 @@@test:domTree:
13827 document {
13828 xml-version: '1.1';
13829 document-type {
13830 general-entity {
13831 node-name: U+3005 'b';
13832 }
13833 }
13834 element {
13835 attribute {
13836 node-name: 'a';
13837 general-entity-reference {
13838 node-name: U+3005 'b';
13839 }
13840 }
13841 general-entity-reference {
13842 node-name: U+3005 'b';
13843 }
13844 }
13845 }
13846 @@XMLTest:
13847 @@@QName: xp.name.ger.names.1.0.1.test
13848 @@@DEnt:
13849 @@@@test:value:
13850 <?xml version="1.0"?>
13851 <!DOCTYPE p [
13852 <!ENTITY a:b "n">
13853 ]>
13854 <p a="&a:b;">
13855 &a:b;
13856 </p>
13857 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 10)..(3, 12); }
13858 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (5, 8)..(5, 10); }
13859 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (6, 2)..(6, 4); }
13860 @@XMLTest:
13861 @@@QName: xp.name.ger.names.1.1.1.test
13862 @@@DEnt:
13863 @@@@test:value:
13864 <?xml version="1.1"?>
13865 <!DOCTYPE p [
13866 <!ENTITY a:b "n">
13867 ]>
13868 <p a="&a:b;">
13869 &a:b;
13870 </p>
13871 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 10)..(3, 12); }
13872 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (5, 8)..(5, 10); }
13873 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (6, 2)..(6, 4); }
13874 @@XMLTest:
13875 @@@QName: xp.name.ndata.1.0.2.test
13876 @@@DEnt:
13877 @@@@test:value:
13878 <?xml version="1.0"?>
13879 <!DOCTYPE p [
13880 <!NOTATION $u3001$u3002 SYSTEM "n">
13881 <!ENTITY e SYSTEM "s" NDATA $u3001$u3002>
13882 ]><p/>
13883 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13884 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 29)..(4, 30); }
13885 @@XMLTest:
13886 @@@QName: xp.name.ndata.1.1.2.test
13887 @@@DEnt:
13888 @@@@test:value:
13889 <?xml version="1.1"?>
13890 <!DOCTYPE p [
13891 <!NOTATION $u3001$u3002 SYSTEM "n">
13892 <!ENTITY e SYSTEM "s" NDATA $u3001$u3002>
13893 ]><p/>
13894 @@@test:domTree:
13895 document {
13896 xml-version: '1.1';
13897 document-type {
13898 notation {
13899 node-name: U+3001 U+3002;
13900 }
13901 general-entity {
13902 node-name: 'e';
13903 notation-name: U+3001 U+3002;
13904 }
13905 }
13906 element { }
13907 }
13908 @@XMLTest:
13909 @@@QName: xp.name.ndata.1.0.3.test
13910 @@@DEnt:
13911 @@@@test:value:
13912 <?xml version="1.0"?>
13913 <!DOCTYPE p [
13914 <!NOTATION $u3005b SYSTEM "n">
13915 <!ENTITY e SYSTEM "s" NDATA $u3005b>
13916 ]><p/>
13917 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13918 @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 29)..(4, 30); }
13919 @@XMLTest:
13920 @@@QName: xp.name.ndata.1.1.3.test
13921 @@@DEnt:
13922 @@@@test:value:
13923 <?xml version="1.1"?>
13924 <!DOCTYPE p [
13925 <!NOTATION $u3005b SYSTEM "n">
13926 <!ENTITY e SYSTEM "s" NDATA $u3005b>
13927 ]><p/>
13928 @@@test:domTree:
13929 document {
13930 xml-version: '1.1';
13931 document-type {
13932 notation {
13933 node-name: U+3005 'b';
13934 }
13935 general-entity {
13936 node-name: 'e';
13937 notation-name: U+3005 'b';
13938 }
13939 }
13940 element { }
13941 }
13942 @@XMLTest:
13943 @@@QName: xp.name.ndata.names.1.0.1.test
13944 @@@DEnt:
13945 @@@@test:value:
13946 <?xml version="1.0"?>
13947 <!DOCTYPE p [
13948 <!NOTATION a:b SYSTEM "n">
13949 <!ENTITY e SYSTEM "s" NDATA a:b>
13950 ]><p/>
13951 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13952 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (4, 29)..(4, 31); }
13953 @@XMLTest:
13954 @@@QName: xp.name.ndata.names.1.1.1.test
13955 @@@DEnt:
13956 @@@@test:value:
13957 <?xml version="1.1"?>
13958 <!DOCTYPE p [
13959 <!NOTATION a:b SYSTEM "n">
13960 <!ENTITY e SYSTEM "s" NDATA a:b>
13961 ]><p/>
13962 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13963 @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (4, 29)..(4, 31); }
13964
13965 @@enImplNote:
13966 @@@ddid: wf-invalid-character-in-node-name
13967 @@@@:
13968 {ISSUE::
13969 {P:: Tests required for:
13970
13971 - <CODE::Name> in element type declaration
13972
13973 - <CODE::Name> in model group
13974
13975 - <CODE::Name> in parameter entity declaration
13976
13977 - <CODE::Name> in parameter entity reference
13978
13979 }
13980 }
13981
13982 @@XMLTest:
13983 @@@QName: xp.NOTATION.1.test
13984 @@@DEnt:
13985 @@@@test:value:
13986 <!DOCTYPE p [
13987 <!NOTATION n SYSTEM "m">
13988 ]><p/>
13989 @@@test:domTree:
13990 document {
13991 document-type {
13992 notation {
13993 node-name: 'n';
13994 public-id: null;
13995 system-id: 'm';
13996 }
13997 }
13998 element { }
13999 }
14000 @@XMLTest:
14001 @@@QName: xp.NOTATION.2.test
14002 @@@DEnt:
14003 @@@@test:value:
14004 <!DOCTYPE p [
14005 <!NOTATION n PUBLIC "m">
14006 ]><p/>
14007 @@@test:domTree:
14008 document {
14009 document-type {
14010 notation {
14011 node-name: 'n';
14012 system-id: null;
14013 public-id: 'm';
14014 }
14015 }
14016 element { }
14017 }
14018 @@XMLTest:
14019 @@@QName: xp.NOTATION.3.test
14020 @@@DEnt:
14021 @@@@test:value:
14022 <!DOCTYPE p [
14023 <!NOTATION n PUBLIC "m" "l">
14024 ]><p/>
14025 @@@test:domTree:
14026 document {
14027 document-type {
14028 notation {
14029 node-name: 'n';
14030 public-id: 'm';
14031 system-id: 'l';
14032 }
14033 }
14034 element { }
14035 }
14036 @@XMLTest:
14037 @@@QName: xp.NOTATION.4.test
14038 @@@DEnt:
14039 @@@@test:value:
14040 <!DOCTYPE p [
14041 <!NOTATION n SYSTEM "m">
14042 <!NOTATION n SYSTEM "l">
14043 ]><p/>
14044 @@@c:erred: <[[xp|vc-unique-notation-name]]> { (3, 1)..(3, 24); }
14045 @@@test:domTree:
14046 document {
14047 document-type {
14048 notation {
14049 node-name: 'n';
14050 system-id: 'm';
14051 }
14052 }
14053 element { }
14054 }
14055
14056 @@XMLTest:
14057 @@@QName: xp.names.1.test
14058 @@@DEnt:
14059 @@@@test:value:
14060 <p xmlns="http://1.example/" a="b"/>
14061 @@@test:domTree:
14062 document {
14063 element {
14064 prefix: null;
14065 local-name: 'p';
14066 namespace-uri: 'http://1.example/';
14067 attribute {
14068 prefix: null;
14069 local-name: 'xmlns';
14070 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14071 specified: true;
14072 }
14073 attribute {
14074 prefix: null;
14075 local-name: 'a';
14076 specified: true;
14077 }
14078 }
14079 }
14080 @@XMLTest:
14081 @@@QName: xp.names.2.test
14082 @@@DEnt:
14083 @@@@test:value:
14084 <p xmlns:a="http://1.example/" a="b" a:a="c"/>
14085 @@@test:domTree:
14086 document {
14087 element {
14088 prefix: null;
14089 local-name: 'p';
14090 namespace-uri: null;
14091 attribute {
14092 prefix: 'xmlns';
14093 local-name: 'a';
14094 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14095 specified: true;
14096 }
14097 attribute {
14098 prefix: null;
14099 local-name: 'a';
14100 specified: true;
14101 }
14102 attribute {
14103 prefix: 'a';
14104 local-name: 'a';
14105 namespace-uri: 'http://1.example/';
14106 specified: true;
14107 }
14108 }
14109 }
14110 @@XMLTest:
14111 @@@QName: xp.names.3.test
14112 @@@DEnt:
14113 @@@@test:value:
14114 <a:p xmlns:a="http://1.example/" a="b" a:a="c"/>
14115 @@@test:domTree:
14116 document {
14117 element {
14118 prefix: 'a';
14119 local-name: 'p';
14120 namespace-uri: 'http://1.example/';
14121 attribute {
14122 prefix: 'xmlns';
14123 local-name: 'a';
14124 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14125 specified: true;
14126 }
14127 attribute {
14128 prefix: null;
14129 local-name: 'a';
14130 specified: true;
14131 }
14132 attribute {
14133 prefix: 'a';
14134 local-name: 'a';
14135 namespace-uri: 'http://1.example/';
14136 specified: true;
14137 }
14138 }
14139 }
14140 @@XMLTest:
14141 @@@QName: xp.names.5.test
14142 @@@DEnt:
14143 @@@@test:value:
14144 <p xmlns:a="http://1.example/">$
14145 <a:q/>$
14146 </p>
14147 @@@test:domTree:
14148 document {
14149 element {
14150 prefix: null;
14151 local-name: 'p';
14152 namespace-uri: null;
14153 attribute {
14154 prefix: 'xmlns';
14155 local-name: 'a';
14156 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14157 specified: true;
14158 }
14159 element {
14160 prefix: 'a';
14161 local-name: 'q';
14162 namespace-uri: 'http://1.example/';
14163 }
14164 }
14165 }
14166 @@XMLTest:
14167 @@@QName: xp.names.6.test
14168 @@@DEnt:
14169 @@@@test:value:
14170 <p xmlns:a="http://1.example/">$
14171 <q a:b="c"/>$
14172 </p>
14173 @@@test:domTree:
14174 document {
14175 element {
14176 prefix: null;
14177 local-name: 'p';
14178 namespace-uri: null;
14179 attribute {
14180 prefix: 'xmlns';
14181 local-name: 'a';
14182 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14183 specified: true;
14184 }
14185 element {
14186 prefix: null;
14187 local-name: 'q';
14188 namespace-uri: null;
14189 attribute {
14190 prefix: 'a';
14191 local-name: 'b';
14192 namespace-uri: 'http://1.example/';
14193 specified: true;
14194 }
14195 }
14196 }
14197 }
14198 @@XMLTest:
14199 @@@QName: xp.names.7.test
14200 @@@DEnt:
14201 @@@@test:value:
14202 <p xmlns:a="http://1.example/">$
14203 <q a:b="c" xmlns:a="http://2.example/"/>$
14204 </p>
14205 @@@test:domTree:
14206 document {
14207 element {
14208 prefix: null;
14209 local-name: 'p';
14210 namespace-uri: null;
14211 attribute {
14212 prefix: 'xmlns';
14213 local-name: 'a';
14214 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14215 specified: true;
14216 }
14217 element {
14218 prefix: null;
14219 local-name: 'q';
14220 namespace-uri: null;
14221 attribute {
14222 prefix: 'a';
14223 local-name: 'b';
14224 namespace-uri: 'http://2.example/';
14225 specified: true;
14226 }
14227 attribute {
14228 prefix: 'xmlns';
14229 local-name: 'a';
14230 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14231 specified: true;
14232 }
14233 }
14234 }
14235 }
14236
14237 @@XMLTest:
14238 @@@QName: xp.names.undeclare.1.test
14239 @@@DEnt:
14240 @@@@test:value:
14241 <p xmlns="http://1.example/">$
14242 <q xmlns="">$
14243 <r xmlns="http://2.example/"/>$
14244 </q>$
14245 </p>
14246 @@@test:domTree:
14247 document {
14248 element {
14249 prefix: null;
14250 local-name: 'p';
14251 namespace-uri: 'http://1.example/';
14252 attribute {
14253 prefix: null;
14254 local-name: 'xmlns';
14255 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14256 specified: true;
14257 }
14258 element {
14259 prefix: null;
14260 local-name: 'q';
14261 namespace-uri: null;
14262 attribute {
14263 prefix: null;
14264 local-name: 'xmlns';
14265 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14266 specified: true;
14267 }
14268 element {
14269 prefix: null;
14270 local-name: 'r';
14271 namespace-uri: 'http://2.example/';
14272 attribute {
14273 prefix: null;
14274 local-name: 'xmlns';
14275 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14276 specified: true;
14277 }
14278 }
14279 }
14280 }
14281 }
14282
14283 @@XMLTest:
14284 @@@QName: xp.names.undeclare.1.0.1.test
14285 @@@DEnt:
14286 @@@@test:value:
14287 <?xml version="1.0"?>
14288 <a:p xmlns:a="http://1.example/">$
14289 <q xmlns:a="">$
14290 <a:r xmlns:a="http://2.example/"/>$
14291 </q>$
14292 </a:p>
14293 @@@c:erred: <[[xp|nswf-empty-namespace-name]]> { (2, 34)..(2, 47); }
14294 @@XMLTest:
14295 @@@QName: xp.names.undeclare.1.1.1.test
14296 @@@DEnt:
14297 @@@@test:value:
14298 <?xml version="1.1"?>
14299 <a:p xmlns:a="http://1.example/">$
14300 <q xmlns:a="">$
14301 <a:r xmlns:a="http://2.example/"/>$
14302 </q>$
14303 </a:p>
14304 @@@test:domTree:
14305 document {
14306 element {
14307 prefix: 'a';
14308 local-name: 'p';
14309 namespace-uri: 'http://1.example/';
14310 attribute {
14311 prefix: 'xmlns';
14312 local-name: 'a';
14313 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14314 specified: true;
14315 }
14316 element {
14317 prefix: null;
14318 local-name: 'q';
14319 namespace-uri: null;
14320 attribute {
14321 prefix: 'xmlns';
14322 local-name: 'a';
14323 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14324 specified: true;
14325 }
14326 element {
14327 prefix: 'a';
14328 local-name: 'r';
14329 namespace-uri: 'http://2.example/';
14330 attribute {
14331 prefix: 'xmlns';
14332 local-name: 'a';
14333 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14334 specified: true;
14335 }
14336 }
14337 }
14338 }
14339 }
14340 @@XMLTest:
14341 @@@QName: xp.names.undeclare.1.1.2.test
14342 @@@DEnt:
14343 @@@@test:value:
14344 <?xml version="1.1"?>
14345 <a:p xmlns:a="http://1.example/">$
14346 <q xmlns:a="">$
14347 <a:r/>$
14348 </q>$
14349 </a:p>
14350 @@@c:erred: <[[xp|nsc-prefix-declared]]> { (2, 48)..(2, 53); }
14351
14352 @@XMLTest:
14353 @@@QName: xp.names.xml.prefix.1.test
14354 @@@DEnt:
14355 @@@@test:value:
14356 <a xmlns:xml="http://www.w3.org/XML/1998/namespace"/>
14357 @@@test:domTree:
14358 document {
14359 element {
14360 attribute {
14361 prefix: 'xmlns';
14362 local-name: 'xml';
14363 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14364 }
14365 }
14366 }
14367 @@XMLTest:
14368 @@@QName: xp.names.xml.prefix.2.test
14369 @@@DEnt:
14370 @@@@test:value:
14371 <a xmlns:xml="a"/>
14372 @@@c:erred: <[[xp|nsc-reserved-prefix-xml]]> { (1, 1)..(1, 18); }
14373 @@XMLTest:
14374 @@@QName: xp.names.xml.prefix.3.test
14375 @@@DEnt:
14376 @@@@test:value:
14377 <a xmlns:a="http://www.w3.org/XML/1998/namespace"
14378 />
14379 @@@c:erred: <[[xp|nsc-reserved-namespace-name-xml]]> { (1, 1)..(2, 2); }
14380 @@XMLTest:
14381 @@@QName: xp.names.xml.prefix.4.test
14382 @@@DEnt:
14383 @@@@test:value:
14384 <a xml:lang="ja"/>
14385 @@@test:domTree:
14386 document {
14387 element {
14388 attribute {
14389 prefix: 'xml';
14390 local-name: 'lang';
14391 namespace-uri: 'http://www.w3.org/XML/1998/namespace';
14392 }
14393 }
14394 }
14395
14396 @@XMLTest:
14397 @@@QName: xp.names.prefix.declared.1.test
14398 @@@DEnt:
14399 @@@@test:value:
14400 <!DOCTYPE a [
14401 <!ATTLIST a
14402 b:c CDATA "d"
14403 >
14404 ]>
14405 <a/>
14406 @@@c:erred: <[[xp|nsc-prefix-declared]]> { (6, 1)..(6, 4); }
14407
14408 @@XMLTest:
14409 @@@QName: xp.names.xmlns.reserved.1.test
14410 @@@DEnt:
14411 @@@@test:value:
14412 <a xmlns:xmlns="http://www.w3.org/2000/xmlns/"
14413 />
14414 @@@c:erred: <[[xp|nsc-reserved-prefix-xmlns]]> { (1, 1)..(2, 2); }
14415 @@@c:erred: <[[xp|nsc-reserved-namespace-name-xmlns]]> { (1, 1)..(2, 2); }
14416 @@XMLTest:
14417 @@@QName: xp.names.xmlns.reserved.2.test
14418 @@@DEnt:
14419 @@@@test:value:
14420 <a xmlns:xmlns="a"
14421 />
14422 @@@c:erred: <[[xp|nsc-reserved-prefix-xmlns]]> { (1, 1)..(2, 2); }
14423 @@XMLTest:
14424 @@@QName: xp.names.xmlns.reserved.3.test
14425 @@@DEnt:
14426 @@@@test:value:
14427 <a xmlns:a="http://www.w3.org/2000/xmlns/"
14428 />
14429 @@@c:erred: <[[xp|nsc-reserved-namespace-name-xmlns]]> { (1, 1)..(2, 2); }
14430
14431 @@XMLTest:
14432 @@@QName: xp.names.default.1.test
14433 @@@DEnt:
14434 @@@@test:value:
14435 <!DOCTYPE a [
14436 <!ATTLIST a
14437 xmlns CDATA "http://1.example/">
14438 ]>
14439 <a/>
14440 @@@test:domTree:
14441 document {
14442 document-type {
14443 element-type-definition {
14444 node-name: 'a';
14445 attribute-definition {
14446 node-name: 'xmlns';
14447 node-value: 'http://1.example/';
14448 }
14449 }
14450 }
14451 element {
14452 prefix: null;
14453 local-name: 'a';
14454 namespace-uri: 'http://1.example/';
14455 attribute {
14456 prefix: null;
14457 local-name: 'xmlns';
14458 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14459 value: 'http://1.example/';
14460 specified: false;
14461 }
14462 }
14463 }
14464 @@XMLTest:
14465 @@@QName: xp.names.default.2.test
14466 @@@DEnt:
14467 @@@@test:value:
14468 <!DOCTYPE a [
14469 <!ATTLIST a
14470 xmlns CDATA "http://1.example/">
14471 ]>
14472 <a xmlns="http://2.example/"/>
14473 @@@test:domTree:
14474 document {
14475 document-type {
14476 element-type-definition {
14477 node-name: 'a';
14478 attribute-definition {
14479 node-name: 'xmlns';
14480 node-value: 'http://1.example/';
14481 }
14482 }
14483 }
14484 element {
14485 prefix: null;
14486 local-name: 'a';
14487 namespace-uri: 'http://2.example/';
14488 attribute {
14489 prefix: null;
14490 local-name: 'xmlns';
14491 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14492 value: 'http://2.example/';
14493 specified: true;
14494 }
14495 }
14496 }
14497 @@XMLTest:
14498 @@@QName: xp.names.default.3.test
14499 @@@DEnt:
14500 @@@@test:value:
14501 <!DOCTYPE b:a [
14502 <!ATTLIST b:a
14503 xmlns:b CDATA "http://1.example/">
14504 ]>
14505 <b:a/>
14506 @@@test:domTree:
14507 document {
14508 document-type {
14509 element-type-definition {
14510 node-name: 'b:a';
14511 attribute-definition {
14512 node-name: 'xmlns:b';
14513 node-value: 'http://1.example/';
14514 }
14515 }
14516 }
14517 element {
14518 prefix: 'b';
14519 local-name: 'a';
14520 namespace-uri: 'http://1.example/';
14521 attribute {
14522 prefix: 'xmlns';
14523 local-name: 'b';
14524 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14525 value: 'http://1.example/';
14526 specified: false;
14527 }
14528 }
14529 }
14530 @@XMLTest:
14531 @@@QName: xp.names.default.4.test
14532 @@@DEnt:
14533 @@@@test:value:
14534 <!DOCTYPE b:a [
14535 <!ATTLIST b:a
14536 xmlns:b CDATA "http://1.example/">
14537 ]>
14538 <b:a xmlns:b="http://2.example/"/>
14539 @@@test:domTree:
14540 document {
14541 document-type {
14542 element-type-definition {
14543 node-name: 'b:a';
14544 attribute-definition {
14545 node-name: 'xmlns:b';
14546 node-value: 'http://1.example/';
14547 }
14548 }
14549 }
14550 element {
14551 prefix: 'b';
14552 local-name: 'a';
14553 namespace-uri: 'http://2.example/';
14554 attribute {
14555 prefix: 'xmlns';
14556 local-name: 'b';
14557 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14558 value: 'http://2.example/';
14559 specified: true;
14560 }
14561 }
14562 }
14563 @@XMLTest:
14564 @@@QName: xp.names.default.5.test
14565 @@@DEnt:
14566 @@@@test:value:
14567 <!DOCTYPE a [
14568 <!ATTLIST a
14569 xmlns:b CDATA "http://1.example/"
14570 b:c CDATA "http://1.example/">
14571 ]>
14572 <a xmlns:b="http://2.example/"/>
14573 @@@test:domTree:
14574 document {
14575 document-type {
14576 element-type-definition {
14577 node-name: 'a';
14578 attribute-definition {
14579 node-name: 'xmlns:b';
14580 text-content: 'http://1.example/';
14581 }
14582 attribute-definition {
14583 node-name: 'b:c';
14584 text-content: 'http://1.example/';
14585 }
14586 }
14587 }
14588 element {
14589 prefix: null;
14590 local-name: 'a';
14591 namespace-uri: null;
14592 attribute {
14593 prefix: 'xmlns';
14594 local-name: 'b';
14595 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14596 value: 'http://2.example/';
14597 specified: true;
14598 }
14599 attribute {
14600 prefix: 'b';
14601 local-name: 'c';
14602 namespace-uri: 'http://2.example/';
14603 specified: false;
14604 }
14605 }
14606 }
14607
14608 @@XMLTest:
14609 @@@QName: xp.names.unique.1.test
14610 @@@DEnt:
14611 @@@@test:value:
14612 <a
14613 xmlns:b="http://2.example/"
14614 xmlns:c="http://2.example/"
14615 b:d=""
14616 c:d=""
14617 />
14618 @@@c:erred: <[[xp|nswf-unique-att-spec-expanded-name]]> { (1, 1)..(6, 2); }
14619 @@XMLTest:
14620 @@@QName: xp.names.unique.2.test
14621 @@@DEnt:
14622 @@@@test:value:
14623 <!DOCTYPE a [
14624 <!ATTLIST a
14625 c:d CDATA ""
14626 >
14627 ]>
14628 <a
14629 xmlns:b="http://2.example/"
14630 xmlns:c="http://2.example/"
14631 b:d=""
14632 />
14633 @@@c:erred: <[[xp|nswf-unique-att-spec-expanded-name]]> { (6, 1)..(10, 2);}
14634 @@XMLTest:
14635 @@@QName: xp.names.unique.3.test
14636 @@@DEnt:
14637 @@@@test:value:
14638 <!DOCTYPE a [
14639 <!ATTLIST a
14640 c:d CDATA "value1"
14641 >
14642 ]>
14643 <a
14644 xmlns:c="http://2.example/"
14645 c:d="value2"
14646 />
14647 @@@test:domTree:
14648 document {
14649 document-type { }
14650 element {
14651 attribute {
14652 prefix: 'xmlns';
14653 local-name: 'c';
14654 namespace-uri: 'http://www.w3.org/2000/xmlns/';
14655 specified: true;
14656 }
14657 attribute {
14658 prefix: 'c';
14659 local-name: 'd';
14660 namespace-uri: 'http://2.example/';
14661 value: 'value2';
14662 specified: true;
14663 }
14664 }
14665 }
14666
14667 @@XMLTest:
14668 @@@QName: xp.names.normalize.1.test
14669 @@@DEnt:
14670 @@@@test:value:
14671 <!DOCTYPE a [
14672 <!ATTLIST a
14673 xmlns NMTOKEN #IMPLIED
14674 >
14675 ]>
14676 <a xmlns=" "/>
14677 @@@test:domTree:
14678 document {
14679 document-type { }
14680 element {
14681 namespace-uri: null;
14682 prefix: null;
14683 local-name: 'a';
14684 }
14685 }
14686 @@XMLTest:
14687 @@@QName: xp.names.normalize.2.test
14688 @@@DEnt:
14689 @@@@test:value:
14690 <!DOCTYPE a [
14691 <!ATTLIST a
14692 xmlns NMTOKEN #IMPLIED
14693 >
14694 ]>
14695 <a xmlns=" about:blank "/>
14696 @@@test:domTree:
14697 document {
14698 document-type { }
14699 element {
14700 namespace-uri: 'about:blank';
14701 prefix: null;
14702 local-name: 'a';
14703 }
14704 }
14705 @@XMLTest:
14706 @@@QName: xp.names.normalize.3.test
14707 @@@DEnt:
14708 @@@@test:value:
14709 <!DOCTYPE a:a [
14710 <!ATTLIST a:a
14711 xmlns:a NMTOKEN #IMPLIED
14712 >
14713 ]>
14714 <a:a xmlns:a=" about:blank "/>
14715 @@@test:domTree:
14716 document {
14717 document-type { }
14718 element {
14719 namespace-uri: 'about:blank';
14720 prefix: 'a';
14721 local-name: 'a';
14722 }
14723 }
14724
14725 @@PerlDef:
14726 my $impl = $Message::DOM::ImplementationRegistry->get_implementation ({
14727 'Core' => '3.0',
14728 'XML' => '3.0',
14729 'XMLVersion' => ['1.0', '1.1'],
14730 });
14731 my $parser = <Class::ManakaiXMLParser>->new ($impl);
14732
14733 for my $test_data (@$TestData) {
14734 $test->start_new_test ($test_data->{uri});
14735 my $doc_ent = $test_data->{entity}->{$test_data->{root_uri}};
14736 my $not_ok;
14737
14738 $parser->dom_config->set_parameter ('error-handler' => sub ($$) {
14739 my (undef, $err) = @_;
14740 my $err_type = $err->type;
14741 if ($test_data->{dom_error}->{$err_type}) {
14742 $test->assert_error_equals
14743 (actual_value => $err,
14744 expected_hash => shift @{$test_data->{dom_error}
14745 ->{$err_type}});
14746 } else { # Uncatched error
14747 warn $err;
14748 unless ($err->severity == <C::c|DOMError.SEVERITY_WARNING>) {
14749 $test->failure_comment ('Unexpected error |'.$err->type.'|');
14750 $not_ok = true;
14751 }
14752 }
14753 return true; # continue as far as possible
14754 });
14755
14756 my $input = {string_data => \$doc_ent->{<Q::test:value>},
14757 system_id => $doc_ent->{<Q::test:uri>},
14758 base_uri => $doc_ent->{<Q::test:baseURI>}};
14759 if ($test_data->{dom_tree}) { # Successful test
14760 try {
14761 my $doc = $parser->parse ($input);
14762 $test->assert_dom_tree_equals
14763 (actual_value => $doc,
14764 expected_hash => $test_data->{dom_tree});
14765 for (values %{$test_data->{dom_error}||{}}) {
14766 if (@$_) {
14767 $test->failure_comment
14768 (@$_.' |DOMError|s of type |'.
14769 $_->[0]->{type}->{value}.'| are not reported');
14770 $not_ok = true;
14771 }
14772 }
14773 $not_ok ? $test->not_ok : $test->ok;
14774 } catch Message::Util::IF::DTException with {
14775 #
14776 } catch Message::DOM::IF::LSException with {
14777 # not_ok
14778 } otherwise {
14779 my $err = shift;
14780 warn $err;
14781 $test->not_ok;
14782 };
14783 } else {
14784 try {
14785 my $doc = $parser->parse ($input);
14786 } catch Message::Util::IF::DTException with {
14787 #
14788 } catch Message::DOM::IF::LSException with {
14789 #
14790 } otherwise {
14791 my $err = shift;
14792 warn $err;
14793 $test->not_ok;
14794 };
14795 for (values %{$test_data->{dom_error}||{}}) {
14796 if (@$_) {
14797 $test->failure_comment
14798 (@$_.' |DOMError|s of type |'.
14799 $_->[0]->{type}->{value}.'| are not reported');
14800 $not_ok = true;
14801 }
14802 }
14803 $not_ok ? $test->not_ok : $test->ok;
14804 }
14805 }
14806
14807 @ResourceDef:
14808 @@QName: getEmptyEntityState
14809 @@rdf:type: DISPerl|InlineCode
14810 @@ForCheck: ManakaiDOM|ForClass
14811 @@PerlDef:
14812 {reptxt => \'', line => 1, column => 1, pos => 0,
14813 is_externally_declared => true, name => $name,
14814 fh => do {
14815 open my $empty, '<', \'';
14816 $empty;
14817 },
14818 close_file => sub { }}
14819
14820 @ResourceDef:
14821 @@QName: getCopyOfEntityState
14822 @@rdf:type: DISPerl|InlineCode
14823 @@ForCheck: ManakaiDOM|ForClass
14824 @@PerlDef:
14825 {%{$self->{$entity_type}->{$entity_name}},
14826 line => 1, column => 1, pos => 0,
14827 fh => do {
14828 require IO::String;
14829 IO::String->new
14830 (${$self->{$entity_type}->{$entity_name}->{reptxt}});
14831 ## TODO: External entities.
14832 },
14833 close_file => sub { }}
14834 ##ManakaiXMLParser
14835
14836 ElementTypeBinding:
14837 @Name: Test
14838 @ElementType:
14839 dis:ResourceDef
14840 @ShadowContent:
14841 @@ForCheck: ManakaiDOM|ForClass
14842 @@rdf:type: test|StandaloneTest
14843
14844 ElementTypeBinding:
14845 @Name: XMLTests
14846 @ElementType:
14847 dis:ResourceDef
14848 @ShadowContent:
14849 @@ForCheck: ManakaiDOM|ForClass
14850 @@rdf:type: test|ParserTestSet
14851
14852 ElementTypeBinding:
14853 @Name: XMLTest
14854 @ElementType:
14855 dis:ResourceDef
14856 @ShadowContent:
14857 @@ForCheck: ManakaiDOM|ForClass
14858 @@rdf:type: test|ParserTest
14859
14860 ElementTypeBinding:
14861 @Name: DEnt
14862 @ElementType:
14863 dis:ResourceDef
14864 @ShadowContent:
14865 @@rdf:type: test|RootEntity
14866
14867 ElementTypeBinding:
14868 @Name: Ent
14869 @ElementType:
14870 dis:ResourceDef
14871 @ShadowContent:
14872 @@rdf:type: test|Entity
14873
14874 ResourceDef:
14875 @QName: xp|get-location-from-token
14876 @rdf:type: DISPerl|BlockCode
14877 @enDesc:
14878 Creates a <IF::DOMCore:DOMLocator> object from a token.
14879 @PerlDef:
14880 my $__d = $token->{type} ne '#EOF'
14881 ? $token->{location}->{char_d}
14882 : 0;
14883 $__d -= $token->{location_d} if $token->{location_d};
14884 $result = {
14885 utf32_offset => $token->{location}->{pos} - $__d,
14886 line_number => $token->{location}->{line},
14887 column_number => $token->{location}->{column} - $__d,
14888 };
14889 $result->{utf32_offset} = 0 if $result->{utf32_offset} < 0;
14890 $result->{column_number} = 0 if $result->{column_number} < 0;
14891 ## 0 or 1, which should be?
14892 @For: ManakaiDOM|ManakaiDOM3
14893
14894 ElementTypeBinding:
14895 @Name: RuleDef
14896 @ElementType:
14897 dis:ResourceDef
14898 @ShadowContent:
14899 @@ForCheck: ManakaiDOM|ForClass
14900 @@rdf:type: Muf2003|RuleDefClass
14901
14902 ElementTypeBinding:
14903 @Name: RuleParam
14904 @ElementType:
14905 dis:ResourceDef
14906 @ShadowContent:
14907 @@rdf:type: Muf2003|RuleParameter
14908
14909 ElementTypeBinding:
14910 @Name: enImplNote
14911 @ElementType:
14912 dis:ImplNote
14913 @ShadowContent:
14914 @@lang:en
14915
14916 ElementTypeBinding:
14917 @Name: WFErrDef
14918 @ElementType:
14919 dis:ResourceDef
14920 @ShadowContent:
14921 @@rdf:type: DOMCore|DOMErrorType
14922 @@For: ManakaiDOM|DOM3
14923 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14924 @@c:severity: c|SEVERITY_FATAL_ERROR
14925
14926 ElementTypeBinding:
14927 @Name: FatalErrDef
14928 @ElementType:
14929 dis:ResourceDef
14930 @ShadowContent:
14931 @@rdf:type: DOMCore|DOMErrorType
14932 @@For: ManakaiDOM|DOM3
14933 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14934 @@c:severity: c|SEVERITY_FATAL_ERROR
14935
14936 ElementTypeBinding:
14937 @Name: NSFatalErrDef
14938 @ElementType:
14939 dis:ResourceDef
14940 @ShadowContent:
14941 @@rdf:type: c|DOMErrorType
14942 @@For: ManakaiDOM|DOM3
14943 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14944 @@c:severity: c|SEVERITY_FATAL_ERROR
14945
14946 ElementTypeBinding:
14947 @Name: NSCErrDef
14948 @ElementType:
14949 dis:ResourceDef
14950 @ShadowContent:
14951 @@rdf:type: c|DOMErrorType
14952 @@For: ManakaiDOM|DOM3
14953 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14954 @@c:severity: c|SEVERITY_FATAL_ERROR
14955
14956 ElementTypeBinding:
14957 @Name: VCErrDef
14958 @ElementType:
14959 dis:ResourceDef
14960 @ShadowContent:
14961 @@rdf:type: c|DOMErrorType
14962 @@For: ManakaiDOM|DOM3
14963 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14964 @@c:severity: c|SEVERITY_ERROR
14965
14966 ElementTypeBinding:
14967 @Name: ErrDef
14968 @ElementType:
14969 dis:ResourceDef
14970 @ShadowContent:
14971 @@rdf:type: c|DOMErrorType
14972 @@For: ManakaiDOM|DOM3
14973 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14974 @@c:severity: c|SEVERITY_ERROR
14975
14976 ElementTypeBinding:
14977 @Name: WarnDef
14978 @ElementType:
14979 dis:ResourceDef
14980 @ShadowContent:
14981 @@rdf:type: c|DOMErrorType
14982 @@For: ManakaiDOM|DOM3
14983 @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
14984 @@c:severity: c|SEVERITY_WARNING
14985
14986 WFErrDef:
14987 @QName: xp|wf-syntax-error
14988 @enDesc:
14989 The entity does not match to the production rule; it is not
14990 well-formed.
14991 @enMufDef:
14992 |%xp-error-token-type;|%xp-error-token-value
14993 (prefix => { (|}, suffix => {|)}); is not
14994 allowed%xp-error-lines (prefix => { (|}, suffix => {|)});
14995 @ecore:hasParameter:
14996 @@@: xp|error-token
14997 @@enDesc:
14998 The token that is not allowed.
14999
15000 WFErrDef:
15001 @QName: xp|wf-pi-target-is-xml
15002 @enDesc:
15003 A processing instruction has its <CODE::PITarget> of
15004 <XML::xml> (in any case) which is not allowed.
15005 @enMufDef:
15006 Processing instruction target name cannot be |%p
15007 (name => {<Q::xp|name>});|
15008 @ecore:hasParameter:
15009 @@@: xp|error-token
15010 @@enDesc:
15011 The token that contains the name.
15012 @ecore:hasParameter:
15013 @@@: xp|name
15014 @@enDesc:
15015 A string that is specified as target name of the
15016 processing instruction.
15017 @ecore:hasParameter: xp|parent
15018
15019 WFErrDef:
15020 @QName: xp|wf-no-end-tag
15021 @enDesc:
15022 An end-tag is not found.
15023 @enMufDef:
15024 End-tag |</%p (name => {<Q::xp|expected-element-type>});>| is required
15025 @ecore:hasParameter: xp|error-token
15026 @ecore:hasParameter:
15027 @@@: xp|node
15028 @@enDesc:
15029 The element node that is not closed.
15030 @ecore:hasParameter:
15031 @@@: xp|expected-element-type
15032 @@enDesc:
15033 The element type name of the element that is not closed.
15034
15035 WFErrDef:
15036 @QName: xp|wf-unsupported-xml-version
15037 @enDesc:
15038 The XML version specified in the version declaration is not supported.
15039 @enMufDef:
15040 XML version |%p (name => {<Q::infoset|version>});| is not supported
15041 @ecore:hasParameter: xp|bad-token
15042 @ecore:hasParameter:
15043 @@@: xp|parent
15044 @@enDesc:
15045 The document node.
15046 @ecore:hasParameter:
15047 @@@: infoset|version
15048 @@enDesc:
15049 The specified XML version.
15050
15051 WFErrDef:
15052 @QName: xp|wf-malformed-enc-name
15053 @enDesc:
15054 An <XA::encoding> pseudo-attribute value does not match
15055 to the procduction rule <CODE::EncName>.
15056 @enMufDef:
15057 Encoding name |%p (name => {<Q::xp|name>});| is not allowed
15058 @ecore:hasParameter: xp|error-token
15059 @ecore:hasParameter:
15060 @@@: xp|parent
15061 @@enDesc: The document node.
15062 @ecore:hasParameter:
15063 @@@: xp|name
15064 @@enDesc:
15065 The <XA::encoding> value.
15066
15067 WFErrDef:
15068 @QName: xp|wf-malformed-xml-standalone
15069 @enDesc:
15070 An <XA::standalone> pseudo-attribute value is neither <XML::yes>
15071 or <XML::no>.
15072 @enMufDef:
15073 |standalone| pseudo-attribute value |%p (name => {<Q::xp|name>});|
15074 is not allowed
15075 @ecore:hasParameter: xp|error-token
15076 @ecore:hasParameter:
15077 @@@: xp|parent
15078 @@enDesc: The document node.
15079 @ecore:hasParameter:
15080 @@@: xp|name
15081 @@enDesc:
15082 The <XA::standalone> value.
15083
15084 WFErrDef:
15085 @QName: xp|wf-legal-literal-character
15086 @enDesc:
15087 Each character in XML entity must match to the production
15088 rule <CODE::Char - RestrictedChar>.
15089 @enMufDef:
15090 Character %character-code-point
15091 (v => {<Q::xp|character-number>}); is not allowed
15092 @ecore:hasParameter:
15093 @@@: xp|character-number
15094 @@enDesc:
15095 The code position of the character being referred.
15096
15097 WFErrDef:
15098 @QName: xp|wf-invalid-character-in-node-name
15099 @c:errorType:
15100 @@@: wf-invalid-character-in-node-name
15101 @@ContentType: DISCore|String
15102 @enDesc:
15103 If a name contains a character that is not a name character
15104 in the XML version in use, or if the first character of a name
15105 is not a name start character in the XML version in use.
15106
15107 {NOTE::
15108 When an invalid character is encountered in an entity
15109 where a <CODE::Name> is expected, what type of error
15110 is issued is implementation dependent: <Q::xp|wf-syntax-error>,
15111 <Q::xp|wf-pi-target-is-xml> or other error might be reported.
15112 }
15113
15114 {NOTE::
15115 This error type is defined in DOM Level 3 Core and Load and Save
15116 modules and redefined herein for the purpose of XML parser.
15117 }
15118 @enMufDef:
15119 Character %character-code-point
15120 (v => {<Q::xp|character-number>}); is not allowed in name
15121 @ecore:hasParameter: xp|error-token
15122 @ecore:hasParameter:
15123 @@@: xp|character-number
15124 @@enDesc:
15125 The code position of the character being referred.
15126 @ecore:hasParameter:
15127 @@@: infoset|version
15128 @@enDesc:
15129 The version of XML in use.
15130
15131 WFErrDef:
15132 @QName: xp|wf-pes-in-internal-subset
15133 @enDesc:
15134 In the internal subset of the DTD, parameter entity references
15135 <kwd:MUST-NOT> occur within markup declarations.
15136 @enMufDef:
15137 Parameter entity reference |%percent;%param (name => {<Q::xp|name>});;|
15138 cannot occur within a markup declaration
15139 @ecore:hasParameter: xp|error-token
15140 @ecore:hasParameter:
15141 @@@: xp|name
15142 @@enDesc:
15143 The name of the parameter entity.
15144
15145 WFErrDef:
15146 @QName: xp|wf-element-type-match
15147 @enDesc:
15148 The <CODE::Name> in an element's end-tag must match the element type
15149 in the start-tag.
15150 @enMufDef:
15151 End-tag |</%p (name => {<Q::xp|actual-element-type>});>| does
15152 not match to start-tag |<%p (name => {<Q::xp|expected-element-type>});>|
15153 @ecore:hasParameter: xp|error-token
15154 @ecore:hasParameter:
15155 @@@: xp|node
15156 @@enDesc:
15157 The current opening element node.
15158 @ecore:hasParameter:
15159 @@@: xp|expected-element-type
15160 @@enDesc:
15161 The element type name of the current element.
15162 @ecore:hasParameter:
15163 @@@: xp|actual-element-type
15164 @@enDesc:
15165 The <CODE::Name> occurs in the end-tag.
15166
15167 WFErrDef:
15168 @QName: xp|wf-unique-att-spec
15169 @enDesc:
15170 An attribute name <kwd:MUST-NOT> appear more than once in
15171 the same start-tag or empty-element tag.
15172 @enMufDef:
15173 Attribute |%p (name => {<Q::xp|name>});| is specified more
15174 than once in the same tag
15175 @ecore:hasParameter: xp|error-token
15176 @ecore:hasParameter:
15177 @@@: xp|name
15178 @@enDesc:
15179 The name of the attribute.
15180
15181 WFErrDef:
15182 @QName: xp|wf-no-external-entity-references
15183 @enDesc:
15184 Attribute values <kwd:MUST-NOT> contain direct or indirect
15185 entity references to external entities.
15186 @enMufDef:
15187 External entity |%p (name => {<Q::xp|name>});| is referenced
15188 in an attribute value literal
15189 @ecore:hasParameter: xp|error-token
15190 @ecore:hasParameter:
15191 @@@: xp|name
15192 @@enDesc:
15193 The name of the entity.
15194
15195 WFErrDef:
15196 @QName: xp|wf-no-lt-in-attribute-values
15197 @enDesc:
15198 The replacement text of any entity referred to directly or indirectly
15199 in an attribute value literal <kwd:MUST-NOT> contain a
15200 <CHAR::LESS-THAN SIGN>.
15201 @enMufDef:
15202 Entity replacement text cannot contain a
15203 |LESS-THAN SIGN| since it is referenced from an attribute
15204 value literal
15205 @ecore:hasParameter: xp|error-token
15206
15207 WarnDef:
15208 @QName: xp|warning-attribute-definition-ignored
15209 @enDesc:
15210 An attribute definition is ignored because the same attribute
15211 is declared before.
15212 @enMufDef:
15213 Attribute definition for |%p (name => {<Q::xp|name>});| is ignored
15214 @ecore:hasParameter: xp|error-token
15215 @ecore:hasParameter:
15216 @@@: xp|name
15217 @@enDesc:
15218 The name of the attribute.
15219
15220 WFErrDef:
15221 @QName: xp|wf-legal-character
15222 @enDesc:
15223 Characters referred to using character references <kwd:MUST>
15224 match the production for <CODE::Char>.
15225 @enMufDef:
15226 Reference to character %character-code-point
15227 (v => {<Q::xp|character-number>}); is not allowed
15228 @ecore:hasParameter: xp|error-token
15229 @ecore:hasParameter:
15230 @@@: xp|character-number
15231 @@enDesc:
15232 The code position of the character being referred.
15233 @ecore:hasParameter:
15234 @@@: xp|parent
15235 @@enDesc:
15236 The parent node in which the character reference has
15237 occurred, if available.
15238
15239 WFErrDef:
15240 @QName: xp|wf-entity-declared
15241 @enDesc:
15242 {P:: In a document
15243
15244 - without any DTD,
15245
15246 - with only an internal DTD subset that contains no parameter
15247 entity references, or
15248
15249 - with <XML::standalone="yes">,
15250
15251 for an entity reference that does not occur within the external
15252 subset or a parameter entity, the <CODE::Name> given in the
15253 entity reference <kwd:MUST> match the <CODE::Name> does not
15254 occur within the external subset or a parameter entity,
15255 except that five predefined character entities need not
15256 be declared. The declaration of a general entity <kwd:MUST>
15257 precede any reference to it which appears in a default value
15258 in an attribute list declaration.
15259 @enMufDef:
15260 Entity |%p (name => {<Q::xp|name>});| must be declared
15261 in the internal subset
15262 @ecore:hasParameter: xp|error-token
15263 @ecore:hasParameter:
15264 @@@: xp|name
15265 @@enDesc:
15266 The name of the entity.
15267
15268 WFErrDef:
15269 @QName: xp|wf-parsed-entity
15270 @enDesc:
15271 An entity reference <kwd:MUST-NOT> contain the name of an
15272 unparsed entity.
15273 @enMufDef:
15274 Entity |%p (name => {<Q::xp|name>});| is an unparsed entity
15275 @ecore:hasParameter: xp|error-token
15276 @ecore:hasParameter:
15277 @@@: xp|name
15278 @@enDesc:
15279 The name of the entity.
15280
15281 WFErrDef:
15282 @QName: xp|wf-no-recursion
15283 @enDesc:
15284 A parsed entity <kwd:MUST-NOT> contain a recursive reference
15285 to itself, either directly or indirectly.
15286 @enMufDef:
15287 Entity |%p (name => {<Q::xp|name>});| is recursively referenced
15288 @ecore:hasParameter: xp|error-token
15289 @ecore:hasParameter:
15290 @@@: xp|name
15291 @@enDesc:
15292 The name of the entity.
15293
15294 FatalErrDef:
15295 @QName: xp|fatal-xml11-end-of-line-in-xml-declaration
15296 @enDesc:
15297 An end-of-line character <CODE::U+0085> or <CODE::U+2028> is appeared
15298 within an XML declaration or text declaration.
15299 @enMufDef:
15300 End-of-line character %character-code-point
15301 (v => {<Q::xp|character-number>}); cannot be used within the
15302 XML or text declaration
15303 @ecore:hasParameter:
15304 @@@: xp|character-number
15305 @@enDesc:
15306 The code position of the end-of-line character.
15307
15308 ErrDef:
15309 @QName: xp|error-internal-predefined-entity
15310 @enDesc:
15311 A general entity declaration whose <CODE::Name> equals to one
15312 of predefined entities <kwd:MUST> declare it as an internal entity.
15313 @enMufDef:
15314 Entity |%p (name => {<Q::xp|name>});| must be declared as an
15315 internal entity
15316 @ecore:hasParameter: xp|error-token
15317 @ecore:hasParameter:
15318 @@@: xp|name
15319 @@enDesc:
15320 The name of the entity.
15321
15322 ErrDef:
15323 @QName: xp|error-malformed-predefined-entity
15324 @enDesc:
15325 A general entity declaration whose <CODE::Name> equals to one
15326 of predefined entities <kwd:MUST> declare it as a data
15327 character for the entity.
15328 @enMufDef:
15329 Entity declaration for |%p (name => {<Q::xp|name>});|
15330 (replacement text |%p (name => {<Q::xp|replacement-text>});|) is malformed
15331 @ecore:hasParameter: xp|error-token
15332 @ecore:hasParameter:
15333 @@@: xp|name
15334 @@enDesc:
15335 The name of the entity.
15336 @ecore:hasParameter:
15337 @@@: xp|replacement-text
15338 @@enDesc:
15339 The replacement text of the entity declaration.
15340
15341 WarnDef:
15342 @QName: xp|warning-entity-declaration-ignored
15343 @enDesc:
15344 An entity declaration is ignored because the same entity
15345 is declared before.
15346 @enMufDef:
15347 Entity declaration for |%p (name => {<Q::xp|name>});| is ignored
15348 @ecore:hasParameter: xp|error-token
15349 @ecore:hasParameter:
15350 @@@: xp|name
15351 @@enDesc:
15352 The name of the entity.
15353
15354 VCErrDef:
15355 @QName: xp|vc-unique-notation-name
15356 @enDesc:
15357 A <CODE::Name> <kwd:MUST-NOT> be declared in more than
15358 one notation declaration.
15359 @enMufDef:
15360 Notation |%p (name => {<Q::xp|name>});| is already declared
15361 @ecore:hasParameter: xp|error-token
15362 @ecore:hasParameter:
15363 @@@: xp|name
15364 @@enDesc:
15365 The name of the notation.
15366
15367 WarnDef:
15368 @QName: xp|warning-entity-declaration-not-processed
15369 @enDesc:
15370 An entity declaration is not processed because there
15371 is a reference to parameter entity before the declaration
15372 and the entity is not read.
15373 @enMufDef:
15374 Entity declaration for |%p (name => {<Q::xp|name>});| is not processed
15375 @ecore:hasParameter: xp|error-token
15376 @ecore:hasParameter:
15377 @@@: xp|name
15378 @@enDesc:
15379 The name of the entity.
15380
15381 WarnDef:
15382 @QName: xp|warning-attribute-definition-not-processed
15383 @enDesc:
15384 An attribute definition is not processed because there
15385 is a reference to parameter entity before the declaration
15386 and the entity is not read.
15387 @enMufDef:
15388 Attribute definition for |%p (name => {<Q::xp|name>});| is not processed
15389 @ecore:hasParameter: xp|error-token
15390 @ecore:hasParameter:
15391 @@@: xp|name
15392 @@enDesc:
15393 The name of the attribute.
15394
15395 NSFatalErrDef:
15396 @QName: xp|nswf-legal-ncname
15397 @enDesc:
15398 <CODE::Name>s other than element type names and attribute names
15399 <kwd:MUST> be <CODE::NCName>s.
15400 @enMufDef:
15401 <CODE::Name> |%p (name => {<Q::xp|name>});| is not an <CODE::NCName>
15402 @ecore:hasParameter: xp|error-token
15403 @ecore:hasParameter:
15404 @@@: xp|name
15405 @@enDesc:
15406 The name.
15407 @ecore:hasParameter:
15408 @@@: infoset|version
15409 @@enDesc:
15410 The version of XML in use.
15411
15412 NSFatalErrDef:
15413 @QName: xp|nswf-legal-qname
15414 @enDesc:
15415 An element type name or an attribute name <kwd:MUST> be a
15416 <CODE::QName>.
15417 @enMufDef:
15418 <CODE::Name> |%p (name => {<Q::xp|name>});| is not a <CODE::QName>
15419 @ecore:hasParameter: xp|error-token
15420 @ecore:hasParameter:
15421 @@@: xp|name
15422 @@enDesc:
15423 The name.
15424 @ecore:hasParameter:
15425 @@@: infoset|version
15426 @@enDesc:
15427 The version of XML in use.
15428
15429 NSCErrDef:
15430 @QName: xp|nsc-reserved-prefix-xml
15431 @enDesc:
15432 The prefix <XML::xml> <kwd:MUST-NOT> be undeclared or bound
15433 to any namespace name other than <URI::http://www.w3.org/XML/1998/namespace>.
15434 @enMufDef:
15435 Namespace prefix |xml| cannot be bound to namespace
15436 name |%p (name => {<Q::infoset|namespaceName>});|
15437 @ecore:hasParameter: xp|error-token
15438 @ecore:hasParameter:
15439 @@@: infoset|prefix
15440 @@enDesc:
15441 The namespace prefix.
15442 @ecore:hasParameter:
15443 @@@: infoset|namespaceName
15444 @@enDesc:
15445 The namespace name bound to or an empty string for undeclaring.
15446
15447 NSCErrDef:
15448 @QName: xp|nsc-reserved-namespace-name-xml
15449 @enDesc:
15450 Namespace prefixes other than <XML::xml> <kwd:MUST-NOT> be bound
15451 to the namespace name <URI::http://www.w3.org/XML/1998/namespace>.
15452 @enMufDef:
15453 Namespace prefix |%p (name => {<Q::infoset|prefix>});| cannot be
15454 bound to namespace name |http://www.w3.org/XML/1998/namespace|
15455 @enImplNote:
15456 The XMLNames spec does not prohibit the URI bound to
15457 the default namespace (!)
15458 @ecore:hasParameter: xp|error-token
15459 @ecore:hasParameter:
15460 @@@: infoset|prefix
15461 @@enDesc:
15462 The namespace prefix or <DOM::null> for default namespace.
15463 @ecore:hasParameter:
15464 @@@: infoset|namespaceName
15465 @@enDesc:
15466 The namespace name bound to.
15467
15468 NSCErrDef:
15469 @QName: xp|nsc-reserved-prefix-xmlns
15470 @enDesc:
15471 The prefix <XML::xmlns> <kwd:MUST-NOT> be declared or undeclared.
15472 @enMufDef:
15473 Namespace prefix |xmlns| cannot be declared or undeclared
15474 @ecore:hasParameter: xp|error-token
15475 @ecore:hasParameter:
15476 @@@: infoset|prefix
15477 @@enDesc:
15478 The namespace prefix.
15479 @ecore:hasParameter:
15480 @@@: infoset|namespaceName
15481 @@enDesc:
15482 The namespace name bound to or an empty string for undeclaring.
15483
15484 NSCErrDef:
15485 @QName: xp|nsc-reserved-namespace-name-xmlns
15486 @enDesc:
15487 Namespace prefixes <kwd:MUST-NOT> be bound
15488 to the namespace name <URI::http://www.w3.org/2000/xmlns/>.
15489 @enMufDef:
15490 Namespace prefix |%p (name => {<Q::infoset|prefix>});| cannot be
15491 bound to namespace name |http://www.w3.org/2000/xmlns/|
15492 @enImplNote:
15493 The XMLNames spec does not prohibit the URI bound to
15494 the default namespace (!)
15495 @ecore:hasParameter: xp|error-token
15496 @ecore:hasParameter:
15497 @@@: infoset|prefix
15498 @@enDesc:
15499 The namespace prefix or <DOM::null> for default namespace.
15500 @ecore:hasParameter:
15501 @@@: infoset|namespaceName
15502 @@enDesc:
15503 The namespace name bound to.
15504
15505 NSCErrDef:
15506 @QName: xp|nsc-prefix-declared
15507 @enDesc:
15508 A namespace prefix other than <XML::xml> or <XML::xmlns>
15509 <kwd:MUST> have been declared in a namespace declaration
15510 attribute in either the start or empty element tag of the
15511 element where the prefix is used or in an ancestor
15512 element. Furthermore, the attribute value in the innermost
15513 such declaration <kwd:MUST-NOT> be an empty string.
15514 @enMufDef:
15515 Namespace prefix |%p (name => {<Q::infoset|prefix>});| in
15516 qualified name |%p (name => {<Q::xp|name>});| is not declared
15517 @ecore:hasParameter: xp|error-token
15518 @ecore:hasParameter:
15519 @@@: infoset|prefix
15520 @@enDesc:
15521 The namespace prefix.
15522 @ecore:hasParameter:
15523 @@@: xp|name
15524 @@enDesc:
15525 The qualified name.
15526
15527 NSFatalErrDef:
15528 @QName: xp|nswf-empty-namespace-name
15529 @enDesc:
15530 If the XML version of the document is 1.0 and the
15531 normalized value of the prefixed namespace declaration attribute is empty.
15532 @enMufDef:
15533 Namespace |%p (name => {<Q::infoset|prefix>});| cannot be
15534 undeclared in XML 1.0
15535 @ecore:hasParameter: xp|error-token
15536 @ecore:hasParameter:
15537 @@@: infoset|prefix
15538 @@enDesc:
15539 The namespace prefix.
15540 @ecore:hasParameter:
15541 @@@: infoset|namespaceName
15542 @@enDesc:
15543 An empty string.
15544
15545 NSFatalErrDef:
15546 @QName: xp|nswf-unique-att-spec-expanded-name
15547 @enDesc:
15548 No element may have two attributes that have qualified name
15549 with the same local part and with namespace prefixes
15550 that have been bound to namespace names that are identical.
15551 @enMufDef:
15552 Attribute |%p (name => {<Q::infoset|localName>});| in
15553 namespace |%p (name => {<Q::infoset|namespaceName>});| is
15554 attached to the same element more than once (as
15555 |%p (name => {<Q::xp|name>});| and
15556 |%p (name => {<Q::xp|another-attribute-name>});|)
15557 @enImplNote:
15558 The XMLNames spec doesn't mention default attributes
15559 for this constraint...
15560 @ecore:hasParameter: xp|error-token
15561 @ecore:hasParameter:
15562 @@@: infoset|localName
15563 @@enDesc:
15564 The local part of the attribute.
15565 @ecore:hasParameter:
15566 @@@: infoset|namespaceName
15567 @@enDesc:
15568 The namespace URI of the attribute.
15569 @ecore:hasParameter:
15570 @@@: xp|name
15571 @@enDesc:
15572 The name, i.e. a qualified name consist of <Q::infoset:localName>
15573 and <Q::infoset:namespaceName> parameter values.
15574 @ecore:hasParameter:
15575 @@@: xp|another-attribute-name
15576 @@enDesc:
15577 Another attribute qualified name expanded to the same expanded name
15578 as <Q::xp|name>.
15579
15580 XWParam:
15581 @QName: xp|another-attribute-name
15582
15583 XWParam:
15584 @QName: xp|replacement-text
15585 @enDesc:
15586 The replacement text.
15587
15588 XWParam:
15589 @QName: xp|error-token
15590 @enDesc:
15591 The token where the parser found an error.
15592
15593 XWParam:
15594 @QName: xp|name
15595 @enDesc:
15596 A name.
15597
15598 XWParam:
15599 @QName: xp|parent
15600 @enDesc:
15601 The parent node in which the error occurs.
15602
15603 XWParam:
15604 @QName: xp|node
15605 @enDesc:
15606 The current node.
15607
15608 XWParam:
15609 @QName: xp|actual-element-type
15610 @enDesc:
15611 The actual element type name occured in the source.
15612
15613 XWParam:
15614 @QName: xp|expected-element-type
15615 @enDesc:
15616 The element type name expected.
15617
15618 XWParam:
15619 @QName: xp|character-number
15620 @enDesc:
15621 The character code position.
15622
15623 ElementTypeBinding:
15624 @Name: XWParam
15625 @ElementType:
15626 dis:ResourceDef
15627 @ShadowContent:
15628 @@For: =ManakaiDOM|all
15629 @@rdf:type: ecore|Parameter
15630
15631 ElementTypeBinding:
15632 @Name:enMufDef
15633 @ElementType:
15634 ecore:defaultMessage
15635 @ShadowContent:
15636 @@lang:en
15637 @@ContentType:
15638 lang:muf
15639
15640 ResourceDef:
15641 @QName: DOMImpl
15642 @AliasFor: DOMCore|DOMImplementation
15643 @For: ManakaiDOM|DOM
15644
15645 ResourceDef:
15646 @QName: LSInput
15647 @AliasFor: DOMLS|LSInput
15648 @For: ManakaiDOM|DOM
15649
15650 ResourceDef:
15651 @QName: LSParser
15652 @AliasFor: DOMLS|LSParser
15653 @For: ManakaiDOM|DOM
15654
15655 ElementTypeBinding:
15656 @Name: Attr
15657 @ElementType:
15658 dis:ResourceDef
15659 @ShadowContent:
15660 @@rdf:type: DISLang|Attribute
15661 @@ForCheck: !=ManakaiDOM|ManakaiDOM
15662
15663 ElementTypeBinding:
15664 @Name: Get
15665 @ElementType:
15666 dis:ResourceDef
15667 @ShadowContent:
15668 @@rdf:type: DISLang|AttributeGet
15669
15670 ElementTypeBinding:
15671 @Name: Set
15672 @ElementType:
15673 dis:ResourceDef
15674 @ShadowContent:
15675 @@rdf:type: DISLang|AttributeSet
15676
15677 ElementTypeBinding:
15678 @Name: enDesc
15679 @ElementType:
15680 dis:Description
15681 @ShadowContent:
15682 @@lang:en
15683
15684 ElementTypeBinding:
15685 @Name: Method
15686 @ElementType:
15687 dis:ResourceDef
15688 @ShadowContent:
15689 @@rdf:type: DISLang|Method
15690 @@For: !=ManakaiDOM|ManakaiDOM
15691
15692 ElementTypeBinding:
15693 @Name: Return
15694 @ElementType:
15695 dis:ResourceDef
15696 @ShadowContent:
15697 @@rdf:type: DISLang|MethodReturn
15698
15699 ElementTypeBinding:
15700 @Name: Param
15701 @ElementType:
15702 dis:ResourceDef
15703 @ShadowContent:
15704 @@rdf:type: DISLang|MethodParameter
15705
15706 ElementTypeBinding:
15707 @Name: PerlDef
15708 @ElementType:
15709 dis:Def
15710 @ShadowContent:
15711 @@ContentType: lang|Perl
15712
15713 ElementTypeBinding:
15714 @Name: PerlDefC
15715 @ElementType:
15716 dis:Def
15717 @ShadowContent:
15718 @@ContentType: lang|Perl
15719
15720 ElementTypeBinding:
15721 @Name: PropDef
15722 @ElementType:
15723 dis:ResourceDef
15724 @ShadowContent:
15725 @@rdf:type: rdf|Property
15726
15727 ClsDef:
15728 @ClsQName: ManakaiXMLParserExceptionFormatter
15729
15730 @ClsISA: ecore|MUErrorFormatter||ManakaiDOM|Perl
15731
15732 @RuleDef:
15733 @@Name: xp-error-token-type
15734 @@enDesc:
15735 The type of the token the parser is encountered.
15736
15737 @@Method:
15738 @@@Name: after
15739 @@@Param:
15740 @@@@Name: name
15741 @@@@Type: DOMString
15742 @@@@enDesc: The name of the method.
15743 @@@Param:
15744 @@@@Name: p
15745 @@@@Type: DISPerl|HASH
15746 @@@@enDesc: The set of the parameters to the method.
15747 @@@Param:
15748 @@@@Name: o
15749 @@@@Type: DISPerl|HASH
15750 @@@@enDesc: The option value.
15751 @@@Return:
15752 @@@@PerlDef:
15753 $p->{-result} = $o->{<H::xp|error-token>}->{type}
15754 if defined $o->{<H::xp|error-token>}->{type};
15755
15756 @RuleDef:
15757 @@Name: xp-error-token-value
15758 @@enDesc:
15759 The value of the token the parser is encountered, if any.
15760
15761 @@Method:
15762 @@@Name: after
15763 @@@Param:
15764 @@@@Name: name
15765 @@@@Type: DOMString
15766 @@@@enDesc: The name of the method.
15767 @@@Param:
15768 @@@@Name: p
15769 @@@@Type: DISPerl|HASH
15770 @@@@enDesc: The set of the parameters to the method.
15771 @@@Param:
15772 @@@@Name: o
15773 @@@@Type: DISPerl|HASH
15774 @@@@enDesc: The option value.
15775 @@@Return:
15776 @@@@PerlDef:
15777 $p->{-result} = $o->{<H::xp|error-token>}->{value}
15778 if defined $o->{<H::xp|error-token>}->{value};
15779
15780 @RuleDef:
15781 @@Name: xp-error-lines
15782 @@enDesc:
15783 A copy of fragment of the source text that contains the line
15784 where the error occurred, if available.
15785
15786 @@Method:
15787 @@@Name: after
15788 @@@Param:
15789 @@@@Name: name
15790 @@@@Type: DOMString
15791 @@@@enDesc: The name of the method.
15792 @@@Param:
15793 @@@@Name: p
15794 @@@@Type: DISPerl|HASH
15795 @@@@enDesc: The set of the parameters to the method.
15796 @@@Param:
15797 @@@@Name: o
15798 @@@@Type: DISPerl|HASH
15799 @@@@enDesc: The option value.
15800 @@@Return:
15801 @@@@PerlDef:
15802 my $pos = $o-><AG::DOMCore|DOMError.location>
15803 -><AG::DOMCore|DOMLocator.utf32Offset>;
15804 my $src = $o->{<H::ecore|object>}->{entity}->[-1]->{reptxt};
15805 if (defined $src and $pos > -1) {
15806 my $start = $pos;
15807 $start = rindex ($$src, "\x0A", $start - 1) for 0..2;
15808 $start++;
15809 my $end = $pos;
15810 $end = index ($$src, "\x0A", $end + 1) for 0..2;
15811 $end = length $$src if $end < 0;
15812 $p->{-result} = substr $$src, $start, $end - $start;
15813 }
15814
15815 @RuleDef:
15816 @@Name: character-code-point
15817 @@enDesc:
15818 The character code position, in <CODE::U+<VAR::HHHH>> notation.
15819
15820 @@Method:
15821 @@@Name: after
15822 @@@Param:
15823 @@@@Name: name
15824 @@@@Type: DOMString
15825 @@@@enDesc: The name of the method.
15826 @@@Param:
15827 @@@@Name: p
15828 @@@@Type: DISPerl|HASH
15829 @@@@enDesc: The set of the parameters to the method.
15830 @@@Param:
15831 @@@@Name: o
15832 @@@@Type: DISPerl|HASH
15833 @@@@enDesc: The option value.
15834 @@@RuleParam:
15835 @@@@Name: v
15836 @@@@Type: DISPerl|Number
15837 @@@@enDesc:
15838 The name of the error parameter that contains the character code.
15839 @@@Return:
15840 @@@@PerlDef:
15841 $p->{-result} = sprintf 'U+%04X', $o->{$p->{v}};
15842 ##XMLParserExceptionFormatter
15843
15844 ElementTypeBinding:
15845 @Name: CParam
15846 @ElementType:
15847 dis:ResourceDef
15848 @ShadowContent:
15849 @@rdf:type:
15850 @@@@: c|DOMConfigurationParameter
15851 @@@For: ManakaiDOM|DOM
15852 @@rdf:type:
15853 @@@@: DISCore|Property
15854 @@@For: =ManakaiDOM|all
15855 @@For: ManakaiDOM|DOM3
15856 @@For: =ManakaiDOM|all
15857
15858 ElementTypeBinding:
15859 @Name: CParamApp
15860 @ElementType:
15861 dis:ResourceDef
15862 @ShadowContent:
15863 @@rdf:type:
15864 @@@@: c|DOMConfigurationParameterApplication
15865 @@@For: ManakaiDOM|DOM
15866 @@For: ManakaiDOM|DOM3
15867
15868 CParamApp:
15869 @QName: error-handler
15870 @c:domConfigurationParameter: c|error-handler
15871 @c:targetType: xp|ManakaiXMLParser
15872
15873 CParam:
15874 @QName: xp|ls-input-to-input-file
15875 @DOMLS:lsKey:
15876 @@@: i2i
15877 @@For: =ManakaiDOM|all
15878 @Type: ManakaiDOMLSInputToInputFile
15879 @c:targetType: xp|ManakaiXMLParser
15880 @IsSupportRequired: 1
15881 @c:isSupported: 1
15882 @enDesc:
15883 An <IF::LSInput> to Perl filehandle converter.
15884
15885 @Method:
15886 @@rdf:type: c|DOMConfigurationParameterDefaultGetter
15887 @@Param:
15888 @@@Name: name
15889 @@@Type: DOMString
15890 @@@dis:actualType: c|DOMConfigurationParameterName
15891 @@@enDesc: The parameter name.
15892 @@Return:
15893 @@@Type: ManakaiDOMLSInputToInputFile
15894 @@@enDesc:
15895 The default resolver.
15896 @@@PerlDefC:
15897 $r = sub {
15898 my ($self, $input, $errorHandler) = @_;
15899 ## As defined in DOM Level 3 LS |LSInput| interface
15900
15901 my $r = {};
15902
15903 __DEEP{
15904
15905 FH: {
15906 ## 1. |characterStream|
15907 my $v = $input-><AG::LSInput.characterStream>;
15908 if (defined $v) {
15909 $r->{filehandle} = $v;
15910 last FH;
15911 }
15912
15913 ## 2. |byteStream|
15914 $v = $input-><AG::LSInput.byteStream>;
15915 if (defined $v) {
15916 ## TODO: Support byte filehandle
15917 ## |encoding|
15918 ## TODO: How to guess?
15919 return null;
15920 }
15921
15922 ## 3. |stringData|
15923 $v = $input-><AG::LSInput.stringData>;
15924 if (defined $v) {
15925 require IO::String;
15926 $r->{filehandle} = IO::String->new ($v);
15927 last FH;
15928 }
15929
15930 ## 4. |systemId|
15931 ## TODO:
15932 ## resolve relative URI
15933 ## open
15934 ## set document_uri
15935
15936 ## 5. |publicId|
15937 ## The default resolver does not support only-|publicId| input.
15938
15939 return null;
15940 } # FH
15941
15942 DURI: {
15943 last DURI if defined $r->{document_uri};
15944
15945 my $v = $input-><AG::LSInput.systemId>;
15946 if (defined $v) {
15947 $r->{document_uri} = $v;
15948 last DURI;
15949 }
15950
15951 ## TODO: pubid -> pubid URN -> document_uri
15952 } # DURI
15953
15954 BURI: {
15955 last BURI if defined $r->{base_uri};
15956
15957 my $v = $input-><AG::LSInput.baseURI>;
15958 if (defined $v) {
15959 $r->{base_uri} = $v;
15960 last BURI;
15961 }
15962
15963 if (defined $r->{document_uri}) {
15964 $r->{base_uri} = $r->{document_uri};
15965 }
15966 } # BURI
15967
15968 }__;
15969
15970 ## ISSUE: Is |certifiedText| required by parsers?
15971
15972 return $r;
15973 };
15974 @Method:
15975 @@rdf:type: c|DOMConfigurationParameterSetter
15976 @@Param:
15977 @@@Name: name
15978 @@@Type: DOMString
15979 @@@dis:actualType: c|DOMConfigurationParameterName
15980 @@@enDesc: The parameter name.
15981 @@Param:
15982 @@@Name: value
15983 @@@Type: DOMMain|DOMUserData
15984 @@@dis:actualType: ManakaiDOMLSInputToInputFile
15985 @@@enDesc: The new value.
15986 @@Return:
15987 @@@Type: idl|void||ManakaiDOM|all
15988 @@@PerlDefC:
15989 $self->[1]->{<H::xp|ls-input-to-input-file>} = $value;
15990 @@enImplNote:
15991 Implied input processor converts non-blessed code references
15992 into a <Class::ManakaiDOMLSInputToInputFile> object.
15993 @Method:
15994 @@rdf:type: c|DOMConfigurationParameterChecker
15995 @@Param:
15996 @@@Name: name
15997 @@@Type: DOMString
15998 @@@dis:actualType: c|DOMConfigurationParameterName
15999 @@@enDesc: The parameter name.
16000 @@Param:
16001 @@@Name: value
16002 @@@Type: DOMMain|DOMUserData
16003 #@@@dis:actualType: ManakaiDOMLSInputToInputFile
16004 @@@enDesc: The new value.
16005 @@Return:
16006 @@@Type: idl|boolean||ManakaiDOM|all
16007 @@@PerlDefC:
16008 $r = UNIVERSAL::isa ($value, 'CODE') or
16009 UNIVERSAL::isa ($value, <ClassName::ManakaiDOMLSInputToInputFile>);
16010
16011 @@Test:
16012 @@@QName: cp.ls-input-to-input-file.test
16013 @@@PerlDefC:
16014 my $xp;
16015 __CODE{createParserForTest:: $xp => $xp}__;
16016 my $cfg = $xp-><AG::LSInput.domConfig>;
16017
16018 my $cp = <Q::xp|ls-input-to-input-file>;
16019
16020 $test->id ('default');
16021 my $default = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
16022 $test->assert_isa ($default,
16023 <ClassName::ManakaiDOMLSInputToInputFile>);
16024
16025 $test->id ('set');
16026 my $sub1 = sub { };
16027 $cfg-><M::c|DOMConfiguration.setParameter> ($cp => $sub1);
16028 my $sub2 = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
16029 $test->assert_isa ($sub2, <ClassName::ManakaiDOMLSInputToInputFile>);
16030 $test->assert_equals ($sub2, $sub1);
16031
16032 $test->id ('reset');
16033 $cfg-><M::c|DOMConfiguration.setParameter> ($cp => null);
16034 my $sub3 = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
16035 $test->assert_isa ($sub3, <ClassName::ManakaiDOMLSInputToInputFile>);
16036 $test->assert_equals ($sub3, $default);
16037 ##ls-input-to-input-file
16038
16039 ClsDef:
16040 @ClsQName: ManakaiDOMLSInputToInputFile
16041 @enDesc:
16042 An <Class::ManakaiDOMLSInputToInputFile> object is used to covert
16043 a <IF::LSInput> object into a Perl filehandle.
16044
16045 {ISSUE::
16046 In which module this class should be placed?
16047
16048 Better interface name?
16049 }
16050
16051 @enDesc:
16052 @@ddid: perl
16053 @@ForCheck: ManakaiDOM|ManakaiDOM
16054 @@@:
16055 For Perl binding, any parameter that accepts
16056 a <Class::ManakaiDOMLSInputToInputFile> would also accept a Perl code
16057 reference (subroutine reference). The code reference
16058 will be blessed as a <Class::ManakaiDOMLSInputToInputFile> whose
16059 <M::ManakaiDOMLSInputToInputFile.resolveLSInput> method invokes the code.
16060
16061 @ResourceDef:
16062 @@rdf:type: DISLang|InputProcessor
16063 @@rdf:type: DISLang|OutputProcessor
16064 @@PerlDef:
16065 $INPUT = bless $INPUT, <ClassName::ManakaiDOMLSInputToInputFile>
16066 if ref $INPUT eq 'CODE';
16067
16068 @Method:
16069 @@Name: resolveLSInput
16070 @@enDesc:
16071 Converts a <IF::LSInput> into a Perl filehandle.
16072 @@Param:
16073 @@@Name: input
16074 @@@Type: LSInput
16075 @@@enDesc:
16076 The input.
16077 @@Param:
16078 @@@Name: errorHandler
16079 @@@Type: c|DOMErrorHandler
16080 @@@enDesc:
16081 An error handler. If the method encounters an error
16082 or warning, it <kwd:MAY> notify it to application
16083 via this handler.
16084 @@Return:
16085 @@@Type: ManakaiDOMInputFile
16086 @@@enDesc:
16087 A <Class::ManakaiDOMInputFile> object created from <P::input>.
16088 @@@nullCase:
16089 @@@@enDesc:
16090 If the method was unable to resolve the <P::input>.
16091
16092 {ISSUE::
16093 Should we allow the method to throw exceptions?
16094 }
16095 @@@PerlDef:
16096 __DEEP{
16097 $r = $self->($self, $input, $errorHandler);
16098 }__;
16099 @@@enImplNote:
16100 Notet that the input / output processor for <CODE::$input>
16101 and return value might or might not be inserted in
16102 the <Perl::$self> code.
16103 ##LSInputToInputFile
16104
16105 ClsDef:
16106 @ClsQName: ManakaiDOMInputFile
16107 @enDesc:
16108 A set of information on the input, including filehandle.
16109
16110 @enDesc:
16111 @@ddid: perl
16112 @@ForCheck: ManakaiDOM|ManakaiDOM
16113 @@@:
16114 For Perl binding, any parameter that accepts
16115 a <Class::ManakaiDOMInputFile> would also accept a Perl hash reference.
16116 If a hash reference is given to parameter that expects
16117 a <Class::ManakaiDOMInputFile> object, then it
16118 bless the hash with the class.
16119
16120 Each attributes defined
16121 in the class is associated to the hash value with the
16122 key equals to the attribut name. Each method defined in
16123 the class will invoke the code reference retrieved
16124 from the hash by the key equals to the method name.
16125
16126 If there is no value in the hash for an attribute,
16127 then its value is <DOM::null>.
16128
16129 @ResourceDef:
16130 @@rdf:type: DISLang|InputProcessor
16131 @@rdf:type: DISLang|OutputProcessor
16132 @@PerlDef:
16133 $INPUT = bless $INPUT, <ClassName::ManakaiDOMInputFile>
16134 if ref $INPUT eq 'HASH';
16135
16136 @Attr:
16137 @@Name: filehandle
16138 @@Type: DISPerl|filehandle||ManakaiDOM|all
16139 @@enDesc:
16140 The input filehandle.
16141
16142 It <kwd:MUST> be an <Perl::open>ed (and not <Perl::close>d)
16143 filehandle. Note that
16144 it does not have to be associated with an actual file
16145 in the local file system.
16146
16147 It <kwd:MUST> return a character (rather than byte)
16148 by <Perl::getc>.
16149 @@Get:
16150 @@@PerlDef: $r = $self->{filehandle};
16151 @@Set:
16152 @@@PerlDef: $self->{filehandle} = $given;
16153
16154 @Attr:
16155 @@Name: baseURI
16156 @@enDesc:
16157 The base URI of the input.
16158
16159 It <kwd:MUST> be an absolute DOM URI or <DOM::null>.
16160 Otherwise, the result is undefined.
16161 @@Type: DOMString
16162 @@nullCase:
16163 @@@enDesc:
16164 If the base URI is not available.
16165 @@Get:
16166 @@@PerlDef: $r = $self->{base_uri};
16167 @@Set:
16168 @@@PerlDef: $self->{base_uri} = $given;
16169
16170 @Attr:
16171 @@Name: documentURI
16172 @@enDesc:
16173 The URI of the document.
16174
16175 It <kwd:MUST> be an absolute DOM URI or <DOM::null>.
16176 Otherwise, the result is undefined.
16177 @@Type: DOMString
16178 @@nullCase:
16179 @@@enDesc:
16180 If the document URI is not available.
16181 @@Get:
16182 @@@PerlDef: $r = $self->{document_uri};
16183 @@Set:
16184 @@@PerlDef: $self->{document_uri} = $given;
16185
16186 @Method:
16187 @@Name: close
16188 @@enDesc:
16189 Closes the file.
16190
16191 Since when the Perl's destructor is invoked is unreliable,
16192 this method is explicitly called when the file is no longer
16193 in use.
16194
16195 If the <Class::ManakaiDOMInputFile> is given as a hash
16196 reference and whose value for <CODE::close> is not defined,
16197 then the statement <Perl::close $filehandle> is done
16198 (where <Perl::$filehandle> is the <A::ManakaiDOMInputFile.filehandle>
16199 value).
16200 @@Return:
16201 @@@PerlDef:
16202 __DEEP{
16203 if ($self->{close}) {
16204 $self->{close}->($self);
16205 } else {
16206 close $self->{filehandle};
16207 }
16208 }__;
16209 ##ManakaiDOMInputFile
16210
16211
16212

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24