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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by wakaba, Thu Feb 9 10:23:19 2006 UTC revision 1.32 by wakaba, Sat Mar 11 12:12:38 2006 UTC
# Line 71  Namespace: Line 71  Namespace:
71      http://suika.fam.cx/~wakaba/archive/2004/dom/tree#      http://suika.fam.cx/~wakaba/archive/2004/dom/tree#
72    @test:    @test:
73      http://suika.fam.cx/~wakaba/archive/2004/dis/Test#      http://suika.fam.cx/~wakaba/archive/2004/dis/Test#
74      @urigen:
75        http://suika.fam.cx/~wakaba/archive/2005/manakai/URI/Generic/
76    @x:    @x:
77      http://suika.fam.cx/~wakaba/archive/2004/dom/xml#      http://suika.fam.cx/~wakaba/archive/2004/dom/xml#
78    @xml:    @xml:
# Line 187  ElementTypeBinding: Line 189  ElementTypeBinding:
189      @@Value:      @@Value:
190        @@@is-null:1        @@@is-null:1
191    
192    ElementTypeBinding:
193      @Name: TrueCase
194      @ElementType:
195        dis:ResourceDef
196      @ShadowContent:
197        @@rdf:type:
198          ManakaiDOM:InCase
199        @@Value:
200          @@@@: 1
201          @@@ContentType: DISCore|Boolean
202        @@Type: idl|boolean||ManakaiDOM|all
203    
204    ElementTypeBinding:
205      @Name: FalseCase
206      @ElementType:
207        dis:ResourceDef
208      @ShadowContent:
209        @@rdf:type:
210          ManakaiDOM:InCase
211        @@Value:
212          @@@@: 0
213          @@@ContentType: DISCore|Boolean
214        @@Type: idl|boolean||ManakaiDOM|all
215    
216  ResourceDef:  ResourceDef:
217    @QName: LSParser    @QName: LSParser
218    @AliasFor: DOMLS|LSParser    @AliasFor: DOMLS|LSParser
# Line 197  ClsDef: Line 223  ClsDef:
223        
224    @Implement: DOMLS|LSParser    @Implement: DOMLS|LSParser
225    
226    @f:implements:    @f:implements: DOMLS|LSFeature30
227      @@@: DOMLS|LSFeature30    @f:implements: DOMLS|ParseString10
228      @@For: ManakaiDOM|DOM3    @enImplNote:
229        @@ddid: dtdfeature
230        @@@:
231          {TODO::
232            Once DTD validation is implemented, add <Q::f:implements>
233            for XML-DTD-feature.
234          }
235    
236    @DISLang:role: gls|ParserRole    @DISLang:role: gls|ParserRole
237    
# Line 219  ClsDef: Line 251  ClsDef:
251      might be far from the ones obtained when the error would not      might be far from the ones obtained when the error would not
252      be found.      be found.
253    
254      @Test:
255        @@QName: GLSImpl.createGLSParser.LS.test
256        @@enDesc:
257          Since there is at least one implementation of the feature (i.e.
258          this class), the <M::gls|GLSImplementation.createGLSParser>
259          must not throw an exception.
260        @@PerlDef:
261          my $impl;
262          __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
263          
264          my $p = $impl-><M::gls|GLSImplementation.createGLSParser>
265                           ({LS => '3.0'});
266    
267          $test->assert_isa ($p, <IFName::LSParser>);
268      @Test:
269        @@QName: GLSImpl.createGLSParser.ParseXMLString.test
270        @@enDesc:
271          Since there is at least one implementation of the feature (i.e.
272          this class), the <M::gls|GLSImplementation.createGLSParser>
273          must not throw an exception.
274        @@PerlDef:
275          my $impl;
276          __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
277          
278          my $p = $impl-><M::gls|GLSImplementation.createGLSParser>
279                           ({<Q::fe|ParseXMLString> => '1.0'});
280    
281          $test->assert_not_null ($p);
282      @Test:
283        @@QName: GLSImpl.createGLSParser.LS.ParseXMLString.test
284        @@enDesc:
285          Since there is at least one implementation of the feature (i.e.
286          this class), the <M::gls|GLSImplementation.createGLSParser>
287          must not throw an exception.
288        @@PerlDef:
289          my $impl;
290          __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
291          
292          my $p = $impl-><M::gls|GLSImplementation.createGLSParser>
293                           ({LS => '3.0', <Q::fe|ParseXMLString> => '1.0'});
294    
295          $test->assert_isa ($p, <IFName::LSParser>);
296    
297      @Test:
298        @@QName: DOMImplLS.createLSParser.1.test
299        @@enDesc:
300          Since there is at least one implementation of the feature (i.e.
301          this class), the <M::gls|GLSImplementation.createGLSParser>
302          must not throw an exception.
303        @@PerlDef:
304          my $impl;
305          __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
306          
307          my $p = $impl-><M::DOMLS|DOMImplementationLS.createLSParser>
308                           (<C::DOMLS|DOMImplementationLS.MODE_SYNCHRONOUS>);
309          $test->assert_isa ($p, <IFName::LSParser>);
310      @enImplNote:
311        @@ddid: lsparsertext
312        @@@:
313          Future version should add test:
314        @@QName: DOMImplLS.createLSParser.2.test
315        @@enDesc:
316          Since there is at least one implementation of the feature (i.e.
317          this class), the <M::gls|GLSImplementation.createGLSParser>
318          must not throw an exception.
319        @@PerlDef:
320          my $impl;
321          __CODE{DOMLS|createImplForTest:: $impl => $impl}__;
322          
323          my $p = $impl-><M::DOMLS|DOMImplementationLS.createLSParser>
324                           (<C::DOMLS|DOMImplementationLS.MODE_SYNCHRONOUS>,
325                            <Q::xml-dtd:>);
326          $test->assert_isa ($p, <IFName::LSParser>);
327    
328      @Test:
329        @@QName: Perl.open.utf8.strref.1.test
330        @@enDesc:
331          Does PerlIO works as intended?
332        @@PerlDef:
333          my $s = qq<\x{3001}\x0A\x{10001}>;
334          #open my $a, '<'.':utf8', \$s;
335          require IO::String;
336          my $a = IO::String->new ($s);
337          $test->assert_num_equals
338                   (actual_value => ord getc $a,
339                    expected_value => 0x3001);
340          $test->assert_num_equals
341                   (actual_value => ord getc $a,
342                    expected_value => 0x000A);
343          $test->assert_num_equals
344                   (actual_value => ord getc $a,
345                    expected_value => 0x10001);
346          $a->ungetc (0x10001);
347          $test->assert_num_equals
348                   (actual_value => ord getc $a,
349                    expected_value => 0x10001);
350          $test->assert_null (getc $a);
351          close $a;
352      @Test:
353        @@QName: Perl.open.8859.strref.2.test
354        @@enDesc:
355          Does PerlIO works as intended?
356        @@PerlDef:
357          my $s = qq<\x{0080}\x0A\x{00A9}>;
358          #open my $a, '<', \$s;
359          require IO::String;
360          my $a = IO::String->new ($s);
361          $test->assert_num_equals
362                   (actual_value => ord getc $a,
363                    expected_value => 0x0080);
364          $test->assert_num_equals
365                   (actual_value => ord getc $a,
366                    expected_value => 0x000A);
367          $test->assert_num_equals
368                   (actual_value => ord getc $a,
369                    expected_value => 0x00A9);
370          $a->ungetc (0x00A9);
371          $test->assert_num_equals
372                   (actual_value => ord getc $a,
373                    expected_value => 0x00A9);
374          $test->assert_null (getc $a);
375          close $a;
376    
377    @Attr:    @Attr:
378      @@Name: domConfig      @@Name: domConfig
379      @@enDesc:      @@enDesc:
# Line 231  ClsDef: Line 386  ClsDef:
386          __CODE{DOMCore|getConfigObject::          __CODE{DOMCore|getConfigObject::
387            $target => $self,            $target => $self,
388            $targetHash => $self,            $targetHash => $self,
389            $targetType => {<IFName::LSParser>},            $targetType => {<ClassName::xp|ManakaiXMLParser>},
390            $result => $r,            $result => $r,
391          }__;          }__;
392    
393      @Attr:
394        @@ForCheck: ManakaiDOM|ForClass
395        @@Name: async
396        @@enDesc:
397          Whether the parser is asynchronous or not.
398        @@Type: idl|boolean||ManakaiDOM|all
399        @@Get:
400          @@@FalseCase:
401            @@@@enDesc:
402              The parser does not in asynchronous mode.
403          @@@PerlDef: \
404        @@Test:
405          @@@QName: XMLParser.async.test
406          @@@PerlDef:
407            my $xp;
408            __CODE{createParserForTest:: $xp => $xp}__;
409    
410            $test->assert_false ($xp-><AG::DOMLS|LSParser.async>);
411    
412      @Attr:
413        @@ForCheck: ManakaiDOM|ForClass
414        @@Name: busy
415        @@enDesc:
416          Whether the parser is currently busy loading a document or not.
417        @@Type: idl|boolean||ManakaiDOM|all
418        @@Get:
419          @@@TrueCase:
420            @@@@enDesc:
421               The parser is currently busy.
422          @@@FalseCase:
423            @@@@enDesc:
424               The parser is not busy.
425          @@@PerlDef:
426            $r = $self->{<H::DOMLS|busy>};
427    
428      @enImplNote:
429        @@ddid: abort
430        @@@:
431          {ISSUE::
432            LSParser.abort:
433    
434              Is it required to support even in synchronous mode?
435          }
436    
437          {TODO::
438              LSParser.filter
439          }
440    
441      @ResourceDef:
442        @@QName: createParserForTest
443        @@ForCheck: ManakaiDOM|ForClass
444        @@rdf:type: DISPerl|BlockCode
445        @@PerlDef:
446          require Message::DOM::GenericLS;
447          $xp = <Class::ManakaiXMLParser>
448                  ->new (<Class::gls|ManakaiGLSImplementation>->_new, '');
449    
450    @Method:    @Method:
451      @@ManakaiDOM:isForInternal:1      @@ManakaiDOM:isForInternal:1
452      @@ForCheck: ManakaiDOM|ForClass      @@ForCheck: ManakaiDOM|ForClass
# Line 263  ClsDef: Line 475  ClsDef:
475          }, $self;          }, $self;
476    
477    @Method:    @Method:
478      @@Name: parseString      @@Name: parseURI
479      @@enImplNote:      @@enDesc:
480        Non-standard - to be removed        Parses an XML document identified by a DOM URI.
481    
482          It is equivalent to <M::.parse> method with its <P::input>
483          parameter set to a <IF::LSInput> object whose
484          <A::LSInput.systemId> set to <P::uri>.
485      @@Param:      @@Param:
486        @@@Name: sourceText        @@@Name: uri
487        @@@Type: DOMString        @@@Type: DOMString
488          @@@enDesc:
489            The DOM URI of the XML document to be read.
490      @@Return:      @@Return:
491        @@@Type: Document        @@@Type: Document
492          @@@enDesc:
493            The newly created and populated <IF::Document> node.
494          @@@dx:raises:
495            @@@@@: ManakaiDOMLS|MDOMLS_BUSY
496            @@@@enDesc:
497              If <A::LSParser.busy> is <DOM::true>.
498          @@@dx:raises:
499            @@@@@: DOMLS|PARSE_ERR
500            @@@@enDesc:
501              If the <IF::LSParser> was unable to load the document.
502        @@@PerlDef:        @@@PerlDef:
503            __DEEP{
504              $r = $self-><M::LSParser.parse> ({system_id => $uri});
505            }__;          
506    
507      @Method:
508        @@Name: parse
509        @@enDesc:
510          Parses an XML document from a resource identified
511          by a <IF::LSInput>.
512        @@Param:
513          @@@Name: input
514          @@@Type: LSInput
515          @@@enDesc:
516            The <IF::LSInput> from which the source of the document
517            is to be read.
518        @@Return:
519          @@@Type: Document
520          @@@enDesc:
521            The newly created and populated <IF::Document> node.
522          @@@dx:raises:
523            @@@@@: ManakaiDOMLS|MDOMLS_BUSY
524            @@@@enDesc:
525              If the <A::LSParser.busy> is <DOM::true>.
526          @@@dx:raises:
527            @@@@@: DOMLS|PARSE_ERR
528            @@@@enDesc:
529              If the <IF::LSParser> was unable to load the document.
530          @@@PerlDef:
531            if ($self->{<H::DOMLS|busy>}) {
532              __EXCEPTION{ManakaiDOMLS|MDOMLS_BUSY}__;
533            }
534            local $self->{<H::DOMLS|busy>} = true;
535    
536            my $in;
537            __DEEP{
538              $self->{parser_cfg} = $self-><AG::LSParser.domConfig>;
539                ## Parser's |domConfig| object.
540              $self->{in_in} = $self->{parser_cfg}
541                                    -><M::c|DOMConfiguration.getParameter>
542                                        (<Q::xp|ls-input-to-input-file>);
543              $in = $self->{in_in}-><M::ManakaiDOMLSInputToInputFile.resolveLSInput>
544                                      ($input,
545                                       $self->{parser_cfg}
546                                            -><M::c|DOMConfiguration.getParameter>
547                                                ('error-handler'));
548            }__;
549            unless (defined $in) {
550              __c|ERROR{DOMLS|no-input-specified::
551                MDOMX:param-name => 'input',
552              }__;
553              __CODE{ParseError}__;
554            }
555    
556            require IO::Handle;
557    
558          $self->{char} = [];          $self->{char} = [];
559          $self->{token} = [];          $self->{token} = [];
560          $self->{entity} = [{          $self->{entity} = [{
561            reptxt => \$sourceText,            fh => $in-><AG::ManakaiDOMInputFile.filehandle>,
562              base_uri => $in-><AG::ManakaiDOMInputFile.baseURI>,
563              doc_uri => $in-><AG::ManakaiDOMInputFile.documentURI>,
564            line => 1,            line => 1,
565            column => 1,            column => 1,
566            pos => 0,            pos => 0,
567              close_file => sub { $in-><M::ManakaiDOMInputFile.close> },
568              reptxt => \'',
569              is_external_entity => true,
570          }];          }];
571              ## Entity stack.
572          $self->{location} = $self->{entity}->[-1];          $self->{location} = $self->{entity}->[-1];
573              ## Parsing location object as required by DPG.
574              ## It must always be equal to |{entity}->[-1]|.
575          $self->{entity_char} = [];          $self->{entity_char} = [];
576              ## Stack for |{char}| stacks analog to |{entity}| stack.
577          $self->{entity_token} = [];          $self->{entity_token} = [];
578              ## Stack for |{token}| stacks analog to |{entity}| stack.
579          $self->{xml_version} = '1.0';          $self->{xml_version} = '1.0';
580              ## Document XML version: either |1.0| or |1.1|.
581          $self->{standalone} = false;          $self->{standalone} = false;
582              ## True iff |standalone=yes| is explicitly specified.
583            $self->{has_xref} = false;
584              ## There is an unread external entity.
585            $self->{dont_process} = false;
586              ## So, don't process |ENTITY| and |ATTLIST| declarations.
587          $self->{general_entity} = {          $self->{general_entity} = {
588            lt => {is_predefined => true},            lt => {is_predefined => true},
589            gt => {is_predefined => true},            gt => {is_predefined => true},
# Line 294  ClsDef: Line 591  ClsDef:
591            quot => {is_predefined => true},            quot => {is_predefined => true},
592            apos => {is_predefined => true},            apos => {is_predefined => true},
593          };          };
594              ## Declared general entities.
595          $self->{param_entity} = {};          $self->{param_entity} = {};
596              ## Declared parameter entities.
597          $self->{attr} = {};          $self->{attr} = {};
598            # $self->{attr}->{$element_type_name}->{$attr_name} = $attr_def            # $self->{attr}->{$element_type_name}->{$attr_name} = $attr_def
599          $self->{has_error} = false;            ## Declared attributes.
           ## Well-formedness constraint Entity Declared takes effect?  
600    
601          __DEEP{          __DEEP{
602            $r = $self->{<H::c|implementation>}-><M::DOMImpl.createDocument>;            $r = $self->{<H::c|implementation>}-><M::DOMImpl.createDocument>;
           $r-><AS::Document.strictErrorChecking> (false);  
603            $self->{doc} = $r;            $self->{doc} = $r;
604                ## |Document| object.
605            CORE::delete $self->{docx};            CORE::delete $self->{docx};
606                ## |DocumentXDoctype| object (if necessary).
607              $self->{doc_cfg} = $r-><AG::Document.domConfig>;
608                ## |Document|'s configuration.
609            CORE::delete $self->{dtdef};            CORE::delete $self->{dtdef};
610            $self->{cfg} = $r-><AG::Document.domConfig>;              ## |DocumentTypeDefinition| object (if created).
611            local $r->{<H::mn:node>}            CORE::delete $self->{dtdecl};
612                    ->{<H::cfg|entity-reference-read-only>} = false;              ## |DocumentTypeDeclaration| object (if created).
613    
614              $r-><AS::Document.strictErrorChecking> (false);
615                ## NOTE: Any checks such as |Name| validity done by
616                ##       methods on DOM nodes are disabled.  It might result
617                ##       in creating an ill-formed DOM tree when parser
618                ##       errors are traped by |error-handler|.
619              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
620                                  (<Q::cfg|entity-reference-read-only> => false);
621                ## NOTE: Turn this configuration parameter off is required
622                ##       because entity reference subtree is created by
623                ##       the parser rather than |createEntityReference|'s
624                ##       cloning.  Parser's |cfg:entity-reference-read-only|
625                ##       configuration parameter controls whether generated
626                ##       subtree is then marked as read-only or not.
627              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
628                                  (<Q::cfg|clone-entity-reference-subtree> => true);
629                ## NOTE: Turn this configuration parameter on makes
630                ##       entity reference subtrees in attribute default values
631                ##       cloned as is into default attribute node subtrees.
632              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
633                                  (<Q::cfg|dtd-default-attributes> => false);
634                ## NOTE: Don't create DTD default attributes by
635                ##       |createElementNS| method.
636              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
637                                  (<Q::cfg|xml-id> => $self->{parser_cfg}
638                                      -><M::c|DOMConfiguration.getParameter>
639                                          (<Q::cfg|xml-id>));
640              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
641                                  ('error-handler' => sub {
642                                     my (undef, $err) = @_;
643                                     return ($err-><AG::c|DOMError.severity> !=
644                                             <C::c|DOMError.SEVERITY_FATAL_ERROR>);
645                                   })
646                unless $Message::DOM::XMLParser::DEBUG;
647                ## NOTE: The default error handler in manakai |warn|s error
648                ##       description.
649    
650              ## Document entity's URI and base URI
651              $r-><AS::Document.documentURI> ($self->{entity}->[0]->{doc_uri});
652              $r-><AS::Document.manakaiEntityBaseURI>
653                    ($self->{entity}->[0]->{base_uri});
654    
655            ## Document entity -> |Document| node            ## Document entity -> |Document| node
656            $self->_parse_DocumentEntity;            $self->_parse_DocumentEntity;
657    
658              for (@{$self->{entity}}) {
659                $_->{close_file}->();
660                ## NOTE: There should be only the document entity.
661              }
662    
663            ## Replacement tree for general |Entity| nodes            ## Replacement tree for general |Entity| nodes
664            my @ent = values %{$self->{general_entities}};            my @ent = values %{$self->{general_entity}};
665            if (@ent) {            for my $ent (@ent) {
666              for my $ent (@ent) {              if (exists $ent->{has_replacement_text}) {
               if (exists $ent->{reptxt}) {  
667                  my $ent_name = $ent->{name};                  my $ent_name = $ent->{name};
668                  $self->{entity} = [<Code::getCopyOfEntityState::                  $self->{entity} = [<Code::getCopyOfEntityState::
669                                                $entity_type = 'general_entity',                                                $entity_type = 'general_entity',
# Line 325  ClsDef: Line 671  ClsDef:
671                  $self->{location} = $self->{entity}->[-1];                  $self->{location} = $self->{entity}->[-1];
672                  $self->{token} = [];                  $self->{token} = [];
673                  $self->{char} = [];                  $self->{char} = [];
674                    local $ent->{is_opened} = true;
675                  ## TODO: External entity support                  ## TODO: External entity support
676                  $self->_parse_InternalGeneralParsedEntity ($ent->{node});                  $self->_parse_InternalGeneralParsedEntity ($ent->{node});
677                  $ent->{node}-><AS::x|Entity.hasReplacementTree> (true);                  $ent->{node}-><AS::x|Entity.hasReplacementTree> (true);
678                }                  $self->{entity}->[-1]->{close_file}->();
679                ## TODO: Read-only if configuration (for all entities)                ## ISSUE: Should errors detected by this phase result
680                  ##        in |DOMLS:PARSE_ERR| exception thrown?
681              }              }
682                  ## TODO: Read-only if configuration (for all entities)
683            }            }
684    
685              ## Turns flags to their default value
686              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
687                                  (<Q::cfg|entity-reference-read-only> => null);
688              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
689                                  (<Q::cfg|clone-entity-reference-subtree> => null);
690              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
691                                  (<Q::cfg|dtd-default-attributes> => null);
692              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
693                                  (<Q::cfg|xml-id> => null);
694              $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
695                                  ('error-handler' => null);
696            $r-><AS::Document.strictErrorChecking> (true);            $r-><AS::Document.strictErrorChecking> (true);
697          }__;          }__;
698    
# Line 351  ClsDef: Line 711  ClsDef:
711          if (@{$self->{char}}) {          if (@{$self->{char}}) {
712            $r = shift @{$self->{char}};            $r = shift @{$self->{char}};
713          } else {          } else {
           no warnings 'substr';  
             ## substr outside length warnings at the end of the string  
714            GETCHAR: {            GETCHAR: {
715              my $char = substr (${$self->{entity}->[-1]->{reptxt}},              no warnings 'closed'; # getc() on closed filehandle warning
716                                 $self->{entity}->[-1]->{pos}, 1);              my $ent = $self->{entity}->[-1];
717                my $char = $ent->{fh}->getc;
718    
719              if (defined $char and length $char) {              if (defined $char and length $char) {
720                $self->{entity}->[-1]->{pos}++;                $ent->{pos}++;
721                $r = ord $char;                $r = ord $char;
722                if ($r == 0x000A) {                if ($r == 0x000A) {
723                  $self->{entity}->[-1]->{line}++;                  $ent->{line}++;
724                  $self->{entity}->[-1]->{column} = 1;                  $ent->{column} = 1;
725                } elsif ($r == 0x000D) {                } elsif ($r == 0x000D) {
726                  my $next_char = substr (${$self->{entity}->[-1]->{reptxt}},                  my $next_char = $ent->{fh}->getc;
                                         $self->{entity}->[-1]->{pos}, 1);  
727                  if ($next_char eq "\x0A") {                  if ($next_char eq "\x0A") {
728                    $self->{entity}->[-1]->{pos}++;                    if ($ent->{is_external_entity}) {
729                    $self->{entity}->[-1]->{line}++;                      $ent->{pos}++;
730                    $self->{entity}->[-1]->{column} = 1;                      $ent->{line}++;
731                        $ent->{column} = 1;
732                        $r = 0x000A; # ^ U+000D U+000A -> U+000A ^
733                      } else { # Internal entity
734                        $ent->{column}++;
735                        ## Line number will be increased by next |shiftChar|.
736                        $ent->{fh}->ungetc (0x000A);
737                        #$r = 0x000D; # ^ U+000D U+000A -> U+000D ^ U+000A
738                        # no change
739                      }
740                  } elsif ($next_char eq "\x85") {                  } elsif ($next_char eq "\x85") {
741                    if ($self->{xml_version} eq '1.1') {                    if ($self->{xml_version} eq '1.1') {
742                      $self->{entity}->[-1]->{pos}++;                      if ($ent->{is_external_entity}) {
743                      $self->{entity}->[-1]->{line}++;                        if ($ent->{no_xml11_eol}) {
744                      $self->{entity}->[-1]->{column} = 1;                          my $location = {
745                    } else {                            utf32_offset => $ent->{pos} - 1,
746                      $self->{entity}->[-1]->{column}++;                            line_number => $ent->{line},
747                      ## Line number will be increased by next |shiftChar| call.                            column_number => $ent->{column},
748                            };
749                            my $continue = __c|ERROR{
750                            xp|fatal-xml11-end-of-line-in-xml-declaration::
751                              c|location => {$location},
752                              xp|character-number => {$r},
753                            }__;
754                            unless ($continue) {
755                              __CODE{ParseError}__;
756                            }
757                          } # no_xml11_eol
758                          $ent->{pos}++;
759                          $ent->{line}++;
760                          $ent->{column} = 1;
761                          $r = 0x000A; # ^ U+000D U+0085 -> U+000A ^
762                        } else { # internal entity
763                          $ent->{column}++;
764                          ## Line number will be increased by next |shiftChar|.
765                          $ent->{fh}->ungetc (0x0085);
766                          #$r = 0x000D; # ^ U+000D U+0085 -> U+000D ^ U+0085
767                          # no change
768                        }
769                      } else { # XML 1.0
770                        ## |no_xml11_eol| will be tested later.
771                        $ent->{column}++;
772                        ## Line number will be increased by next |shiftChar|.
773                        $ent->{fh}->ungetc (0x0085);
774                        $r = 0x000A if $ent->{is_external_entity};
775                          # external: ^ U+000D U+0085 -> U+000A ^ U+0085
776                          # internal: ^ U+000D U+0085 -> U+000D ^ U+0085 (as is)
777                    }                    }
778                  } else {                  } else { # neither U+000A nor U+0085
779                    $self->{entity}->[-1]->{line}++;                    $ent->{line}++;
780                    $self->{entity}->[-1]->{column} = 1;                    $ent->{column} = 1;
781                      $ent->{fh}->ungetc (ord $next_char);
782                      $r = 0x000A if $ent->{is_external_entity};
783                        # external: ^ U+000D _ -> U+000A ^ _
784                        # internal: ^ U+000D _ -> U+000D ^ _ (as is)
785                  }                  }
786                  $r = 0x000A;                } elsif ($r == 0x0085 or $r == 0x2028) {
787                    if ($ent->{no_xml11_eol}) {
788                      my $location = {
789                        utf32_offset => $ent->{pos} - 1,
790                        line_number => $ent->{line},
791                        column_number => $ent->{column},
792                      };
793                      my $continue = __c|ERROR{
794                      xp|fatal-xml11-end-of-line-in-xml-declaration::
795                        c|location => {$location},
796                        xp|character-number => {$r},
797                      }__;
798                      unless ($continue) {
799                        __CODE{ParseError}__;
800                      }
801                    } # no_xml11_eol
802                    $r = 0x000A if $self->{xml_version} eq '1.1' and
803                                   $ent->{is_external_entity};
804                    ## Even in XML 1.0 it increases the line number.
805                    $ent->{line}++;
806                    $ent->{column} = 1;
807                } elsif (                } elsif (
808                  not ((0x0020 <= $r and $r <= 0x007E) or                  not ((0x0020 <= $r and $r <= 0x007E) or
809                       (0x00A0 <= $r and $r <= 0xD7FF) or                       (0x00A0 <= $r and $r <= 0xD7FF) or
810                       (0xE000 <= $r and $r <= 0xFFFD) or                       (0xE000 <= $r and $r <= 0xFFFD) or
811                       (0x10000 <= $r and $r <= 0x10FFFF)) and                       (0x10000 <= $r and $r <= 0x10FFFF)) and
812                  $r != 0x0009 and $r != 0x0085 and                  $r != 0x0009 and
813                  not ($self->{xml_version} eq '1.0' and                  not (($self->{xml_version} eq '1.0' or
814                       (0x007F <= $r and $r <= 0x009F))                        not $ent->{is_external_entity}) and
815                         (0x007F <= $r and $r <= 0x009F)) and
816                    not ($self->{xml_version} eq '1.1' and
817                         not $ent->{is_external_entity} and
818                         0x0001 <= $r and $r <= 0x001F)
819                ) {                ) {
820                  my $location = {                  my $location = {
821                    utf32_offset => $self->{entity}->[-1]->{pos} - 1,                    utf32_offset => $ent->{pos} - 1,
822                    line_number => $self->{entity}->[-1]->{line},                    line_number => $ent->{line},
823                    column_number => $self->{entity}->[-1]->{column},                    column_number => $ent->{column},
824                  };                  };
825                  my $continue = __DOMCore:ERROR{xp|wf-legal-literal-character::                  my $continue = __c|ERROR{xp|wf-legal-literal-character::
826                    DOMCore|location => {$location},                    c|location => {$location},
827                    xp|character-number => {$r},                    xp|character-number => {$r},
828                  }__;                  }__;
829                  unless ($continue) {                  unless ($continue) {
830                    __EXCEPTION{DOMLS|PARSE_ERR}__;                    __CODE{ParseError}__;
831                  }                  }
832                  $self->{has_error} = true;                  $ent->{column}++;
833                  $self->{entity}->[-1]->{column}++;                } else { # XML |Char|
834                } elsif ($r == 0x0085 or $r == 0x2028) {                  $ent->{column}++;
                 $r = 0x000A if $self->{xml_version} eq '1.1';  
                 ## Even in XML 1.0 it increases the line number.  
                 $self->{entity}->[-1]->{line}++;  
                 $self->{entity}->[-1]->{column} = 1;  
               } else {  
                 $self->{entity}->[-1]->{column}++;  
835                }                }
836              } else {              } else {
837                $r = -1;                $r = -1;
# Line 473  ClsDef: Line 891  ClsDef:
891        /*        /*
892          prolog := XMLDecl? *Misc [doctypedecl *Misc]  ;; [22]          prolog := XMLDecl? *Misc [doctypedecl *Misc]  ;; [22]
893        */        */
894        ?lexmode 'DocumentStart';        ?lexmode DocumentStart;
895    
896        my $doc;        my $doc;
897        lang:Perl {        lang:Perl {
# Line 481  ClsDef: Line 899  ClsDef:
899        }        }
900                
901        ~? (XDO) {        ~? (XDO) {
902          &_XMLDeclaration_ ($doc => $doc);          ?lexmode XMLDeclarationOrPI;
903                    lang:Perl {
904          ~ (PIC) {            $self->{entity}->[-1]->{no_xml11_eol} = true;
905            ?lexmode DocumentProlog;          }
906            ~ (S) {        // XML declaration
907              &_XMLDeclaration_ ($doc => $doc);
908              ~ (PIC2) {
909                ?lexmode DocumentProlog;
910              } else {
911                ?lexmode DocumentProlog;
912              }
913            } (NameChar) {  // Processing instruction whose target begins with |xml|
914              my $target_token;
915              lang:Perl ($v => $token.value) {
916                $target_token = $token;
917                $target_token->{value} = 'xml'.$target_token->{value};
918                $self->{entity}->[-1]->{no_xml11_eol} = false;
919              }
920              ?lexmode PINmtoken;
921              ~? (Nmtoken) {
922                lang:Perl ($v => $token.value) {
923                  $target_token->{value} .= $v;
924                }
925                ?lexmode PIName;
926              }
927              lang:Perl {
928                $target_token->{type} = 'Name';
929                $target_token->{location_d} += 3; # 'xml'
930                unshift @{$self->{token}}, $token;
931                $token = $target_token;
932              }
933              &_ProcessingInstruction_ ($doc => $doc, $parent => $doc);
934              ~ (PIC) {
935                ?lexmode DocumentProlog;
936              } else {
937                ?lexmode DocumentProlog;
938              }
939          } else {          } else {
940            ?lexmode DocumentProlog;            lang:Perl {
941                $self->{entity}->[-1]->{no_xml11_eol} = false;
942              }
943          }          }
944        } else {        } else {
945          ?lexmode 'DocumentProlog';          ?lexmode 'DocumentProlog';
# Line 523  ClsDef: Line 976  ClsDef:
976            ?lexmode DocumentMisc;            ?lexmode DocumentMisc;
977          }          }
978        } else {        } else {
         lang:Perl {  
           $self->{standalone} = true;  
         }  
979          ?lexmode DocumentMisc;          ?lexmode DocumentMisc;
980        }        }
981    
982          lang:Perl {
983            $self->{doc}-><AS::Document.allDeclarationsProcessed> (true)
984              unless $self->{dont_process};
985          }
986                
987        // *Misc        // *Misc
988        ~* (CDO) {        ~* (CDO) {
# Line 584  ClsDef: Line 1039  ClsDef:
1039        }        }
1040                
1041        ~ (#EOF) { }        ~ (#EOF) { }
   
       lang:Perl {  
         if ($self->{has_error}) {  
           __EXCEPTION{DOMLS|PARSE_ERR::  
           }__;  
         }  
       }  
1042      } // DocumentEntity      } // DocumentEntity
1043    
1044      /*      /*
# Line 626  ClsDef: Line 1074  ClsDef:
1074        NOTE: XML declaration is optional in XML 1.0        NOTE: XML declaration is optional in XML 1.0
1075              while it is required in XML 1.1.              while it is required in XML 1.1.
1076      */      */
1077      rule _XMLDeclaration_ ($doc) {      rule _XMLDeclaration_ {
       ?lexmode XMLDeclaration;  
   
1078        // ~ (XDO) { }        // ~ (XDO) { }
1079        // ~ (S) { }        ?lexmode XMLDeclaration;
1080          //lang:Perl {
1081          //  $self->{entity}->[-1]->{no_xml11_eol} = true;
1082          //}
1083          //~ (S) { }
1084    
1085        ~ (Name == 'version') {        ~ (Name == 'version') {
1086          ~? (S) { }          ~? (S) { }
# Line 677  ClsDef: Line 1127  ClsDef:
1127              }__;              }__;
1128              my $continue = __DOMCore:ERROR{xp|wf-unsupported-xml-version::              my $continue = __DOMCore:ERROR{xp|wf-unsupported-xml-version::
1129                DOMCore|location => {$location},                DOMCore|location => {$location},
1130                xp|parent => {$doc},                xp|parent => {$self->{doc}},
1131                infoset|version => {$ver},                infoset|version => {$ver},
1132                xp|error-token => {$bad_token},                xp|error-token => {$bad_token},
1133              }__;              }__;
1134              unless ($continue) {              unless ($continue) {
1135                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
1136              }              }
             $self->{has_error} = true;  
1137            }            }
1138            $doc-><AS::Document.xmlVersion> ($ver);            $self->{doc}-><AS::Document.xmlVersion> ($ver);
1139            $self->{xml_version} = $ver;            $self->{xml_version} = $ver;
1140          }          }
1141    
# Line 738  ClsDef: Line 1187  ClsDef:
1187              }__;              }__;
1188              my $continue = __DOMCore:ERROR{xp|wf-malformed-enc-name::              my $continue = __DOMCore:ERROR{xp|wf-malformed-enc-name::
1189                DOMCore|location => {$location},                DOMCore|location => {$location},
1190                xp|parent => {$doc},                xp|parent => {$self->{doc}},
1191                xp|name => {$ver},                xp|name => {$ver},
1192                xp|error-token => {$bad_token},                xp|error-token => {$bad_token},
1193              }__;              }__;
1194              unless ($continue) {              unless ($continue) {
1195                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
1196              }              }
             $self->{has_error} = true;  
1197            }            }
1198            $doc-><AS::Document.xmlEncoding> ($ver);            $self->{doc}-><AS::Document.xmlEncoding> ($ver);
1199          }          }
1200    
1201          ~? (S) { }          ~? (S) { }
# Line 798  ClsDef: Line 1246  ClsDef:
1246              }__;              }__;
1247              my $continue = __DOMCore:ERROR{xp|wf-malformed-xml-standalone::              my $continue = __DOMCore:ERROR{xp|wf-malformed-xml-standalone::
1248                DOMCore|location => {$location},                DOMCore|location => {$location},
1249                xp|parent => {$doc},                xp|parent => {$self->{doc}},
1250                xp|name => {$ver},                xp|name => {$ver},
1251                xp|error-token => {$bad_token},                xp|error-token => {$bad_token},
1252              }__;              }__;
1253              unless ($continue) {              unless ($continue) {
1254                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
1255              }              }
             $self->{has_error} = true;  
1256            }            }
1257            if ($ver eq 'yes') {            if ($ver eq 'yes') {
1258              $doc-><AS::Document.xmlStandalone> (true);              $self->{doc}-><AS::Document.xmlStandalone> (true);
1259              $self->{standalone} = true;              $self->{standalone} = true;
1260            }            }
1261          }          }
# Line 816  ClsDef: Line 1263  ClsDef:
1263          ~? (S) { }          ~? (S) { }
1264        }        }
1265    
1266        // ~ (PIC) { }        ~ (PIC1) {
1267            lang:Perl {
1268              $self->{entity}->[-1]->{no_xml11_eol} = false;
1269            }
1270          } else {
1271            lang:Perl {
1272              $self->{entity}->[-1]->{no_xml11_eol} = false;
1273            }
1274          }
1275    
1276          // ~ (PIC2) { }
1277      } // _XMLDeclaration_      } // _XMLDeclaration_
1278            
1279      /*      /*
# Line 894  ClsDef: Line 1351  ClsDef:
1351                xp|parent => {$parent},                xp|parent => {$parent},
1352              }__;              }__;
1353              unless ($continue) {              unless ($continue) {
1354                __EXCEPTION{DOMLS|PARSE_ERR::                __CODE{ParseError}__;
               }__;  
1355              }              }
             $self->{has_error} = true;  
1356            }            }
1357            ## TODO: Namespace well-formedness            __CODE{checkNCName:: $name => $name}__;
1358              
1359            $pi = $doc-><M::Document.createProcessingInstruction>            $pi = $doc-><M::Document.createProcessingInstruction>
1360                          ($name);                          ($name);
1361          }          }
# Line 958  ClsDef: Line 1414  ClsDef:
1414                xp|parent => {$doctype},                xp|parent => {$doctype},
1415              }__;              }__;
1416              unless ($continue) {              unless ($continue) {
1417                __EXCEPTION{DOMLS|PARSE_ERR::                __CODE{ParseError}__;
               }__;  
1418              }              }
             $self->{has_error} = true;  
1419            }            }
1420            ## TODO: Namespace well-formedness            __CODE{checkNCName:: $name => $name}__;
1421              
1422            $pi = $doc-><M::Document.createProcessingInstruction>            $pi = $doc-><M::Document.createProcessingInstruction>
1423                          ($name);                          ($name);
1424              $pi-><AS::x|ProcessingInstruction.manakaiBaseURI>
1425                     ($self->{location}->{base_uri});
1426          }                }      
1427        } else {        } else {
1428          lang:Perl {          lang:Perl {
# Line 1038  ClsDef: Line 1495  ClsDef:
1495        (CharData) {        (CharData) {
1496          // Character data          // Character data
1497          lang:Perl ($data => $token.value) {          lang:Perl ($data => $token.value) {
1498            $node-><M::Node.appendChild>            $node-><M::Node.manakaiAppendText> (\($data));
             ($doc-><M::Document.createTextNode> ($data));  
1499          }          }
1500        } (STAGO) {        } (STAGO) {
1501          // Start tag or empty element tag          // Start tag or empty element tag
# Line 1048  ClsDef: Line 1504  ClsDef:
1504                    
1505          ~ (Name) {          ~ (Name) {
1506            my $attrs;            my $attrs;
1507            lang:Perl ($name => $token.value) {            lang:Perl ($name => $token.value) : has-error {
1508                __CODE{checkQName:: $name => $name}__;
1509              push @{$types}, $type;              push @{$types}, $type;
1510              $type = $name;              $type = $name;
1511              $attrs = {};              $attrs = {};
# Line 1080  ClsDef: Line 1537  ClsDef:
1537            lang:Perl {            lang:Perl {
1538              push @{$nses}, $ns;              push @{$nses}, $ns;
1539              $ns = {%$ns};              $ns = {%$ns};
1540    
1541                ## Default attributes
1542                DA: for my $atqname (%{$self->{attr}->{$type}}) {
1543                  next DA unless $self->{attr}->{$type}->{$atqname};
1544                  next DA if exists $attrs->{$atqname}; # specified
1545                  my $dtype = $self->{attr}->{$type}->{$atqname}
1546                                   -><AG::ATDef.defaultType>;
1547                  next DA unless $dtype == <C::ATDef.EXPLICIT_DEFAULT> or
1548                                 $dtype == <C::ATDef.FIXED_DEFAULT>;
1549                  $attrs->{$atqname} = {is_default => true, nodes => []};
1550                  for (@{$self->{attr}->{$type}->{$atqname}
1551                              -><AG::Node.childNodes>}) {
1552                    push @{$attrs->{$atqname}->{nodes}},
1553                         $_-><M::Node.cloneNode> (true);
1554                  }
1555                }
1556                            
1557              my %gattr;              my %gattr;
1558              my %lattr;              my %lattr;
# Line 1087  ClsDef: Line 1560  ClsDef:
1560                my ($pfx, $lname) = split /:/, $atqname;                my ($pfx, $lname) = split /:/, $atqname;
1561                $attrs->{$atqname}->{def} = $self->{attr}->{$type}->{$atqname};                $attrs->{$atqname}->{def} = $self->{attr}->{$type}->{$atqname};
1562                if (defined $lname) {  ## Global attribute                if (defined $lname) {  ## Global attribute
                 ## TODO: Namespace well-formedness (lname is NCName)  
1563                  if ($pfx eq 'xmlns') {                  if ($pfx eq 'xmlns') {
1564                    my $nsuri = $attrs->{$atqname}->{value};                    my $nsuri = $attrs->{$atqname}->{is_default}
1565                    if ($lname eq 'xml' and                                  ? $attrs->{$atqname}->{def}-><AG::Node.nodeValue>
1566                        $nsuri ne <Q::xml:>) {                                  : $attrs->{$atqname}->{value};
1567                      ## TODO: error                    if (not $attrs->{$atqname}->{is_default} and
1568                    } elsif ($lname eq 'xmlns') {                        $attrs->{$atqname}->{def}) {
                     ## TODO: error  
                   }  
                   if ($nsuri eq '') {  
                     ## TODO: error in XML 1.0  
                   } elsif ($nsuri eq <Q::xml:> and  
                            $lname ne 'xml') {  
                     ## TODO: error  
                   } elsif ($nsuri eq <Q::xmlns:>) {  
                     ## TODO: error  
                   }  
                   $ns->{$lname} = $attrs->{$atqname}->{value};  
                   if ($attrs->{$atqname}->{def}) {  
1569                      my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;                      my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;
1570                      if ({                      if ({
1571                        <C::ATDef.ID_ATTR> => true,                        <C::ATDef.ID_ATTR> => true,
# Line 1119  ClsDef: Line 1579  ClsDef:
1579                        <C::ATDef.ENUMERATION_ATTR> => true,                        <C::ATDef.ENUMERATION_ATTR> => true,
1580                      }->{$dt}) {                      }->{$dt}) {
1581                        ## Tokenization (XML 1 3.3.3)                        ## Tokenization (XML 1 3.3.3)
1582                        for ($ns->{$lname}) {                        for ($nsuri) {
1583                          s/^\x20+//;                          s/^\x20+//;
1584                          s/\x20+\z//;                          s/\x20+\z//;
1585                          s/\x20+/ /g;                          s/\x20+/ /g;
1586                        }                        }
1587                      }                      }
1588                    }                    }
1589                    delete $ns->{$lname} unless length $ns->{$lname};                    if ($lname eq 'xml' and
1590                  } elsif ($pfx eq '') {                        $nsuri ne <Q::xml:>) {
1591                    ## TODO: pfx is not NCName error                      my $location;
1592                  } else {                      __CODE{xp|get-location-from-token::
1593                    if ($gattr{$pfx}->{$lname}) {                        $token => $token,
1594                      ## TODO: Namespace well-formedness error                        $result => $location,
1595                        }__;
1596                        my $continue = __c|ERROR{xp|nsc-reserved-prefix-xml::
1597                          c|location => {$location},
1598                          xp|token => {$token},
1599                          infoset|prefix => {$lname},
1600                          infoset|namespaceName => {$nsuri},
1601                        }__;
1602                        unless ($continue) {
1603                          __CODE{ParseError}__;
1604                        }
1605                      } elsif ($lname eq 'xmlns') {
1606                        my $location;
1607                        __CODE{xp|get-location-from-token::
1608                          $token => $token,
1609                          $result => $location,
1610                        }__;
1611                        my $continue = __c|ERROR{xp|nsc-reserved-prefix-xmlns::
1612                          c|location => {$location},
1613                          xp|token => {$token},
1614                          infoset|prefix => {$lname},
1615                          infoset|namespaceName => {$nsuri},
1616                        }__;
1617                        unless ($continue) {
1618                          __CODE{ParseError}__;
1619                        }
1620                    }                    }
1621                      if ($nsuri eq '') {
1622                        if ($self->{xml_version} eq '1.0') {
1623                          my $location;
1624                          __CODE{xp|get-location-from-token::
1625                            $token => $token,
1626                            $result => $location,
1627                          }__;
1628                          my $continue = __c|ERROR{xp|nswf-empty-namespace-name::
1629                            c|location => {$location},
1630                            xp|token => {$token},
1631                            infoset|namespaceName => {$nsuri},
1632                            infoset|prefix => {$lname},
1633                          }__;
1634                          unless ($continue) {
1635                            __CODE{ParseError}__;
1636                          }
1637                        }
1638                      } elsif ($nsuri eq <Q::xml:> and
1639                               $lname ne 'xml') {
1640                        my $location;
1641                        __CODE{xp|get-location-from-token::
1642                          $token => $token,
1643                          $result => $location,
1644                        }__;
1645                        my $continue = __c|ERROR{
1646                        xp|nsc-reserved-namespace-name-xml::
1647                          c|location => {$location},
1648                          xp|token => {$token},
1649                          infoset|prefix => {$lname},
1650                          infoset|namespaceName => {$nsuri},
1651                        }__;
1652                        unless ($continue) {
1653                          __CODE{ParseError}__;
1654                        }
1655                      } elsif ($nsuri eq <Q::xmlns:>) {
1656                        my $location;
1657                        __CODE{xp|get-location-from-token::
1658                          $token => $token,
1659                          $result => $location,
1660                        }__;
1661                        my $continue = __c|ERROR{
1662                        xp|nsc-reserved-namespace-name-xmlns::
1663                          c|location => {$location},
1664                          xp|token => {$token},
1665                          infoset|prefix => {$lname},
1666                          infoset|namespaceName => {$nsuri},
1667                        }__;
1668                        unless ($continue) {
1669                          __CODE{ParseError}__;
1670                        }
1671                      }
1672                      $ns->{$lname} = $nsuri;
1673                      delete $ns->{$lname} unless length $ns->{$lname};
1674                  }                  }
1675                  $gattr{$pfx}->{$lname} = $attrs->{$atqname};                  $gattr{$pfx}->{$lname} = $attrs->{$atqname};
1676                } else {               ## Local attribute                } else {               ## Local attribute
1677                  if ($pfx eq 'xmlns') {                  if ($pfx eq 'xmlns') {
1678                    $ns->{''} = $attrs->{xmlns}->{value};                    $ns->{''} = $attrs->{xmlns}->{is_default}
1679                    if ($attrs->{$atqname}->{def}) {                                  ? $attrs->{xmlns}->{def}-><AG::Node.nodeValue>
1680                                    : $attrs->{xmlns}->{value};
1681                      if (not $attrs->{$atqname}->{is_default} and
1682                          $attrs->{$atqname}->{def}) {
1683                      my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;                      my $dt = $attrs->{$atqname}->{def}-><AG::ATDef.declaredType>;
1684                      if ({                      if ({
1685                        <C::ATDef.ID_ATTR> => true,                        <C::ATDef.ID_ATTR> => true,
# Line 1159  ClsDef: Line 1700  ClsDef:
1700                        }                        }
1701                      }                      }
1702                    }                    }
1703                    delete $ns->{''} unless length $ns->{''};                    unless ($ns->{''}) {
1704                        delete $ns->{''};
1705                      } elsif ($ns->{''} eq <Q::xml:>) {
1706                        my $location;
1707                        __CODE{xp|get-location-from-token::
1708                          $token => $token,
1709                          $result => $location,
1710                        }__;
1711                        my $continue = __c|ERROR{
1712                        xp|nsc-reserved-namespace-name-xml::
1713                          c|location => {$location},
1714                          xp|token => {$token},
1715                          infoset|prefix => {null},
1716                          infoset|namespaceName => {<Q::xml:>},
1717                        }__;
1718                        unless ($continue) {
1719                          __CODE{ParseError}__;
1720                        }
1721                      } elsif ($ns->{''} eq <Q::xmlns:>) {
1722                        my $location;
1723                        __CODE{xp|get-location-from-token::
1724                          $token => $token,
1725                          $result => $location,
1726                        }__;
1727                        my $continue = __c|ERROR{
1728                        xp|nsc-reserved-namespace-name-xmlns::
1729                          c|location => {$location},
1730                          xp|token => {$token},
1731                          infoset|prefix => {null},
1732                          infoset|namespaceName => {<Q::xmlns:>},
1733                        }__;
1734                        unless ($continue) {
1735                          __CODE{ParseError}__;
1736                        }
1737                      }
1738                  } else {                  } else {
1739                    $lattr{$pfx} = $attrs->{$atqname};                    $lattr{$pfx} = $attrs->{$atqname};
1740                  }                  }
# Line 1168  ClsDef: Line 1743  ClsDef:
1743                            
1744              my ($pfx, $lname) = split /:/, $type;              my ($pfx, $lname) = split /:/, $type;
1745              my $nsuri;              my $nsuri;
             ## TODO: lname is NCName?  
1746              if (defined $lname) {  ## Prefixed namespace              if (defined $lname) {  ## Prefixed namespace
               if ($pfx eq '') {  
                 ## TODO: pfx is not NCName error  
               }  
1747                if (defined $ns->{$pfx}) {                if (defined $ns->{$pfx}) {
1748                  $nsuri = $ns->{$pfx};                  $nsuri = $ns->{$pfx};
1749                } else {                } else {
1750                  ## TODO: namespace ill-formed                  my $location;
1751                    __CODE{xp|get-location-from-token::
1752                      $token => $token,
1753                      $result => $location,
1754                    }__;
1755                    my $continue = __c|ERROR{xp|nsc-prefix-declared::
1756                      c|location => {$location},
1757                      xp|token => {$token},
1758                      infoset|prefix => {$pfx},
1759                      xp|name => {$type},
1760                    }__;
1761                    unless ($continue) {
1762                      __CODE{ParseError}__;
1763                    }
1764                }                }
1765              } else {               ## Default namespace              } else {               ## Default namespace
1766                $nsuri = $ns->{''};                $nsuri = $ns->{''};
# Line 1189  ClsDef: Line 1773  ClsDef:
1773                my $attr = $doc-><M::Document.createAttributeNS>                my $attr = $doc-><M::Document.createAttributeNS>
1774                                   (<Q::xmlns:>, 'xmlns');                                   (<Q::xmlns:>, 'xmlns');
1775                for (@{$attrs->{xmlns}->{nodes}}) {                for (@{$attrs->{xmlns}->{nodes}}) {
1776                  $attr-><M::Node.appendChild> ($_);                  if ($_-><AG::Node.nodeType> == <C::Node.TEXT_NODE>) {
1777                      $attr-><M::Node.manakaiAppendText>
1778                               (\($_-><AG::Node.textContent>));
1779                    } else {
1780                      $attr-><M::Node.appendChild> ($_);
1781                    }
1782                }                }
1783                if ($attrs->{xmlns}->{def}) {                if ($attrs->{xmlns}->{def}) {
1784                  __CODE{t|setAttrType::                  __CODE{t|setAttrType::
# Line 1198  ClsDef: Line 1787  ClsDef:
1787                  }__;                  }__;
1788                }                }
1789                $el-><M::Element.setAttributeNodeNS> ($attr);                $el-><M::Element.setAttributeNodeNS> ($attr);
1790                  $attr-><AS::t|Attr.specified> (false)
1791                    if $attrs->{xmlns}->{is_default};
1792              }              }
1793                            
1794              for my $lname (keys %lattr) {              for my $lname (keys %lattr) {
1795                my $attr = $doc-><M::Document.createAttributeNS>                my $attr = $doc-><M::Document.createAttributeNS>
1796                                   (null, $lname);                                   (null, $lname);
1797                for (@{$lattr{$lname}->{nodes}}) {                for (@{$lattr{$lname}->{nodes}}) {
1798                  $attr-><M::Node.appendChild> ($_);                  if ($_-><AG::Node.nodeType> == <C::Node.TEXT_NODE>) {
1799                      $attr-><M::Node.manakaiAppendText>
1800                               (\($_-><AG::Node.textContent>));
1801                    } else {
1802                      $attr-><M::Node.appendChild> ($_);
1803                    }
1804                }                }
1805                if ($attrs->{$lname}->{def}) {                if ($attrs->{$lname}->{def}) {
1806                  __CODE{t|setAttrType::                  __CODE{t|setAttrType::
# Line 1213  ClsDef: Line 1809  ClsDef:
1809                  }__;                  }__;
1810                }                }
1811                $el-><M::Element.setAttributeNodeNS> ($attr);                $el-><M::Element.setAttributeNodeNS> ($attr);
1812                  $attr-><AS::t|Attr.specified> (false)
1813                    if $attrs->{$lname}->{is_default};
1814              }              }
1815                            
1816              for my $pfx (keys %gattr) {              for my $pfx (keys %gattr) {
1817                for my $lname (keys %{$gattr{$pfx}}) {                LN: for my $lname (keys %{$gattr{$pfx}}) {
1818                  my $attr = $doc-><M::Document.createAttributeNS>                  my $name = $pfx.':'.$lname;
1819                                     ($ns->{$pfx}, $pfx.':'.$lname);                  unless (defined $ns->{$pfx}) {
1820                      my $location;
1821                      __CODE{xp|get-location-from-token::
1822                        $token => $token,
1823                        $result => $location,
1824                      }__;
1825                      my $continue = __c|ERROR{xp|nsc-prefix-declared::
1826                        c|location => {$location},
1827                        xp|token => {$token},
1828                        xp|name => {$name},
1829                        infoset|prefix => {$pfx},
1830                      }__;
1831                      unless ($continue) {
1832                        __CODE{ParseError}__;
1833                      }
1834                    }
1835                    my $attr = $el-><M::Element.getAttributeNodeNS>
1836                                      ($ns->{$pfx}, $lname);
1837                    if ($attr) {
1838                      my $another_name = $attr-><AG::Node.nodeName>;
1839                      if ($name ne $another_name) {
1840                        my $location;
1841                        __CODE{xp|get-location-from-token::
1842                          $token => $token,
1843                          $result => $location,
1844                        }__;
1845                        my $continue = __c|ERROR{
1846                        xp|nswf-unique-att-spec-expanded-name::
1847                          c|location => {$location},
1848                          xp|token => {$token},
1849                          xp|another-attribute-name => {$another_name},
1850                          xp|name => {$name},
1851                          infoset|namespaceName => {$ns->{$pfx}},
1852                          infoset|localName => {$lname},
1853                        }__;
1854                        unless ($continue) {
1855                          __CODE{ParseError}__;
1856                        }
1857                        unless ($attr-><AG::t|Attr.specified>) {
1858                          ## It is a default attribute
1859                          $attr = $doc-><M::Document.createAttributeNS>
1860                                          ($ns->{$pfx}, $name);
1861                        } else {
1862                          ## It is a specified attribute
1863                          next LN;
1864                        }
1865                      } else { ## There is default attribute
1866                        $attr = $doc-><M::Document.createAttributeNS>
1867                                        ($ns->{$pfx}, $name);                    
1868                      }
1869                    } else {
1870                      $attr = $doc-><M::Document.createAttributeNS>
1871                                       ($ns->{$pfx}, $name);
1872                    }
1873                  for (@{$gattr{$pfx}->{$lname}->{nodes}}) {                  for (@{$gattr{$pfx}->{$lname}->{nodes}}) {
1874                    $attr-><M::Node.appendChild> ($_);                    if ($_-><AG::Node.nodeType> == <C::Node.TEXT_NODE>) {
1875                        $attr-><M::Node.manakaiAppendText>
1876                                 (\($_-><AG::Node.textContent>));
1877                      } else {
1878                        $attr-><M::Node.appendChild> ($_);
1879                      }
1880                  }                  }
1881                  if ($attrs->{$pfx}->{$lname}->{def}) {                  if ($gattr{$pfx}->{$lname}->{def}) {
1882                    __CODE{t|setAttrType::                    __CODE{t|setAttrType::
1883                      $attr => $attr,                      $attr => $attr,
1884                      $type => {$attrs->{$pfx}->{$lname}                      $type => {$gattr{$pfx}->{$lname}
1885                                      ->{def}-><AG::ATDef.declaredType>},                                      ->{def}-><AG::ATDef.declaredType>},
1886                    }__;                    }__;
1887                  }                  }
1888                  $el-><M::Element.setAttributeNodeNS> ($attr);                  $el-><M::Element.setAttributeNodeNS> ($attr);
1889                }                  $attr-><AS::t|Attr.specified> (false)
1890                      if $gattr{$pfx}->{$lname}->{is_default};
1891                  } # PFX
1892              }              }
1893    
1894              $node-><M::Node.appendChild> ($el);                          $node-><M::Node.appendChild> ($el);            
# Line 1274  ClsDef: Line 1932  ClsDef:
1932          my $is_docel;          my $is_docel;
1933                    
1934          ~ (Name) {          ~ (Name) {
1935              // No NCName & QName check (it must match to start-tag)
1936            lang:Perl ($name => $token.value) : has-error {            lang:Perl ($name => $token.value) : has-error {
1937              if ($name eq $type) {              if ($name eq $type) {
1938                $type = pop @{$types};                $type = pop @{$types};
# Line 1296  ClsDef: Line 1955  ClsDef:
1955                  xp|node => {$node},                  xp|node => {$node},
1956                }__;                }__;
1957                unless ($continue) {                unless ($continue) {
1958                  __EXCEPTION{DOMLS|PARSE_ERR}__;                  __CODE{ParseError}__;
1959                }                }
               $self->{has_error} = true;  
1960              }              }
1961            }            }
1962          }          }
# Line 1321  ClsDef: Line 1979  ClsDef:
1979                    xp|node => {$node},                    xp|node => {$node},
1980                  }__;                  }__;
1981                  unless ($continue) {                  unless ($continue) {
1982                    __EXCEPTION{DOMLS|PARSE_ERR}__;                    __CODE{ParseError}__;
1983                  }                  }
1984                  $node = shift @{$nodes};                  $node = shift @{$nodes};
1985                }                }
               $self->{has_error} = true;  
1986              }              }
1987            }            }
1988            return;            return;
# Line 1401  ClsDef: Line 2058  ClsDef:
2058    
2059        ~* (CharData) {        ~* (CharData) {
2060          lang:Perl ($data => $token.value) {          lang:Perl ($data => $token.value) {
2061            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> (\($data));
             ($self->{doc}-><M::Document.createTextNode> ($data));  
2062          }          }
2063        } (STAGO) {        } (STAGO) {
2064            &Element_ ($doc => $doc, $parent => $parent, $ns => $ns)            &Element_ ($doc => $doc, $parent => $parent, $ns => $ns)
# Line 1413  ClsDef: Line 2069  ClsDef:
2069              ?lexmode ElementContent;              ?lexmode ElementContent;
2070            }            }
2071          } (HCRO) {          } (HCRO) {
2072            &_HexadecimalCharacterReference_            &_HexadecimalCharacterReference_ ($parent => $parent);
             ($doc => $doc, $parent => $parent);  
2073    
2074            ~ (REFC) {            ~ (REFC) {
2075              ?lexmode 'ElementContent';              ?lexmode 'ElementContent';
# Line 1422  ClsDef: Line 2077  ClsDef:
2077              ?lexmode ElementContent;              ?lexmode ElementContent;
2078            }            }
2079          } (CRO) {          } (CRO) {
2080            &_NumericCharacterReference_            &_NumericCharacterReference_ ($parent => $parent);
             ($doc => $doc, $parent => $parent);  
2081    
2082            ~ (REFC) {            ~ (REFC) {
2083              ?lexmode 'ElementContent';              ?lexmode 'ElementContent';
# Line 1472  ClsDef: Line 2126  ClsDef:
2126                
2127        ~* (Name) {        ~* (Name) {
2128          my $atqname;          my $atqname;
2129          lang:Perl ($name => $token.value) {          lang:Perl ($name => $token.value) : has-error {
2130              __CODE{checkQName:: $name => $name}__;
2131            $atqname = $name;            $atqname = $name;
2132          }          }
2133                    
2134          my $vals;          my $vals;
2135          lang:Perl {          lang:Perl : has-error {
2136            if ($attrs->{$atqname}) {            if ($attrs->{$atqname}) {
2137              my $location;              my $location;
2138              __CODE{xp|get-location-from-token::              __CODE{xp|get-location-from-token::
# Line 1490  ClsDef: Line 2145  ClsDef:
2145                xp|name => {$atqname},                xp|name => {$atqname},
2146              }__;              }__;
2147              unless ($continue) {              unless ($continue) {
2148                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2149              }              }
             $self->{has_error} = true;  
2150            }            }
2151                        
2152            $vals = $attrs->{$atqname} = {            $vals = $attrs->{$atqname} = {
# Line 1628  ClsDef: Line 2282  ClsDef:
2282        ~* (STRING) {        ~* (STRING) {
2283          lang:Perl ($value => $token.value) {          lang:Perl ($value => $token.value) {
2284            $value =~ s/[\x09\x0A\x0D]/ /g;            $value =~ s/[\x09\x0A\x0D]/ /g;
2285            my $text = $self->{doc}-><M::Document.createTextNode> ($value);            $parent-><M::Node.manakaiAppendText> (\($value));
           $parent-><M::Node.appendChild> ($text);  
2286            $vals->{value} .= $value;            $vals->{value} .= $value;
2287          }          }
2288        } (HCRO) {        } (HCRO) {
# Line 1658  ClsDef: Line 2311  ClsDef:
2311          } else {          } else {
2312            ?lexmode AttributeValueLiteralE;            ?lexmode AttributeValueLiteralE;
2313          }          }
2314          } (#INVALID == '<') {
2315            lang:Perl : has-error {
2316              my $location;
2317              __CODE{xp|get-location-from-token::
2318                $token => $token,
2319                $result => $location,
2320              }__;
2321              my $continue = __DOMCore:ERROR{xp|wf-no-lt-in-attribute-values::
2322                c|location => {$location},
2323                xp|token => {$token},
2324              }__;
2325              unless ($continue) {
2326                __CODE{ParseError}__;
2327              }
2328    
2329              $parent-><M::Node.manakaiAppendText> ('<');
2330              $vals->{value} .= '<';
2331            }
2332        }        }
2333                
2334        // ~ (#EOF) { }        // ~ (#EOF) { }
# Line 1690  ClsDef: Line 2361  ClsDef:
2361        // ~ (MSE) { }        // ~ (MSE) { }
2362      } // _CDATASection_      } // _CDATASection_
2363            
2364      rule _NumericCharacterReference_ ($doc, $parent) {      rule _NumericCharacterReference_ ($parent) {
2365        ?lexmode 'NumericCharacterReference';        ?lexmode 'NumericCharacterReference';
2366                
2367        ~ (NUMBER) {        ~ (NUMBER) {
# Line 1719  ClsDef: Line 2390  ClsDef:
2390                xp|parent => {$parent},                xp|parent => {$parent},
2391              }__;              }__;
2392              unless ($continue) {              unless ($continue) {
2393                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2394              }              }
             $self->{has_error} = true;  
2395            }            }
2396            my $ncr = $doc-><M::Document.createTextNode> (chr $num);            $parent-><M::Node.manakaiAppendText> (chr $num);
           $parent-><M::Node.appendChild> ($ncr);  
2397          }          }
2398        }        }
2399                
# Line 1759  ClsDef: Line 2428  ClsDef:
2428                xp|character-number => {$num},                xp|character-number => {$num},
2429              }__;              }__;
2430              unless ($continue) {              unless ($continue) {
2431                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2432              }              }
             $self->{has_error} = true;  
2433            }            }
2434            my $ncr = $doc-><M::Document.createTextNode>            my $ncr = $doc-><M::Document.createTextNode>
2435                              (my $char = chr $num);                              (my $char = chr $num);
# Line 1806  ClsDef: Line 2474  ClsDef:
2474                xp|character-number => {$num},                xp|character-number => {$num},
2475              }__;              }__;
2476              unless ($continue) {              unless ($continue) {
2477                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2478              }              }
             $self->{has_error} = true;  
2479            }            }
2480            my $ncr = $self->{doc}-><M::Document.createTextNode>            my $char = chr $num;
2481                              (my $char = chr $num);            $parent-><M::Node.manakaiAppendText> (\$char);
           $parent-><M::Node.appendChild> ($ncr);  
2482            $vals->{value} .= $char;            $vals->{value} .= $char;
2483          }          }
2484        }        }
# Line 1849  ClsDef: Line 2515  ClsDef:
2515                xp|character-number => {$num},                xp|character-number => {$num},
2516              }__;              }__;
2517              unless ($continue) {              unless ($continue) {
2518                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2519              }              }
             $self->{has_error} = true;  
2520            }            }
2521            push @{$vals}, chr $num;            push @{$vals}, chr $num;
2522          }          }
# Line 1860  ClsDef: Line 2525  ClsDef:
2525        // ~ (REFC) { }        // ~ (REFC) { }
2526      } // _NumericCharacterReferenceEV_      } // _NumericCharacterReferenceEV_
2527            
2528      rule _HexadecimalCharacterReference_ ($doc, $parent) {      rule _HexadecimalCharacterReference_ ($parent) {
2529        ?lexmode 'HexadecimalCharacterReference';        ?lexmode 'HexadecimalCharacterReference';
2530                
2531        ~ (Hex) {        ~ (Hex) {
# Line 1889  ClsDef: Line 2554  ClsDef:
2554                xp|parent => {$parent},                xp|parent => {$parent},
2555              }__;              }__;
2556              unless ($continue) {              unless ($continue) {
2557                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2558              }              }
             $self->{has_error} = true;  
2559            }            }
2560            my $ncr = $doc-><M::Document.createTextNode>            $parent-><M::Node.manakaiAppendText> (chr $num);
                       (chr $num);  
           $parent-><M::Node.appendChild> ($ncr);  
2561          }          }
2562        }        }
2563                
# Line 1930  ClsDef: Line 2592  ClsDef:
2592                xp|character-number => {$num},                xp|character-number => {$num},
2593              }__;              }__;
2594              unless ($continue) {              unless ($continue) {
2595                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2596              }              }
             $self->{has_error} = true;  
2597            }            }
2598            my $ncr = $doc-><M::Document.createTextNode>            my $ncr = $doc-><M::Document.createTextNode>
2599                        (my $char = chr $num);                        (my $char = chr $num);
# Line 1977  ClsDef: Line 2638  ClsDef:
2638                xp|character-number => {$num},                xp|character-number => {$num},
2639              }__;              }__;
2640              unless ($continue) {              unless ($continue) {
2641                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2642              }              }
             $self->{has_error} = true;  
2643            }            }
2644            my $ncr = $self->{doc}-><M::Document.createTextNode>            my $char = chr $num;
2645                        (my $char = chr $num);            $parent-><M::Node.manakaiAppendText> (\$char);
           $parent-><M::Node.appendChild> ($ncr);  
2646            $vals->{value} .= $char;            $vals->{value} .= $char;
2647          }          }
2648        }        }
# Line 2019  ClsDef: Line 2678  ClsDef:
2678                xp|character-number => {$num},                xp|character-number => {$num},
2679              }__;              }__;
2680              unless ($continue) {              unless ($continue) {
2681                __EXCEPTION{DOMLS|PARSE_ERR}__;                __CODE{ParseError}__;
2682              }              }
             $self->{has_error} = true;  
2683            }            }
2684            push @{$vals}, chr $num;            push @{$vals}, chr $num;
2685          }          }
# Line 2040  ClsDef: Line 2698  ClsDef:
2698                
2699        ~ (Name == 'lt') {        ~ (Name == 'lt') {
2700          lang:Perl {          lang:Perl {
2701            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ('<');
                      ($self->{doc}-><M::Document.createTextNode> ('<'));  
2702          }          }
2703        } (Name == 'gt') {        } (Name == 'gt') {
2704          lang:Perl {          lang:Perl {
2705            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ('>');
                      ($self->{doc}-><M::Document.createTextNode> ('>'));  
2706          }          }
2707        } (Name == 'amp') {        } (Name == 'amp') {
2708          lang:Perl {          lang:Perl {
2709            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ('&');
                      ($self->{doc}-><M::Document.createTextNode> ('&'));  
2710          }          }
2711        } (Name == 'quot') {        } (Name == 'quot') {
2712          lang:Perl {          lang:Perl {
2713            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ('"');
                      ($self->{doc}-><M::Document.createTextNode> ('"'));  
2714          }          }
2715        } (Name == 'apos') {        } (Name == 'apos') {
2716          lang:Perl {          lang:Perl {
2717            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ("'");
                      ($self->{doc}-><M::Document.createTextNode> ("'"));  
2718          }          }
2719        } (Name) {        } (Name) {
2720          my $er;          my $er;
2721          lang:Perl ($name => $token.value) {          lang:Perl ($name => $token.value) : has-error {
2722            ## TODO: Namespace well-formedness            __CODE{checkNCName:: $name => $name}__;
2723            ## TODO: Entity declared constraints            
2724            $er = $doc-><M::Document.createEntityReference>            $er = $doc-><M::Document.createEntityReference>
2725                             ($name);                             ($name);
2726              $er-><AS::Node.textContent> ('');
2727                ## NOTE: When document entity (and entities referenced directly
2728                ##       or indirectly from it) is parsed, no general entity
2729                ##       node have its replacement tree.  During general
2730                ##       entity node collection construction, however,
2731                ##       some entity node has replacement tree.
2732            $parent-><M::Node.appendChild> ($er);            $parent-><M::Node.appendChild> ($er);
2733            push @{$self->{entity}}, <Code::getCopyOfEntityState::  
2734              my $ent = $self->{general_entity}->{$name};
2735              if (not $ent) {  # no entity declaration
2736                if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2737                  my $location;
2738                  __CODE{xp|get-location-from-token::
2739                    $token => {$token},
2740                    $result => {$location},
2741                  }__;
2742                  my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2743                    xp|error-token => {$token},
2744                    c|location => {$location},
2745                    xp|name => {$name},
2746                  }__;
2747                  unless ($continue) {
2748                    __CODE{ParseError}__;
2749                  }
2750                }                 # Otherwise VC error
2751                push @{$self->{entity}}, <Code::getEmptyEntityState::
2752                                                  $name = $name>;
2753                $er-><AS::x|EntityReference.isExpanded> (false);
2754    
2755              } else {         # there IS entity declaration
2756                if (($self->{standalone} or not $self->{has_xref}) and
2757                    $ent->{is_externally_declared} and
2758                    not $self->{entity}->[-1]->{is_externally_declared}) {
2759                  my $location;
2760                  __CODE{xp|get-location-from-token::
2761                    $token => {$token},
2762                    $result => {$location},
2763                  }__;
2764                  my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2765                    xp|error-token => {$token},
2766                    c|location => {$location},
2767                    xp|name => {$name},
2768                  }__;
2769                  unless ($continue) {
2770                    __CODE{ParseError}__;
2771                  }
2772                }          
2773                $er-><AS::x|EntityReference.isExpanded>
2774                       ($ent->{has_replacement_text});
2775                push @{$self->{entity}}, <Code::getCopyOfEntityState::
2776                                              $entity_type = 'general_entity',                                              $entity_type = 'general_entity',
2777                                              $entity_name = $name>;                                              $entity_name = $name>;
2778    
2779                if (defined $ent->{notation}) {
2780                  my $location;
2781                  __CODE{xp|get-location-from-token::
2782                    $token => {$token},
2783                    $result => {$location},
2784                  }__;
2785                  my $continue = __c|ERROR{xp|wf-parsed-entity::
2786                    xp|error-token => {$token},
2787                    c|location => {$location},
2788                    xp|name => {$name},
2789                  }__;
2790                  unless ($continue) {  
2791                    __CODE{ParseError}__;
2792                  }
2793                } # if unparsed entity
2794                
2795                if ($ent->{is_opened}) {
2796                  my $location;
2797                  __CODE{xp|get-location-from-token::
2798                    $token => {$token},
2799                    $result => {$location},
2800                  }__;
2801                  my $continue = __c|ERROR{xp|wf-no-recursion::
2802                    xp|error-token => {$token},
2803                    c|location => {$location},
2804                    xp|name => {$name},
2805                  }__;
2806                  unless ($continue) {  
2807                    __CODE{ParseError}__;
2808                  }
2809                  open my $empty, '<', \'';
2810                  $self->{entity}->[-1]->{fh} = $empty;
2811                  $er-><AS::x|EntityReference.isExpanded> (false);
2812                } # recursive
2813                $ent->{is_opened} = true;
2814              } # entity declared
2815            $self->{location} = $self->{entity}->[-1];            $self->{location} = $self->{entity}->[-1];
2816            push @{$self->{entity_token}}, $self->{token};            push @{$self->{entity_token}}, $self->{token};
2817            $self->{token} = [];            $self->{token} = [];
# Line 2085  ClsDef: Line 2823  ClsDef:
2823          &content ($doc => $doc, $parent => $er, $ns => $ns);          &content ($doc => $doc, $parent => $er, $ns => $ns);
2824          ~ (#EOF) { }          ~ (#EOF) { }
2825          lang:Perl {          lang:Perl {
2826              $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2827                   ->{is_opened} = false
2828                if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2829            $self->{token} = pop @{$self->{entity_token}};            $self->{token} = pop @{$self->{entity_token}};
2830            $self->{char} = pop @{$self->{entity_char}};            $self->{char} = pop @{$self->{entity_char}};
2831            pop @{$self->{entity}};            pop (@{$self->{entity}})->{close_file}->();
2832            $self->{location} = $self->{entity}->[-1];            $self->{location} = $self->{entity}->[-1];
2833          }          }
2834    
# Line 2142  ClsDef: Line 2883  ClsDef:
2883          }          }
2884        } (Name) {        } (Name) {
2885          my $er;          my $er;
2886          lang:Perl ($name => $token.value) {          lang:Perl ($name => $token.value) : has-error {
2887            ## TODO: Namespace well-formedness            __CODE{checkNCName:: $name => $name}__;
2888            ## TODO: Entity declared constraints            
           ## TODO: No external entity constraint  
2889            $er = $self->{doc}-><M::Document.createEntityReference> ($name);            $er = $self->{doc}-><M::Document.createEntityReference> ($name);
2890            push @{$vals->{nodes}}, $er;            $er-><AS::Node.textContent> ('');
2891            push @{$self->{entity}}, <Code::getCopyOfEntityState::              ## NOTE: When document entity (and entities referenced directly
2892                ##       or indirectly from it) is parsed, no general entity
2893                ##       node have its replacement tree.  During general
2894                ##       entity node collection construction, however,
2895                ##       some entity node has replacement tree.
2896              my $ent = $self->{general_entity}->{$name};
2897              if (not $ent) {  # no entity declaration
2898                if ($self->{standalone} or not $self->{has_xref}) { # WFC error
2899                  my $location;
2900                  __CODE{xp|get-location-from-token::
2901                    $token => {$token},
2902                    $result => {$location},
2903                  }__;
2904                  my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2905                    xp|error-token => {$token},
2906                    c|location => {$location},
2907                    xp|name => {$name},
2908                  }__;
2909                  unless ($continue) {
2910                    __CODE{ParseError}__;
2911                  }
2912                }                 # Otherwise VC error
2913                push @{$self->{entity}}, <Code::getEmptyEntityState::
2914                                                  $name = $name>;
2915                $er-><AS::x|EntityReference.isExpanded> (false);
2916    
2917              } else {         # there IS entity declaration
2918                if (($self->{standalone} or not $self->{has_xref}) and
2919                    $ent->{is_externally_declared} and
2920                    not $self->{entity}->[-1]->{is_externally_declared}) {
2921                  my $location;
2922                  __CODE{xp|get-location-from-token::
2923                    $token => {$token},
2924                    $result => {$location},
2925                  }__;
2926                  my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
2927                    xp|error-token => {$token},
2928                    c|location => {$location},
2929                    xp|name => {$name},
2930                  }__;
2931                  unless ($continue) {
2932                    __CODE{ParseError}__;
2933                  }
2934                }          
2935    
2936                if ($ent->{is_external_entity}) {
2937                  my $location;
2938                  __CODE{xp|get-location-from-token::
2939                    $token => {$token},
2940                    $result => {$location},
2941                  }__;
2942                  my $continue = __c|ERROR{xp|wf-no-external-entity-references::
2943                    xp|error-token => {$token},
2944                    c|location => {$location},
2945                    xp|name => {$name},
2946                  }__;
2947                  unless ($continue) {  
2948                    __CODE{ParseError}__;
2949                  }
2950                  ## NOTE: |xp:wf-parsed-entity| is not checked
2951                } # if external entity
2952    
2953                $er-><AS::x|EntityReference.isExpanded>
2954                       ($ent->{has_replacement_text});
2955                push @{$self->{entity}}, <Code::getCopyOfEntityState::
2956                                              $entity_type = 'general_entity',                                              $entity_type = 'general_entity',
2957                                              $entity_name = $name>;                                              $entity_name = $name>;
2958                
2959                if ($ent->{is_opened}) {
2960                  my $location;
2961                  __CODE{xp|get-location-from-token::
2962                    $token => {$token},
2963                    $result => {$location},
2964                  }__;
2965                  my $continue = __c|ERROR{xp|wf-no-recursion::
2966                    xp|error-token => {$token},
2967                    c|location => {$location},
2968                    xp|name => {$name},
2969                  }__;
2970                  unless ($continue) {  
2971                    __CODE{ParseError}__;
2972                  }
2973                  open my $empty, '<', \'';
2974                  $self->{entity}->[-1]->{fh} = $empty;
2975                  $er-><AS::x|EntityReference.isExpanded> (false);
2976                } # recursive
2977                $ent->{is_opened} = true;
2978              }
2979              push @{$vals->{nodes}}, $er;
2980            $self->{location} = $self->{entity}->[-1];            $self->{location} = $self->{entity}->[-1];
2981            push @{$self->{entity_token}}, $self->{token};            push @{$self->{entity_token}}, $self->{token};
2982            $self->{token} = [];            $self->{token} = [];
# Line 2162  ClsDef: Line 2988  ClsDef:
2988          &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);                &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);      
2989          ~ (#EOF) { }          ~ (#EOF) { }
2990          lang:Perl {          lang:Perl {
2991              $self->{general_entity}->{$self->{entity}->[-1]->{name}}
2992                   ->{is_opened} = false
2993                if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
2994            $self->{token} = pop @{$self->{entity_token}};            $self->{token} = pop @{$self->{entity_token}};
2995            $self->{char} = pop @{$self->{entity_char}};            $self->{char} = pop @{$self->{entity_char}};
2996            pop @{$self->{entity}};            pop (@{$self->{entity}})->{close_file}->();
2997            $self->{location} = $self->{entity}->[-1];            $self->{location} = $self->{entity}->[-1];
2998          }          }
2999    
# Line 2187  ClsDef: Line 3016  ClsDef:
3016                
3017        ~ (Name == 'lt') {        ~ (Name == 'lt') {
3018          lang:Perl {          lang:Perl {
3019            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ('<');
                      ($self->{doc}-><M::Document.createTextNode> ('<'));  
3020            $vals->{value} .= '<';            $vals->{value} .= '<';
3021          }          }
3022        } (Name == 'gt') {        } (Name == 'gt') {
3023          lang:Perl {          lang:Perl {
3024            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ('>');
                      ($self->{doc}-><M::Document.createTextNode> ('>'));  
3025            $vals->{value} .= '>';            $vals->{value} .= '>';
3026          }          }
3027        } (Name == 'amp') {        } (Name == 'amp') {
3028          lang:Perl {          lang:Perl {
3029            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ('&');
                      ($self->{doc}-><M::Document.createTextNode> ('&'));  
3030            $vals->{value} .= '&';            $vals->{value} .= '&';
3031          }          }
3032        } (Name == 'quot') {        } (Name == 'quot') {
3033          lang:Perl {          lang:Perl {
3034            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ('"');
                      ($self->{doc}-><M::Document.createTextNode> ('"'));  
3035            $vals->{value} .= '"';            $vals->{value} .= '"';
3036          }          }
3037        } (Name == 'apos') {        } (Name == 'apos') {
3038          lang:Perl {          lang:Perl {
3039            $parent-><M::Node.appendChild>            $parent-><M::Node.manakaiAppendText> ("'");
                      ($self->{doc}-><M::Document.createTextNode> ("'"));  
3040            $vals->{value} .= "'";            $vals->{value} .= "'";
3041          }          }
3042        } (Name) {        } (Name) {
3043          my $er;          my $er;
3044          lang:Perl ($name => $token.value) {          lang:Perl ($name => $token.value) : has-error {
3045            ## TODO: Namespace well-formedness            __CODE{checkNCName:: $name => $name}__;
3046            ## TODO: Entity declared constraints  
           ## TODO: No external entity constraint  
3047            $er = $self->{doc}-><M::Document.createEntityReference> ($name);            $er = $self->{doc}-><M::Document.createEntityReference> ($name);
3048            $parent-><M::Node.appendChild> ($er);            $er-><AS::Node.textContent> ('');
3049            push @{$self->{entity}}, <Code::getCopyOfEntityState::              ## NOTE: When document entity (and entities referenced directly
3050                ##       or indirectly from it) is parsed, no general entity
3051                ##       node have its replacement tree.  During general
3052                ##       entity node collection construction, however,
3053                ##       some entity node has replacement tree.
3054              my $ent = $self->{general_entity}->{$name};
3055              if (not $ent) {  # no entity declaration
3056                if ($self->{standalone} or not $self->{has_xref}) { # WFC error
3057                  my $location;
3058                  __CODE{xp|get-location-from-token::
3059                    $token => {$token},
3060                    $result => {$location},
3061                  }__;
3062                  my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
3063                    xp|error-token => {$token},
3064                    c|location => {$location},
3065                    xp|name => {$name},
3066                  }__;
3067                  unless ($continue) {
3068                    __CODE{ParseError}__;
3069                  }
3070                }                 # Otherwise VC error
3071                push @{$self->{entity}}, <Code::getEmptyEntityState::
3072                                                  $name = $name>;
3073                $er-><AS::x|EntityReference.isExpanded> (false);
3074    
3075              } else {         # there IS entity declaration
3076                if (($self->{standalone} or not $self->{has_xref}) and
3077                    $ent->{is_externally_declared} and
3078                    not $self->{entity}->[-1]->{is_externally_declared}) {
3079                  my $location;
3080                  __CODE{xp|get-location-from-token::
3081                    $token => {$token},
3082                    $result => {$location},
3083                  }__;
3084                  my $continue = __DOMCore:ERROR{xp|wf-entity-declared::
3085                    xp|error-token => {$token},
3086                    c|location => {$location},
3087                    xp|name => {$name},
3088                  }__;
3089                  unless ($continue) {
3090                    __CODE{ParseError}__;
3091                  }
3092                }          
3093    
3094                if ($ent->{is_external_entity}) {
3095                  my $location;
3096                  __CODE{xp|get-location-from-token::
3097                    $token => {$token},
3098                    $result => {$location},
3099                  }__;
3100                  my $continue = __c|ERROR{xp|wf-no-external-entity-references::
3101                    xp|error-token => {$token},
3102                    c|location => {$location},
3103                    xp|name => {$name},
3104                  }__;
3105                  unless ($continue) {  
3106                    __CODE{ParseError}__;
3107                  }
3108                  ## NOTE: |xp:wf-parsed-entity| is not checked
3109                } # if external entity
3110    
3111                $er-><AS::x|EntityReference.isExpanded>
3112                       ($ent->{has_replacement_text});
3113                push @{$self->{entity}}, <Code::getCopyOfEntityState::
3114                                              $entity_type = 'general_entity',                                              $entity_type = 'general_entity',
3115                                              $entity_name = $name>;                                              $entity_name = $name>;
3116                
3117                if ($ent->{is_opened}) {
3118                  my $location;
3119                  __CODE{xp|get-location-from-token::
3120                    $token => {$token},
3121                    $result => {$location},
3122                  }__;
3123                  my $continue = __c|ERROR{xp|wf-no-recursion::
3124                    xp|error-token => {$token},
3125                    c|location => {$location},
3126                    xp|name => {$name},
3127                  }__;
3128                  unless ($continue) {  
3129                    __CODE{ParseError}__;
3130                  }
3131                  open my $empty, '<', \'';
3132                  $self->{entity}->[-1]->{fh} = $empty;
3133                  $er-><AS::x|EntityReference.isExpanded> (false);
3134                } # recursive
3135                $ent->{is_opened} = true;
3136              }
3137              $parent-><M::Node.appendChild> ($er);
3138            $self->{location} = $self->{entity}->[-1];            $self->{location} = $self->{entity}->[-1];
3139            push @{$self->{entity_token}}, $self->{token};            push @{$self->{entity_token}}, $self->{token};
3140            $self->{token} = [];            $self->{token} = [];
# Line 2237  ClsDef: Line 3146  ClsDef:
3146          &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);                &AttributeValueLiteralE_ ($parent => $er, $vals => $vals);      
3147          ~ (#EOF) { }          ~ (#EOF) { }
3148          lang:Perl {          lang:Perl {
3149              $self->{general_entity}->{$self->{entity}->[-1]->{name}}
3150                   ->{is_opened} = false
3151                if $self->{general_entity}->{$self->{entity}->[-1]->{name}};
3152            $self->{token} = pop @{$self->{entity_token}};            $self->{token} = pop @{$self->{entity_token}};
3153            $self->{char} = pop @{$self->{entity_char}};            $self->{char} = pop @{$self->{entity_char}};
3154            pop @{$self->{entity}};            pop (@{$self->{entity}})->{close_file}->();
3155            $self->{location} = $self->{entity}->[-1];            $self->{location} = $self->{entity}->[-1];
3156          }          }
3157    
# Line 2253  ClsDef: Line 3165  ClsDef:
3165      } // _GeneralEntityReferenceAE_      } // _GeneralEntityReferenceAE_
3166            
3167      /*      /*
3168        General entity reference in literal entity value        General Entity Reference in Literal Entity Value in Entity Declaration
3169      */      */
3170      rule _GeneralEntityReferenceEV_ ($vals) {      rule _GeneralEntityReferenceEV_ ($vals) {
3171        ?lexmode 'EntityReference';        ?lexmode 'EntityReference';
3172                
3173        ~ (Name) {        ~ (Name) {
3174          lang:Perl ($name => $token.value) {          lang:Perl ($name => $token.value) {
3175            ## TODO: Namespace well-formedness            __CODE{checkNCName:: $name => $name}__;
           ## TODO: Entity declared constraints  
3176            push @$vals, $name;            push @$vals, $name;
3177          }          }
3178            /*
3179              WFCs such as Entity Declared are not checked
3180              <http://www.w3.org/TR/xml11/#bypass>
3181    
3182              Note that violation to the Parsed Entity WFC is an error
3183              rather than fatal error here.
3184            */
3185        }        }
3186    
3187        // No expansion        // No expansion
# Line 2281  ClsDef: Line 3199  ClsDef:
3199                
3200        ~ (S) { }        ~ (S) { }
3201                
       my $node;  
3202        // Document type name        // Document type name
3203        my $name;        my $name;
3204        ~ (Name) {        ~ (Name) {
3205          lang:Perl ($v => $token.value) {          lang:Perl ($v => $token.value) {
3206              __CODE{checkQName:: $name => $v}__;
3207            $name = $v;            $name = $v;
3208          }          }
3209        }        }
3210    
3211          my $node;
3212          my $decl;
3213        lang:Perl {        lang:Perl {
3214          $self->{docx} = $self->{doc}          $self->{docx} = $self->{doc}
3215                               -><M::Node.getFeature> (<Q::fe:XDoctype>, '3.0');                               -><M::Node.getFeature> (<Q::fe:XDoctype>, '3.0');
3216          $node = $self->{docx}-><M::DocumentXDoctype.createDocumentTypeDefinition>          $node = $self->{docx}-><M::DocumentXDoctype.createDocumentTypeDefinition>
3217                                   ($name);                                   ($name);
3218            $decl = $self->{dtdecl} = $node-><M::Node.getFeature>
3219                                               (<Q::fe:XDoctypeDeclaration>, '3.0');
3220        }        }
3221    
3222          my $has_extid;
3223        ~? (S) {        ~? (S) {
3224          ~? (Name == 'PUBLIC') {          ~? (Name == 'PUBLIC') {
3225            ~ (S) { }            ~ (S) { }
3226        
3227            &PubidLiteral ($doc => $doc);            &PubidLiteral ($decl => $decl);
3228        
3229            ~ (S) { }            ~ (S) { }
3230        
3231            &SystemLiteral ($doc => $doc);            &SystemLiteral ($decl => $decl);
3232        
3233            ~? (S) { }            ~? (S) { }
3234    
3235              lang:Perl {
3236                $self->{has_xref} = true;
3237                $has_extid = true;
3238              }
3239          } (Name == 'SYSTEM') {          } (Name == 'SYSTEM') {
3240            ~ (S) { }            ~ (S) { }
3241        
3242            &SystemLiteral ($doc => $doc);            &SystemLiteral ($decl => $decl);
3243        
3244            ~? (S) { }            ~? (S) { }
3245    
3246              lang:Perl {
3247                $self->{has_xref} = true;
3248                $has_extid = true;
3249              }
3250          }          }
3251        }        }
3252          
3253        lang:Perl {        lang:Perl {
3254          $self->{dtdef} = $node;          $self->{dtdef} = $node;
3255          $doc-><M::Node.appendChild> ($node);          $self->{doc}-><M::Node.appendChild> ($node);
3256          $doc-><AG::Document.domConfig>          $self->{doc_cfg}-><M::c|DOMConfiguration.setParameter>
3257              -><M::c|DOMConfiguration.setParameter>                              ('schema-type' => <Q::xml-dtd:>);
3258                  ('schema-type' => <Q::xml-dtd:>);          ## ISSUE: Should default schema language information be
3259            ##        preserved by some other flag?
3260        }        }
3261                
3262        ~? (DSO) {        ~? (DSO) {
# Line 2335  ClsDef: Line 3270  ClsDef:
3270    
3271          ~? (S) { }          ~? (S) { }
3272        }        }
3273          
3274        // TODO: set $self->{standalone} true if only internal subset        // TODO: Read and process external subset if any.
3275        //       with no param ref        lang:Perl {
3276            $self->{dont_process} = true if $has_extid;
3277          }
3278    
3279        // ~ (MDC) { }        // ~ (MDC) { }
3280      } // _DocumentTypeDeclaration_      } // _DocumentTypeDeclaration_
3281    
3282      rule PubidLiteral ($doc) {      /*
3283          Public Identifier Literal
3284        */
3285        rule PubidLiteral ($decl) {
3286          my $pubid;
3287          my $pubid_token;
3288        ~ (LIT) {        ~ (LIT) {
3289          ?lexmode SystemLiteral;          ?lexmode SystemLiteral;
3290    
3291          ~? (STRING) {          ~? (STRING) {
3292            // TODO: Charrange check & normalization is required            lang:Perl ($v => $token.value) {
3293                $pubid = $v;
3294                $pubid_token = $token;
3295              }
3296          }          }
3297    
3298          ~ (LIT) {          ~ (LIT) {
# Line 2360  ClsDef: Line 3304  ClsDef:
3304          ?lexmode SystemLiteralA;          ?lexmode SystemLiteralA;
3305    
3306          ~? (STRING) {          ~? (STRING) {
3307            // TODO: Charrange check & normalization is required            lang:Perl ($v => $token.value) {
3308                $pubid = $v;
3309                $pubid_token = $token;
3310              }
3311          }          }
3312    
3313          ~ (LITA) {          ~ (LITA) {
# Line 2370  ClsDef: Line 3316  ClsDef:
3316            ?lexmode MarkupDeclaration;            ?lexmode MarkupDeclaration;
3317          }          }
3318        }        }
3319    
3320          if-true ($pubid_token) {
3321            lang:Perl : has-error {
3322              if ($pubid =~ m{[^\x20\x0D\x0Aa-zA-Z0-9'()+,./:=?;!*#\@\$_%-]}s) {
3323                my $location;
3324                __CODE{xp|get-location-from-token::
3325                  $token => {$pubid_token},
3326                  $result => {$location},
3327                }__;
3328                                      ## Should this be other (new) error type?
3329                my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
3330                  xp|error-token => {$token},
3331                  c|location => {$location},
3332                }__;
3333                unless ($continue) {
3334                  __CODE{ParseError}__;
3335                }
3336              }
3337    
3338              ## NOTE: U+0009 is syntactically illegal.
3339              $pubid =~ s/[\x09\x0A\x0D\x20]+/\x20/gs;
3340              $pubid =~ s/\A\x20//s;
3341              $pubid =~ s/\x20\z//s;
3342                     ## NOTE: Bare attribute name is written.
3343              $decl->public_id ($pubid);
3344            }
3345          }
3346      } // PubidLiteral      } // PubidLiteral
3347    
3348      rule SystemLiteral ($doc) {      /*
3349          System Identifier Literal
3350        */
3351        rule SystemLiteral ($decl) {
3352        ~ (LIT) {        ~ (LIT) {
3353          ?lexmode SystemLiteral;          ?lexmode SystemLiteral;
3354          &_SystemLiteral ($doc => $doc);          &_SystemLiteral ($decl => $decl);
3355        } (LITA) {        } (LITA) {
3356          ?lexmode SystemLiteralA;          ?lexmode SystemLiteralA;
3357          &_SystemLiteral ($doc => $doc);          &_SystemLiteral ($decl => $decl);
3358        }        }
3359      } // SystemLiteral      } // SystemLiteral
3360    
3361      rule _SystemLiteral ($doc) {      /*
3362        ~? (STRING) {        System Identifier Literal Content
3363    
3364            Used in document type declaration, entity declaration,
3365            and notation declaration.
3366        */
3367        rule _SystemLiteral ($decl) {
3368          // LIT or LITA
3369    
3370          ~? (STRING) {
3371            lang:Perl ($v => $token.value) {
3372              $decl-><AS::x|Entity.systemId> ($v);
3373              $decl-><AS::x|Entity.manakaiDeclarationBaseURI>
3374                       ($self->{location}->{base_uri});
3375            }
3376        }        }
3377    
3378        ~ (LIT) {        ~ (LIT) {
# Line 2425  ClsDef: Line 3413  ClsDef:
3413        } (PERO) {        } (PERO) {
3414          ?lexmode EntityReference;          ?lexmode EntityReference;
3415    
3416            lang:Perl {
3417              $self->{has_xref} = true;
3418              $self->{dont_process} = true;
3419            }
3420    
3421          ~ (Name) {          ~ (Name) {
3422              // TODO:             __CODE{checkNCName:: $name => $name}__;
3423    
3424          }          }
3425    
# Line 2445  ClsDef: Line 3439  ClsDef:
3439        ~ (S) { }        ~ (S) { }
3440    
3441        ~ (Name) {        ~ (Name) {
3442            // TODO:             __CODE{checkQName:: $name => $name}__;
3443    
3444        }        }
3445    
# Line 2508  ClsDef: Line 3503  ClsDef:
3503            ~? (S) { }            ~? (S) { }
3504    
3505            ~ (Name) {            ~ (Name) {
3506                // TODO: Name & QName check
3507    
3508            }            }
3509    
# Line 2574  ClsDef: Line 3570  ClsDef:
3570            
3571      rule ContentParticle ($doc) {      rule ContentParticle ($doc) {
3572        ~ (Name) {        ~ (Name) {
3573            // TODO: Name & QName check
3574    
3575        } (MGO) {        } (MGO) {
3576          ~? (S) { }          ~? (S) { }
# Line 2604  ClsDef: Line 3601  ClsDef:
3601        my $name;        my $name;
3602        ~ (Name) {        ~ (Name) {
3603          lang:Perl ($v => $token.value) {          lang:Perl ($v => $token.value) {
3604              __CODE{checkQName:: $name => $v}__;
3605            $name = $v;            $name = $v;
3606          }          }
3607        } else {        } else {
# Line 2627  ClsDef: Line 3625  ClsDef:
3625    
3626        ~* (Name) {        ~* (Name) {
3627          my $at;          my $at;
3628          lang:Perl ($v => $token.value) {          lang:Perl ($v => $token.value) : has-error {
3629              __CODE{checkQName:: $name => $v}__;
3630            $docxd ||= $doc-><M::Node.getFeature>            $docxd ||= $doc-><M::Node.getFeature>
3631                               (<Q::fe:XDoctype>, '3.0');                               (<Q::fe:XDoctype>, '3.0');
3632            $at = $docxd-><M::DocumentXDoctype.createAttributeDefinition> ($v);            $at = $docxd-><M::DocumentXDoctype.createAttributeDefinition> ($v);
3633            unless (exists $et-><AG::ETDef.attributeDefinitions>->{$v}) {            if (exists $et-><AG::ETDef.attributeDefinitions>->{$v}) {
3634                my $location;
3635                __CODE{xp|get-location-from-token::
3636                  $token => {$token},
3637                  $result => {$location},
3638                }__;
3639                my $continue = __c|ERROR{xp|warning-attribute-definition-ignored::
3640                  xp|error-token => {$token},
3641                  c|location => {$location},
3642                  xp|name => {$v},
3643                }__;
3644                unless ($continue) {
3645                  __CODE{ParseError}__;
3646                }            
3647              } elsif ($self->{dont_process} and not $self->{standalone}) {
3648                my $location;
3649                __CODE{xp|get-location-from-token::
3650                  $token => {$token},
3651                  $result => {$location},
3652                }__;
3653                my $continue = __c|ERROR{
3654                xp|warning-attribute-definition-not-processed::
3655                  xp|error-token => {$token},
3656                  c|location => {$location},
3657                  xp|name => {$v},
3658                }__;
3659                unless ($continue) {
3660                  __CODE{ParseError}__;
3661                }            
3662              } else {
3663              $et-><M::ETDef.setAttributeDefinitionNode> ($at);              $et-><M::ETDef.setAttributeDefinitionNode> ($at);
3664              $self->{attr}->{$name}->{$v} = $at;              $self->{attr}->{$name}->{$v} = $at;
3665            }            }
# Line 2653  ClsDef: Line 3681  ClsDef:
3681              ~? (S) { }              ~? (S) { }
3682    
3683              ~+ (Name) {              ~+ (Name) {
3684                lang:Perl ($v => $token.value) {                lang:Perl ($v => $token.value) : has-error {
3685                    __CODE{checkNCName:: $name => $v}__;
3686                  push @$kwd, $v;                  push @$kwd, $v;
3687                }                }
3688    
# Line 2828  ClsDef: Line 3857  ClsDef:
3857      } // _AttlistDeclaration      } // _AttlistDeclaration
3858    
3859      /*      /*
3860        Entity declaration        Entity Declaration
3861      */      */
3862      rule _EntityDeclaration ($doc) {      rule _EntityDeclaration ($doc) {
3863        // ~ (MDO) { }        // ~ (MDO) { }
# Line 2836  ClsDef: Line 3865  ClsDef:
3865    
3866        ~ (S) { }        ~ (S) { }
3867    
3868          my $is_param_entity;
3869        my $decl;        my $decl;
3870        lang:Perl { $decl = { name => '#ILLEGAL' }; }        lang:Perl {
3871            $decl = {
3872              name => '#ILLEGAL',
3873              reptxt => \'',
3874              is_external_entity => false,
3875              document_uri => $self->{location}->{document_uri},
3876              base_uri => $self->{location}->{base_uri},
3877            };
3878          }
3879    
3880        ~? (PERO) {        ~? (PERO) {
3881          ~ (S) { }          ~ (S) { }
3882          lang:Perl {          lang:Perl {
3883            $decl->{is_param_entity} = true;            $is_param_entity = $decl->{is_param_entity} = true;
3884          }          }
3885        }        }
3886    
3887          /*
3888            TODO: Set |$decl->{is_externally_declared}| flag
3889                  and |Entity.isExternallyDeclared| attribute
3890                  for entity declarations in external subset or
3891                  in parameter entity.
3892          */
3893    
3894        ~ (Name) {        ~ (Name) {
3895          lang:Perl ($v => $token.value) {          lang:Perl ($v => $token.value) {
3896              __CODE{checkNCName:: $name => $v}__;
3897            $decl->{name} = $v;            $decl->{name} = $v;
3898          }          }
3899        }        }
3900    
3901          my $node;
3902        lang:Perl {        lang:Perl {
3903            $node =
3904          $decl->{node} = $self->{docx}-><M::DocumentXDoctype.createGeneralEntity>          $decl->{node} = $self->{docx}-><M::DocumentXDoctype.createGeneralEntity>
3905                                           ($decl->{name});                                           ($decl->{name});
3906          ## TODO: Parameter entity...          ## TODO: Parameter entity...
# Line 2867  ClsDef: Line 3915  ClsDef:
3915        } (Name == 'PUBLIC') {        } (Name == 'PUBLIC') {
3916          ~ (S) { }          ~ (S) { }
3917    
3918          &PubidLiteral ($doc => $doc, $decl => $decl);          &PubidLiteral ($decl => $node);
3919    
3920          ~ (S) { }          ~ (S) { }
3921    
3922          &SystemLiteral ($doc => $doc, $decl => $decl);          &SystemLiteral ($decl => $node);
3923    
3924            lang:Perl {
3925              $decl->{is_external_entity} = true;
3926            }
3927        } (Name == 'SYSTEM') {        } (Name == 'SYSTEM') {
3928          ~ (S) { }          ~ (S) { }
3929    
3930          &SystemLiteral ($doc => $doc, $decl => $decl);          &SystemLiteral ($decl => $node);
3931    
3932            lang:Perl {
3933              $decl->{is_external_entity} = true;
3934            }
3935        }        }
3936    
3937        ~? (S) {        ~? (S) {
3938          ~? (Name == 'NDATA') {          ~? (Name == 'NDATA') {
3939            // TODO: error if parameter entity            if-true ($is_param_entity) {
3940                lang:Perl : has-error {
3941                  my $location;
3942                  __CODE{xp|get-location-from-token::
3943                    $token => {$token},
3944                    $result => {$location},
3945                  }__;
3946                  my $continue = __DOMCore:ERROR{xp|wf-syntax-error::
3947                    xp|error-token => {$token},
3948                    c|location => {$location},
3949                  }__;
3950                  unless ($continue) {
3951                    __CODE{ParseError}__;
3952                  }
3953                }
3954              }
3955    
3956            ~ (S) { }            ~ (S) { }
3957        
3958            ~ (Name) {            ~ (Name) {
3959              lang:Perl ($v => $token.value) {              lang:Perl ($v => $token.value) : has-error {
3960                  __CODE{checkNCName:: $name => $v}__;
3961                $decl->{notation} = $v;                $decl->{notation} = $v;
3962                $decl->{node}-><AG::x|Entity.notationName> ($v);                $decl->{node}-><AG::x|Entity.notationName> ($v);
3963              }              }
# Line 2895  ClsDef: Line 3967  ClsDef:
3967          }          }
3968        }        }
3969    
3970        lang:Perl {        lang:Perl : has-error {
3971          if ($self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}          if ($self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}
3972                   ->{$decl->{name}}) {                   ->{$decl->{name}}) {
3973            ## TODO: warning            ## Predefined entity
3974            ## TODO: predefined entity error check            if (not $decl->{is_param_entity} and
3975                  {lt => true, gt => true, amp => true,
3976                   quot => true, apos => true}->{$decl->{name}}) {
3977                if ($decl->{is_external_entity}) {
3978                  my $location;
3979                  __CODE{xp|get-location-from-token::
3980                    $token => {$token},
3981                    $result => {$location},
3982                  }__;
3983                  my $continue = __c|ERROR{xp|error-internal-predefined-entity::
3984                    xp|error-token => {$token},
3985                    c|location => {$location},
3986                    xp|name => {$decl->{name}},
3987                  }__;
3988                  unless ($continue) {
3989                    __CODE{ParseError}__;
3990                  }              
3991                } elsif (
3992                  not ({gt => true, apos => true, quot => true}->{$decl->{name}} and
3993                       ${$decl->{reptxt}} eq {
3994                         gt => '>', apos => "'", quot => '"',
3995                       }->{$decl->{name}}) and
3996                  not (${$decl->{reptxt}} =~ /\A&#0*@{[{
3997                         lt => '60', gt => '62', amp => '38',
3998                         apos => '39', quot => '34',
3999                       }->{$decl->{name}}]};\z/) and
4000                  not (${$decl->{reptxt}} =~ /\A&#x0*(?:(?i)@{[{
4001                         lt => '3C', gt => '3E', amp => '26',
4002                         apos => '27', quot => '22',
4003                       }->{$decl->{name}}]});\z/)
4004                ) {
4005                  ## NOTE: See "SuikaWiki - Predefined Entities"
4006                  ##       "http://suika.fam.cx/gate/2005/sw/%E5%AE%9A%E7%BE%A9%E6%B8%88%E5%AE%9F%E4%BD%93".
4007                  my $location;
4008                  __CODE{xp|get-location-from-token::
4009                    $token => {$token},
4010                    $result => {$location},
4011                  }__;
4012                  my $continue = __c|ERROR{xp|error-malformed-predefined-entity::
4013                    xp|error-token => {$token},
4014                    c|location => {$location},
4015                    xp|name => {$decl->{name}},
4016                    xp|replacement-text => {${$decl->{reptxt}}},
4017                  }__;
4018                  unless ($continue) {
4019                    __CODE{ParseError}__;
4020                  }
4021                }
4022                $self->{dtdecl}->{<H::mn:node>}->{{
4023                  lt => <H::d|hasLtDeclaration>,
4024                  gt => <H::d|hasGtDeclaration>,
4025                  amp => <H::d|hasAmpDeclaration>,
4026                  apos => <H::d|hasAposDeclaration>,
4027                  quot => <H::d|hasQuotDeclaration>,
4028                }->{$decl->{name}}} = true;
4029              } else {  ## Dupulicating declaration
4030                my $location;
4031                __CODE{xp|get-location-from-token::
4032                  $token => {$token},
4033                  $result => {$location},
4034                }__;
4035                my $continue = __c|ERROR{xp|warning-entity-declaration-ignored::
4036                  xp|error-token => {$token},
4037                  c|location => {$location},
4038                  xp|name => {$decl->{name}},
4039                }__;
4040                unless ($continue) {
4041                  __CODE{ParseError}__;
4042                }
4043              }
4044            } elsif ($self->{dont_process} and not $self->{standalone}) {
4045              ## TODO: |standalone| and parameter entities??
4046              my $location;
4047              __CODE{xp|get-location-from-token::
4048                $token => {$token},
4049                $result => {$location},
4050              }__;
4051              my $continue = __c|ERROR{xp|warning-entity-declaration-not-processed::
4052                xp|error-token => {$token},
4053                c|location => {$location},
4054                xp|name => {$decl->{name}},
4055              }__;
4056              unless ($continue) {
4057                __CODE{ParseError}__;
4058              }            
4059          } else {          } else {
4060            $self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}            $self->{$decl->{is_param_entity} ? 'param_entity' : 'general_entity'}
4061                 ->{$decl->{name}} = $decl;                 ->{$decl->{name}} = $decl;
# Line 2915  ClsDef: Line 4071  ClsDef:
4071        }        }
4072      } // _EntityDeclaration      } // _EntityDeclaration
4073    
4074      rule _NotationDeclaration ($doc) {      /*
4075          Notation Declaration
4076        */
4077        rule _NotationDeclaration {
4078        // ~ (MDO) { }        // ~ (MDO) { }
4079        // ~ (Name == NOTATION) { }        // ~ (Name == NOTATION) { }
4080    
4081        ~ (S) { }        ~ (S) { }
4082    
4083          my $name;
4084        ~ (Name) {        ~ (Name) {
4085            lang:Perl ($v => $token.value) : has-error {
4086        }            __CODE{checkNCName:: $name => $v}__;
4087              $name = $v;
4088            }
4089          } else {
4090            lang:Perl {
4091              $name = '#INVALID';
4092            }
4093          }
4094    
4095        ~ (S) { }        ~ (S) { }
4096    
4097          lang:Perl {
4098            $decl = $self->{docx}-><M::DocumentXDoctype.createNotation> ($name);
4099          }
4100    
4101        ~ (Name == 'PUBLIC') {        ~ (Name == 'PUBLIC') {
4102          ~ (S) { }          ~ (S) { }
4103    
4104          &PubidLiteral ($doc => $doc);          &PubidLiteral ($decl => $decl);
4105    
4106          ~? (S) {          ~? (S) {
4107            ~? (LIT) {            ~? (LIT) {
4108              ?lexmode SystemLiteral;              ?lexmode SystemLiteral;
4109              &_SystemLiteral ($doc => $doc);              &_SystemLiteral ($decl => $decl);
4110    
4111              ~? (S) { }              ~? (S) { }
4112            } (LITA) {            } (LITA) {
4113              ?lexmode SystemLiteralA;              ?lexmode SystemLiteralA;
4114              &_SystemLiteral ($doc => $doc);              &_SystemLiteral ($decl => $decl);
4115    
4116              ~? (S) { }              ~? (S) { }
4117            }            }
# Line 2948  ClsDef: Line 4119  ClsDef:
4119        } (Name == 'SYSTEM') {        } (Name == 'SYSTEM') {
4120          ~ (S) { }          ~ (S) { }
4121    
4122          &SystemLiteral ($doc => $doc);          &SystemLiteral ($decl => $decl);
4123    
4124          ~? (S) { }          ~? (S) { }
4125        }        }
4126    
4127          lang:Perl : has-error {
4128            if ($self->{dtdef}-><M::DTDef.getNotationNode> ($name)) {
4129              ## Dupulication
4130              my $location;
4131              __CODE{xp|get-location-from-token::
4132                $token => {$token},
4133                $result => {$location},
4134              }__;
4135              my $continue = __c|ERROR{xp|vc-unique-notation-name::
4136                xp|error-token => {$token},
4137                c|location => {$location},
4138                xp|name => {$name},
4139              }__;
4140              unless ($continue) {
4141                __CODE{ParseError}__;
4142              }
4143            } else {
4144              $self->{dtdef}-><M::DTDef.setNotationNode> ($decl);
4145            }
4146          }
4147    
4148        ~ (MDC) {        ~ (MDC) {
4149          ?lexmode DTD;          ?lexmode DTD;
4150        } else {        } else {
# Line 2975  ClsDef: Line 4167  ClsDef:
4167            $reptxt .= $v;            $reptxt .= $v;
4168          }          }
4169        } (PERO) {        } (PERO) {
4170          ?lexmode EntityDeclaration;          ?lexmode EntityReference;
4171    
4172            lang:Perl {
4173              $self->{has_xref} = true;
4174              $self->{dont_process} = true;
4175            }
4176            
4177          // TODO: Expand or wferror if internal subset          // TODO: Expand or wferror if internal subset
4178    
4179          ~ (Name) {          ~ (Name) {
4180    
4181              // Note that external subset and parameter entities are not supported
4182              lang:Perl ($name => $token.value) : has-error {
4183                __CODE{checkNCName:: $name => $name}__;
4184                my $location;
4185                __CODE{xp|get-location-from-token::
4186                  $token => {$token},
4187                  $result => {$location},
4188                }__;
4189                my $continue = __c|ERROR{xp|wf-pes-in-internal-subset::
4190                  xp|error-token => {$token},
4191                  c|location => {$location},
4192                  xp|name => {$name},
4193                }__;
4194                unless ($continue) {
4195                  __CODE{ParseError}__;
4196                }
4197              }
4198          }          }
4199    
4200          ~ (REFC) {          ~ (REFC) {
# Line 3036  ClsDef: Line 4250  ClsDef:
4250    
4251        lang:Perl {        lang:Perl {
4252          $decl->{reptxt} = \$reptxt;          $decl->{reptxt} = \$reptxt;
4253            $decl->{has_replacement_text} = true;
4254        }        }
4255      } // _EntityValue      } // _EntityValue
4256    
# Line 3054  ClsDef: Line 4269  ClsDef:
4269            $reptxt .= $v;            $reptxt .= $v;
4270          }          }
4271        } (PERO) {        } (PERO) {
4272          ?lexmode EntityDeclaration;          ?lexmode EntityReference;
4273    
4274            lang:Perl {
4275              $self->{has_xref} = true;
4276              $self->{dont_process} = true;
4277            }
4278    
4279          // TODO: implement this          // TODO: implement this
4280          ~ (Name) {          ~ (Name) {
4281    
4282              // Note that external subset and parameter entities are not supported
4283              lang:Perl ($name => $token.value) : has-error {
4284                __CODE{checkNCName:: $name => $name}__;
4285                my $location;
4286                __CODE{xp|get-location-from-token::
4287                  $token => {$token},
4288                  $result => {$location},
4289                }__;
4290                my $continue = __c|ERROR{xp|wf-pes-in-internal-subset::
4291                  xp|error-token => {$token},
4292                  c|location => {$location},
4293                  xp|name => {$name},
4294                }__;
4295                unless ($continue) {
4296                  __CODE{ParseError}__;
4297                }
4298              }
4299          }          }
4300    
4301          ~ (REFC) {          ~ (REFC) {
# Line 3113  ClsDef: Line 4350  ClsDef:
4350    
4351        lang:Perl {        lang:Perl {
4352          $decl->{reptxt} = \$reptxt;          $decl->{reptxt} = \$reptxt;
4353            $decl->{has_replacement_text} = true;
4354        }        }
4355      } // _EntityValueA      } // _EntityValueA
4356    
# Line 3393  ClsDef: Line 4631  ClsDef:
4631        */        */
4632        MDO := ['<'] ['!'];        MDO := ['<'] ['!'];
4633      } // DocumentProlog      } // DocumentProlog
4634        
4635      /*      /*
4636        Document start scanning mode        Document Start Scanning Mode
4637      */      */
4638      lexmode DocumentStart      lexmode DocumentStart
       : initial  
4639        : standalone        : standalone
4640        : extends => 'DocumentProlog'        : extends => 'DocumentProlog'
4641      {      {
4642        /*        /*
4643          XML declaration          XML declaration
4644        */        */
4645        XDO := ['<'] ['?'] ['x'] ['m'] ['l'] $s+;        XDO := ['<'] ['?'] ['x'] ['m'] ['l'];
4646      } // DocumentStart      } // DocumentStart
4647            
4648      /*      /*
# Line 3440  ClsDef: Line 4677  ClsDef:
4677      } // PIName      } // PIName
4678            
4679      /*      /*
4680          Processing instruction name and |S| scanning mode
4681        */
4682        lexmode PINmtoken
4683          : standalone
4684          : extends => 'Nmtoken'
4685          : extends => 'S'
4686        {
4687          /*
4688            Processing instruction close
4689          */
4690          PIC := ['?'] ['>'];
4691        } // PINmtoken
4692        
4693        /*
4694        Processing instruction data scanning mode        Processing instruction data scanning mode
4695      */      */
4696      lexmode PIData      lexmode PIData
# Line 3576  ClsDef: Line 4827  ClsDef:
4827        REFC := [';'];        REFC := [';'];
4828      } // HexadecimalCharacterReference      } // HexadecimalCharacterReference
4829            
4830        /*
4831          The XML Declaration and Text Declaration Scanning Mode
4832        */
4833      lexmode XMLDeclaration      lexmode XMLDeclaration
4834        : standalone        : standalone
4835        : extends => 'Name'        : extends => 'Name'
# Line 3595  ClsDef: Line 4849  ClsDef:
4849                
4850        /*        /*
4851          Processing instruction close          Processing instruction close
4852    
4853              The |PIC|, i.e. |?>|, is split into two tokens |PIC1| and |PIC2|
4854              in this scanning mode to set |no_xml11_eol| flag in the
4855              |_XMLDeclaration_| |rule|.
4856        */        */
4857        PIC := ['?'] ['>'];        PIC1 := ['?'];
4858          PIC2 := ['>'];
4859      } // XMLDeclaration      } // XMLDeclaration
4860    
4861        /*
4862          The XML Declaration or Processing Instruction Scanning Mode
4863    
4864               '<?xml'               S                 ...
4865            (DocumentStart) (XMLDeclarationOrPI) (XMLDeclaration)
4866               '<?xml'              '1'                S                ...
4867            (DocumentStart) (XMLDeclarationOrPI) (PINmtoken)(PIName) (PITarget)
4868               '<?xml'              '-'         'stylesheet'    S       ...
4869            (DocumentStart) (XMLDeclarationOrPI) (PINmtoken) (PIName) (PITarget)
4870        */
4871        lexmode XMLDeclarationOrPI
4872          : standalone
4873          : extends => 'NameChar'
4874          : extends => 'S'
4875        {
4876          NameChar : value := $NameChar11;
4877        } // XMLDeclarationOrPI
4878            
4879      lexmode StartTag      lexmode StartTag
4880        : standalone        : standalone
# Line 3864  ClsDef: Line 5141  ClsDef:
5141            DOMCore|location => {$location},            DOMCore|location => {$location},
5142          }__;          }__;
5143          unless ($continue) {          unless ($continue) {
5144            __EXCEPTION{DOMLS|PARSE_ERR::            __CODE{ParseError}__;
           }__;  
5145          }          }
         $self->{has_error} = true;  
5146        }        }
5147      } // default      } // default
5148    
5149      @ResourceDef:
5150        @@ForCheck: ManakaiDOM|ForClass
5151        @@QName: ParseError
5152        @@rdf:type: DISPerl|BlockCode
5153        @@PerlDef:
5154          __DEEP{
5155            for (@{$self->{entity}}) {
5156              $_->{close_file}->();
5157            }
5158          }__;
5159          __EXCEPTION{DOMLS|PARSE_ERR}__;
5160    
5161      @ResourceDef:
5162        @@ForCheck: ManakaiDOM|ForClass
5163        @@QName: checkNCName
5164        @@rdf:type: DISPerl|BlockCode
5165        @@PerlDef:
5166          if (($self->{xml_version} eq '1.0' and
5167               not <Code::DOMMain|testXML10Name:: $INPUT = $name>) or
5168              ($self->{xml_version} eq '1.1' and
5169               not <Code::DOMMain|testXML11Name:: $INPUT = $name>)) {
5170            my $__location;
5171            __CODE{xp|get-location-from-token::
5172              $token => {$token},
5173              $result => {$__location},
5174            }__;
5175            my $__continue = __c|ERROR{xp|wf-invalid-character-in-node-name::
5176              xp|error-token => {$token},
5177              c|location => {$__location},
5178              xp|name => {$name},
5179              infoset|version => {$self->{xml_version}},
5180            }__;
5181            unless ($__continue) {
5182              __CODE{ParseError}__;
5183            }
5184          } elsif (index ($name, ':') > -1) {
5185            my $__location;
5186            __CODE{xp|get-location-from-token::
5187              $token => {$token},
5188              $result => {$__location},
5189            }__;
5190            my $__continue = __c|ERROR{xp|nswf-legal-ncname::
5191              xp|error-token => {$token},
5192              c|location => {$__location},
5193              xp|name => {$name},
5194              infoset|version => {$self->{xml_version}},
5195            }__;
5196            unless ($__continue) {
5197              __CODE{ParseError}__;
5198            }            
5199          }
5200    
5201      @ResourceDef:
5202        @@ForCheck: ManakaiDOM|ForClass
5203        @@QName: checkQName
5204        @@rdf:type: DISPerl|BlockCode
5205        @@PerlDef:
5206          if (($self->{xml_version} eq '1.0' and
5207               not <Code::DOMMain|testXML10Name:: $INPUT = $name>) or
5208              ($self->{xml_version} eq '1.1' and
5209               not <Code::DOMMain|testXML11Name:: $INPUT = $name>)) {
5210            my $__location;
5211            __CODE{xp|get-location-from-token::
5212              $token => {$token},
5213              $result => {$__location},
5214            }__;
5215            my $__continue = __c|ERROR{xp|wf-invalid-character-in-node-name::
5216              xp|error-token => {$token},
5217              c|location => {$__location},
5218              xp|name => {$name},
5219              infoset|version => {$self->{xml_version}},
5220            }__;
5221            unless ($__continue) {
5222              __CODE{ParseError}__;
5223            }
5224          } elsif (($self->{xml_version} eq '1.0' and
5225                    not <Code::DOMMain|testXML10QName:: $INPUT = $name>) or
5226                   ($self->{xml_version} eq '1.1' and
5227                    not <Code::DOMMain|testXML11QName:: $INPUT = $name>)) {
5228            my $__location;
5229            __CODE{xp|get-location-from-token::
5230              $token => {$token},
5231              $result => {$__location},
5232            }__;
5233            my $__continue = __c|ERROR{xp|nswf-legal-qname::
5234              xp|error-token => {$token},
5235              c|location => {$__location},
5236              xp|name => {$name},
5237              infoset|version => {$self->{xml_version}},
5238            }__;
5239            unless ($__continue) {
5240              __CODE{ParseError}__;
5241            }            
5242          }
5243    
5244    
5245    @XMLTests:    @XMLTests:
5246      @@XMLTest:      @@XMLTest:
5247        @@@QName: xp.char.xml10.test        @@@QName: xp.char.xml10.test
# Line 4037  ClsDef: Line 5408  ClsDef:
5408        @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 35); } /* U+009F */        @@@c:erred: <[[xp|wf-legal-literal-character]]> { (2, 35); } /* U+009F */
5409    
5410      @@XMLTest:      @@XMLTest:
5411          @@@QName: xp.c0.internal.entity.xml11.1.test
5412          @@@DEnt:
5413            @@@@test:value:
5414              <?xml version="1.1"?>
5415              <!DOCTYPE a [
5416              <!ENTITY e "&#x01;&#x02;&#x03;&#x04;&#x05;&#x06;&#x07;$
5417              &#x08;&#x09;&#x0A;&#x0B;&#x0C;&#x0D;&#x0E;&#x0F;$
5418              &#x10;&#x11;&#x12;&#x13;&#x14;&#x15;&#x16;&#x17;$
5419              &#x18;&#x19;&#x1A;&#x1B;&#x1C;&#x1D;&#x1E;&#x1F;">
5420              ]><a/>
5421          @@@test:domTree:
5422            document {
5423              document-type {
5424                general-entity {
5425                  node-name: 'e';
5426                  text-content: U+0001 U+0002 U+0003 U+0004 U+0005
5427                                U+0006 U+0007 U+0008 U+0009 U+000A U+000B
5428                                U+000C U+000D U+000E U+000F
5429                                U+0010 U+0011 U+0012 U+0013 U+0014 U+0015
5430                                U+0016 U+0017 U+0018 U+0019 U+001A U+001B
5431                                U+001C U+001D U+001E U+001F;
5432                }
5433              }
5434              element { }
5435            }
5436        @@XMLTest:
5437          @@@QName: xp.c1.internal.entity.xml11.1.test
5438          @@@DEnt:
5439            @@@@test:value:
5440              <?xml version="1.1"?>
5441              <!DOCTYPE a [
5442              <!ENTITY e "&#x80;&#x81;&#x82;&#x83;&#x84;&#x85;&#x86;&#x87;$
5443              &#x88;&#x89;&#x8A;&#x8B;&#x8C;&#x8D;&#x8E;&#x8F;$
5444              &#x90;&#x91;&#x92;&#x93;&#x94;&#x95;&#x96;&#x97;$
5445              &#x98;&#x99;&#x9A;&#x9B;&#x9C;&#x9D;&#x9E;&#x9F;&#x7F;">
5446              ]><a/>
5447          @@@test:domTree:
5448            document {
5449              document-type {
5450                general-entity {
5451                  node-name: 'e';
5452                  text-content: U+0080 U+0081 U+0082 U+0083 U+0084 U+0085
5453                                U+0086 U+0087 U+0088 U+0089 U+008A U+008B
5454                                U+008C U+008D U+008E U+008F
5455                                U+0090 U+0091 U+0092 U+0093 U+0094 U+0095
5456                                U+0096 U+0097 U+0098 U+0099 U+009A U+009B
5457                                U+009C U+009D U+009E U+009F U+007F;
5458                }
5459              }
5460              element { }
5461            }
5462    
5463        @@XMLTest:
5464        @@@QName: xp.syntax.empty.test        @@@QName: xp.syntax.empty.test
5465        @@@DEnt:        @@@DEnt:
5466          @@@@test:value: \          @@@@test:value: \
# Line 4505  ClsDef: Line 5929  ClsDef:
5929            <?xml?>            <?xml?>
5930            <p></p>            <p></p>
5931        @@@c:erred:        @@@c:erred:
5932          <[[xp:wf-pi-target-is-xml]]> { (1, 1)..(1, 5); }          <[[xp:wf-syntax-error]]> { (1, 1)..(1, 7); }
5933      @@XMLTest:      @@XMLTest:
5934        @@@QName: xp.xmldecl.s.no.attr.test        @@@QName: xp.xmldecl.s.no.attr.test
5935        @@@DEnt:        @@@DEnt:
# Line 4780  ClsDef: Line 6204  ClsDef:
6204        @@@c:erred:        @@@c:erred:
6205          <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }          <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6206      @@XMLTest:      @@XMLTest:
6207          @@@QName: xp.xmldecl.after.pi.2.test
6208          @@@DEnt:
6209            @@@@test:value:
6210              <?declaration?>
6211              <?xml version="1.0"?>
6212              <p></p>
6213          @@@c:erred:
6214            <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6215        @@XMLTest:
6216          @@@QName: xp.xmldecl.after.pi.empty.2.test
6217          @@@DEnt:
6218            @@@@test:value:
6219              <?declaration?>
6220              <?xml?>
6221              <p></p>
6222          @@@c:erred:
6223            <[[xp:wf-pi-target-is-xml]]> { (2, 1)..(2, 5); }
6224        @@XMLTest:
6225        @@@QName: xp.xmldecl.after.doctype.test        @@@QName: xp.xmldecl.after.doctype.test
6226        @@@DEnt:        @@@DEnt:
6227          @@@@test:value:          @@@@test:value:
# Line 5029  ClsDef: Line 6471  ClsDef:
6471            }            }
6472            element {            element {
6473              general-entity-reference {              general-entity-reference {
6474                  node-name: 'cdata';
6475                  is-expanded: true;
6476                cdata-section {                cdata-section {
6477                  data: 'text';                  data: 'text';
6478                }                }
# Line 5061  ClsDef: Line 6505  ClsDef:
6505            xml-standalone: false;            xml-standalone: false;
6506            document-type {            document-type {
6507              node-name: 'a';              node-name: 'a';
6508                public-id: null;
6509                system-id: null;
6510            }            }
6511            element {            element {
6512              namespace-uri: null;              namespace-uri: null;
# Line 5101  ClsDef: Line 6547  ClsDef:
6547            ]>            ]>
6548            <a></a>            <a></a>
6549        @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }        @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1)..(2, 12); }
6550                @@XMLTest:
6551          @@@QName: xp.doctype.no.s.no.name.test
6552          @@@DEnt:
6553            @@@@test:value:
6554              <!DOCTYPE>
6555              <a></a>
6556          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 10); }
6557        @@XMLTest:
6558          @@@QName: xp.doctype.no.name.test
6559          @@@DEnt:
6560            @@@@test:value:
6561              <!DOCTYPE >
6562              <a></a>
6563          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 11); }
6564        @@XMLTest:
6565          @@@QName: xp.doctype.name.s.test
6566          @@@DEnt:
6567            @@@@test:value:
6568              <!DOCTYPE aa   >
6569              <aa></aa>
6570          @@@test:domTree:
6571            document {
6572              document-type {
6573                node-name: 'aa';
6574                public-id: null;
6575                system-id: null;
6576              }
6577              element { }
6578            }
6579        @@XMLTest:
6580          @@@QName: xp.doctype.no.mdc.test
6581          @@@DEnt:
6582            @@@@test:value:
6583              <!DOCTYPE aa
6584              <aa></aa>
6585          @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6586    
6587      @@XMLTest:      @@XMLTest:
6588        @@@QName: xp.doctype.intsubset.empty.test        @@@QName: xp.doctype.intsubset.empty.1.test
6589          @@@DEnt:
6590            @@@@test:value:
6591              <!DOCTYPE a []>
6592              <a></a>
6593          @@@test:domTree:
6594            document {
6595              xml-version: '1.0';
6596              xml-encoding: null;
6597              xml-standalone: false;
6598              document-type {
6599                node-name: 'a';
6600                public-id: null;
6601                system-id: null;
6602              }
6603              element {
6604                namespace-uri: null;
6605                prefix: null;
6606                local-name: 'a';
6607                text-content: '';
6608              }
6609            }
6610        @@XMLTest:
6611          @@@QName: xp.doctype.intsubset.empty.2.test
6612        @@@DEnt:        @@@DEnt:
6613          @@@@test:value:          @@@@test:value:
6614            <!DOCTYPE a [            <!DOCTYPE a [
# Line 5118  ClsDef: Line 6622  ClsDef:
6622            xml-standalone: false;            xml-standalone: false;
6623            document-type {            document-type {
6624              node-name: 'a';              node-name: 'a';
6625                public-id: null;
6626                system-id: null;
6627            }            }
6628            element {            element {
6629              namespace-uri: null;              namespace-uri: null;
# Line 5126  ClsDef: Line 6632  ClsDef:
6632              text-content: '';              text-content: '';
6633            }            }
6634          }          }
6635        @@XMLTest:
6636          @@@QName: xp.doctype.intsubset.empty.3.test
6637          @@@DEnt:
6638            @@@@test:value:
6639              <!DOCTYPE a[]>
6640              <a></a>
6641          @@@test:domTree:
6642            document {
6643              document-type {
6644                node-name: 'a';
6645                public-id: null;
6646                system-id: null;
6647              }
6648              element { }
6649            }
6650        @@XMLTest:
6651          @@@QName: xp.doctype.intsubset.empty.4.test
6652          @@@DEnt:
6653            @@@@test:value:
6654              <!DOCTYPE a[]  >
6655              <a></a>
6656          @@@test:domTree:
6657            document {
6658              document-type {
6659                node-name: 'a';
6660                public-id: null;
6661                system-id: null;
6662              }
6663              element { }
6664            }
6665        @@XMLTest:
6666          @@@QName: xp.doctype.intsubset.no.dsc.1.test
6667          @@@DEnt:
6668            @@@@test:value:
6669              <!DOCTYPE a [>
6670              <a></a>
6671          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 14); }
6672        @@XMLTest:
6673          @@@QName: xp.doctype.intsubset.no.dsc.2.test
6674          @@@DEnt:
6675            @@@@test:value:
6676              <!DOCTYPE a [
6677              <a></a>
6678          @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6679        @@XMLTest:
6680          @@@QName: xp.doctype.intsubset.no.dsc.3.test
6681          @@@DEnt:
6682            @@@@test:value:
6683              <!DOCTYPE a [
6684          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 14); }
6685        @@XMLTest:
6686          @@@QName: xp.doctype.intsubset.no.mdc.1.test
6687          @@@DEnt:
6688            @@@@test:value:
6689              <!DOCTYPE a []
6690              <a/>
6691          @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 1); }
6692        @@XMLTest:
6693          @@@QName: xp.doctype.intsubset.no.mdc.2.test
6694          @@@DEnt:
6695            @@@@test:value:
6696              <!DOCTYPE a []]>
6697              <a/>
6698          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 15); }
6699        @@XMLTest:
6700          @@@QName: xp.doctype.pubid.sysid.1.test
6701          @@@DEnt:
6702            @@@@test:value:
6703              <!DOCTYPE a PUBLIC "pubid" "sysid">
6704              <a/>
6705          @@@test:domTree:
6706            document {
6707              document-type {
6708                node-name: 'a';
6709                public-id: 'pubid';
6710                system-id: 'sysid';
6711              }
6712              element { }
6713            }
6714        @@XMLTest:
6715          @@@QName: xp.doctype.pubid.sysid.2.test
6716          @@@DEnt:
6717            @@@@test:value:
6718              <!DOCTYPE a PUBLIC 'pubid' "sysid">
6719              <a/>
6720          @@@test:domTree:
6721            document {
6722              document-type {
6723                node-name: 'a';
6724                public-id: 'pubid';
6725                system-id: 'sysid';
6726              }
6727              element { }
6728            }
6729        @@XMLTest:
6730          @@@QName: xp.doctype.pubid.sysid.3.test
6731          @@@DEnt:
6732            @@@@test:value:
6733              <!DOCTYPE a PUBLIC "pubid" 'sysid'>
6734              <a/>
6735          @@@test:domTree:
6736            document {
6737              document-type {
6738                node-name: 'a';
6739                public-id: 'pubid';
6740                system-id: 'sysid';
6741              }
6742              element { }
6743            }
6744        @@XMLTest:
6745          @@@QName: xp.doctype.pubid.sysid.4.test
6746          @@@DEnt:
6747            @@@@test:value:
6748              <!DOCTYPE a PUBLIC 'pubid' 'sysid'>
6749              <a/>
6750          @@@test:domTree:
6751            document {
6752              document-type {
6753                node-name: 'a';
6754                public-id: 'pubid';
6755                system-id: 'sysid';
6756              }
6757              element { }
6758            }
6759        @@XMLTest:
6760          @@@QName: xp.doctype.pubid.sysid.5.test
6761          @@@DEnt:
6762            @@@@test:value:
6763              <!DOCTYPE a PUBLIC "pubid" "sysid"  >
6764              <a/>
6765          @@@test:domTree:
6766            document {
6767              document-type {
6768                node-name: 'a';
6769                public-id: 'pubid';
6770                system-id: 'sysid';
6771              }
6772              element { }
6773            }
6774        @@XMLTest:
6775          @@@QName: xp.doctype.pubid.sysid.6.test
6776          @@@DEnt:
6777            @@@@test:value:
6778              <!DOCTYPE a PUBLIC 'pubid' 'sysid'  >
6779              <a/>
6780          @@@test:domTree:
6781            document {
6782              document-type {
6783                node-name: 'a';
6784                public-id: 'pubid';
6785                system-id: 'sysid';
6786              }
6787              element { }
6788            }
6789        @@XMLTest:
6790          @@@QName: xp.doctype.pubid.sysid.intsubset.1.test
6791          @@@DEnt:
6792            @@@@test:value:
6793              <!DOCTYPE a PUBLIC "pubid" "sysid"[]>
6794              <a/>
6795          @@@test:domTree:
6796            document {
6797              document-type {
6798                node-name: 'a';
6799                public-id: 'pubid';
6800                system-id: 'sysid';
6801              }
6802              element { }
6803            }
6804        @@XMLTest:
6805          @@@QName: xp.doctype.pubid.sysid.intsubset.2.test
6806          @@@DEnt:
6807            @@@@test:value:
6808              <!DOCTYPE a PUBLIC "pubid" "sysid"  []>
6809              <a/>
6810          @@@test:domTree:
6811            document {
6812              document-type {
6813                node-name: 'a';
6814                public-id: 'pubid';
6815                system-id: 'sysid';
6816              }
6817              element { }
6818            }
6819        @@XMLTest:
6820          @@@QName: xp.doctype.pubid.sysid.intsubset.3.test
6821          @@@DEnt:
6822            @@@@test:value:
6823              <!DOCTYPE a PUBLIC 'pubid' 'sysid'[]>
6824              <a/>
6825          @@@test:domTree:
6826            document {
6827              document-type {
6828                node-name: 'a';
6829                public-id: 'pubid';
6830                system-id: 'sysid';
6831              }
6832              element { }
6833            }
6834        @@XMLTest:
6835          @@@QName: xp.doctype.pubid.sysid.intsubset.4.test
6836          @@@DEnt:
6837            @@@@test:value:
6838              <!DOCTYPE a PUBLIC 'pubid' 'sysid'  []>
6839              <a/>
6840          @@@test:domTree:
6841            document {
6842              document-type {
6843                node-name: 'a';
6844                public-id: 'pubid';
6845                system-id: 'sysid';
6846              }
6847              element { }
6848            }
6849        @@XMLTest:
6850          @@@QName: xp.doctype.sysid.1.test
6851          @@@DEnt:
6852            @@@@test:value:
6853              <!DOCTYPE a SYSTEM "sysid">
6854              <a/>
6855          @@@test:domTree:
6856            document {
6857              document-type {
6858                node-name: 'a';
6859                public-id: null;
6860                system-id: 'sysid';
6861              }
6862              element { }
6863            }
6864        @@XMLTest:
6865          @@@QName: xp.doctype.sysid.2.test
6866          @@@DEnt:
6867            @@@@test:value:
6868              <!DOCTYPE a SYSTEM 'sysid'>
6869              <a/>
6870          @@@test:domTree:
6871            document {
6872              document-type {
6873                node-name: 'a';
6874                public-id: null;
6875                system-id: 'sysid';
6876              }
6877              element { }
6878            }
6879        @@XMLTest:
6880          @@@QName: xp.doctype.sysid.3.test
6881          @@@DEnt:
6882            @@@@test:value:
6883              <!DOCTYPE a SYSTEM "sysid"  >
6884              <a/>
6885          @@@test:domTree:
6886            document {
6887              document-type {
6888                node-name: 'a';
6889                public-id: null;
6890                system-id: 'sysid';
6891              }
6892              element { }
6893            }
6894        @@XMLTest:
6895          @@@QName: xp.doctype.sysid.4.test
6896          @@@DEnt:
6897            @@@@test:value:
6898              <!DOCTYPE a SYSTEM 'sysid'  >
6899              <a/>
6900          @@@test:domTree:
6901            document {
6902              document-type {
6903                node-name: 'a';
6904                public-id: null;
6905                system-id: 'sysid';
6906              }
6907              element { }
6908            }
6909        @@XMLTest:
6910          @@@QName: xp.doctype.sysid.intsubset.1.test
6911          @@@DEnt:
6912            @@@@test:value:
6913              <!DOCTYPE a SYSTEM "sysid"[]>
6914              <a/>
6915          @@@test:domTree:
6916            document {
6917              document-type {
6918                node-name: 'a';
6919                public-id: null;
6920                system-id: 'sysid';
6921              }
6922              element { }
6923            }
6924        @@XMLTest:
6925          @@@QName: xp.doctype.sysid.intsubset.2.test
6926          @@@DEnt:
6927            @@@@test:value:
6928              <!DOCTYPE a SYSTEM "sysid"  []>
6929              <a/>
6930          @@@test:domTree:
6931            document {
6932              document-type {
6933                node-name: 'a';
6934                public-id: null;
6935                system-id: 'sysid';
6936              }
6937              element { }
6938            }
6939        @@XMLTest:
6940          @@@QName: xp.doctype.sysid.intsubset.3.test
6941          @@@DEnt:
6942            @@@@test:value:
6943              <!DOCTYPE a SYSTEM 'sysid'[]>
6944              <a/>
6945          @@@test:domTree:
6946            document {
6947              document-type {
6948                node-name: 'a';
6949                public-id: null;
6950                system-id: 'sysid';
6951              }
6952              element { }
6953            }
6954        @@XMLTest:
6955          @@@QName: xp.doctype.sysid.intsubset.4.test
6956          @@@DEnt:
6957            @@@@test:value:
6958              <!DOCTYPE a SYSTEM 'sysid'   []>
6959              <a/>
6960          @@@test:domTree:
6961            document {
6962              document-type {
6963                node-name: 'a';
6964                public-id: null;
6965                system-id: 'sysid';
6966              }
6967              element { }
6968            }
6969        @@XMLTest:
6970          @@@QName: xp.doctype.public.stago.test
6971          @@@DEnt:
6972            @@@@test:value:
6973              <!DOCTYPE a PUBLIC<a/>
6974          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6975        @@XMLTest:
6976          @@@QName: xp.doctype.public.mdc.test
6977          @@@DEnt:
6978            @@@@test:value:
6979              <!DOCTYPE a PUBLIC>
6980              <a/>
6981          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
6982        @@XMLTest:
6983          @@@QName: xp.doctype.public.s.stago.test
6984          @@@DEnt:
6985            @@@@test:value:
6986              <!DOCTYPE a PUBLIC <a/>
6987          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 20); }
6988        @@XMLTest:
6989          @@@QName: xp.doctype.public.s.mdc.test
6990          @@@DEnt:
6991            @@@@test:value:
6992              <!DOCTYPE a PUBLIC >
6993              <a/>
6994          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 20); }
6995        @@XMLTest:
6996          @@@QName: xp.doctype.public.lit.test
6997          @@@DEnt:
6998            @@@@test:value:
6999              <!DOCTYPE a PUBLIC"p" "s">
7000              <a/>
7001          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
7002        @@XMLTest:
7003          @@@QName: xp.doctype.public.lita.test
7004          @@@DEnt:
7005            @@@@test:value:
7006              <!DOCTYPE a PUBLIC'p' "s">
7007              <a/>
7008          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 19); }
7009        @@XMLTest:
7010          @@@QName: xp.doctype.pubid.lit.lita.unmatched.1.test
7011          @@@DEnt:
7012            @@@@test:value:
7013              <!DOCTYPE a PUBLIC "p' "s">
7014              <a/>
7015          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 25); }
7016        @@XMLTest:
7017          @@@QName: xp.doctype.pubid.lit.lita.unmatched.2.test
7018          @@@DEnt:
7019            @@@@test:value:
7020              <!DOCTYPE a PUBLIC "p' 's'><a/>
7021          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7022        @@XMLTest:
7023          @@@QName: xp.doctype.pubid.lita.lit.unmatched.1.test
7024          @@@DEnt:
7025            @@@@test:value:
7026              <!DOCTYPE a PUBLIC 'p" "s"><a/>
7027          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7028        @@XMLTest:
7029          @@@QName: xp.doctype.pubid.lita.lit.unmatched.2.test
7030          @@@DEnt:
7031            @@@@test:value:
7032              <!DOCTYPE a PUBLIC 'p" 's'>
7033              <a/>
7034          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 21)..(1, 25); }
7035        @@XMLTest:
7036          @@@QName: xp.doctype.public.s.lit.mdc.test
7037          @@@DEnt:
7038            @@@@test:value:
7039              <!DOCTYPE a PUBLIC "><a/>
7040          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 26); }
7041        @@XMLTest:
7042          @@@QName: xp.doctype.public.s.lita.mdc.test
7043          @@@DEnt:
7044            @@@@test:value:
7045              <!DOCTYPE a PUBLIC '><a/>
7046          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 26); }
7047        @@XMLTest:
7048          @@@QName: xp.doctype.public.lit.pubid.lit.mdc.test
7049          @@@DEnt:
7050            @@@@test:value:
7051              <!DOCTYPE a PUBLIC "p">
7052              <a/>
7053          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 23); }
7054        @@XMLTest:
7055          @@@QName: xp.doctype.public.lita.pubid.lita.mdc.test
7056          @@@DEnt:
7057            @@@@test:value:
7058              <!DOCTYPE a PUBLIC 'p'>
7059              <a/>
7060          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 23); }
7061        @@XMLTest:
7062          @@@QName: xp.doctype.public.lit.pubid.lit.s.mdc.test
7063          @@@DEnt:
7064            @@@@test:value:
7065              <!DOCTYPE a PUBLIC "p" >
7066              <a/>
7067          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 24); }
7068        @@XMLTest:
7069          @@@QName: xp.doctype.public.lita.pubid.lita.s.mdc.test
7070          @@@DEnt:
7071            @@@@test:value:
7072              <!DOCTYPE a PUBLIC 'p' >
7073              <a/>
7074          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 24); }
7075        @@XMLTest:
7076          @@@QName: xp.doctype.public.lit.pubid.lit.s.lit.mdc.test
7077          @@@DEnt:
7078            @@@@test:value:
7079              <!DOCTYPE a PUBLIC "p" "><a/>
7080          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7081        @@XMLTest:
7082          @@@QName: xp.doctype.public.lit.pubid.lit.s.lita.mdc.test
7083          @@@DEnt:
7084            @@@@test:value:
7085              <!DOCTYPE a PUBLIC "p" '><a/>
7086          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7087        @@XMLTest:
7088          @@@QName: xp.doctype.public.lita.pubid.lita.s.lit.mdc.test
7089          @@@DEnt:
7090            @@@@test:value:
7091              <!DOCTYPE a PUBLIC 'p' "><a/>
7092          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7093        @@XMLTest:
7094          @@@QName: xp.doctype.public.lita.pubid.lita.s.lita.mdc.test
7095          @@@DEnt:
7096            @@@@test:value:
7097              <!DOCTYPE a PUBLIC 'p' '><a/>
7098          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 30); }
7099        @@XMLTest:
7100          @@@QName: xp.doctype.public.lit.pubid.lit.lit.lita.unmatched.mdc.test
7101          @@@DEnt:
7102            @@@@test:value:
7103              <!DOCTYPE a PUBLIC "p" "s'><a/>
7104          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7105        @@XMLTest:
7106          @@@QName: xp.doctype.public.lita.pubid.lita.lita.lit.unmatched.mdc.test
7107          @@@DEnt:
7108            @@@@test:value:
7109              <!DOCTYPE a PUBLIC 'p' 's"><a/>
7110          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 32); }
7111        @@XMLTest:
7112          @@@QName: xp.doctype.pubid.sysid.stago.1.test
7113          @@@DEnt:
7114            @@@@test:value:
7115              <!DOCTYPE a PUBLIC "p" "s"<a/>
7116          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27); }
7117        @@XMLTest:
7118          @@@QName: xp.doctype.pubid.sysid.stago.2.test
7119          @@@DEnt:
7120            @@@@test:value:
7121              <!DOCTYPE a PUBLIC "p" 's'<a/>
7122          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27); }
7123        @@XMLTest:
7124          @@@QName: xp.doctype.pubid.sysid.stago.s.1.test
7125          @@@DEnt:
7126            @@@@test:value:
7127              <!DOCTYPE a PUBLIC "p" "s" <a/>
7128          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
7129        @@XMLTest:
7130          @@@QName: xp.doctype.pubid.sysid.stago.s.2.test
7131          @@@DEnt:
7132            @@@@test:value:
7133              <!DOCTYPE a PUBLIC "p" 's' <a/>
7134          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
7135    
7136        @@XMLTest:
7137          @@@QName: xp.endofline.1.0.crlf.test
7138          @@@DEnt:
7139            @@@@test:value:
7140              <?xml version="1.0"?>
7141              <p>aaa$u000D$u000Abbb</p>
7142          @@@test:domTree:
7143            document {
7144              xml-version: '1.0';
7145              element {
7146                text-content: 'aaa' U+000A 'bbb';
7147              }
7148            }
7149        @@XMLTest:
7150          @@@QName: xp.endofline.1.1.crlf.test
7151          @@@DEnt:
7152            @@@@test:value:
7153              <?xml version="1.1"?>
7154              <p>aaa$u000D$u000Abbb</p>
7155          @@@test:domTree:
7156            document {
7157              xml-version: '1.1';
7158              element {
7159                text-content: 'aaa' U+000A 'bbb';
7160              }
7161            }
7162        @@XMLTest:
7163          @@@QName: xp.endofline.1.0.crnl.test
7164          @@@DEnt:
7165            @@@@test:value:
7166              <?xml version="1.0"?>
7167              <p>aaa$u000D$u0085bbb</p>
7168          @@@test:domTree:
7169            document {
7170              xml-version: '1.0';
7171              element {
7172                text-content: 'aaa' U+000A U+0085 'bbb';
7173              }
7174            }
7175        @@XMLTest:
7176          @@@QName: xp.endofline.1.1.crnl.test
7177          @@@DEnt:
7178            @@@@test:value:
7179              <?xml version="1.1"?>
7180              <p>aaa$u000D$u0085bbb</p>
7181          @@@test:domTree:
7182            document {
7183              xml-version: '1.1';
7184              element {
7185                text-content: 'aaa' U+000A 'bbb';
7186              }
7187            }
7188        @@XMLTest:
7189          @@@QName: xp.endofline.1.0.nl.test
7190          @@@DEnt:
7191            @@@@test:value:
7192              <?xml version="1.0"?>
7193              <p>aaa$u0085bbb</p>
7194          @@@test:domTree:
7195            document {
7196              xml-version: '1.0';
7197              element {
7198                text-content: 'aaa' U+0085 'bbb';
7199              }
7200            }
7201        @@XMLTest:
7202          @@@QName: xp.endofline.1.1.nl.test
7203          @@@DEnt:
7204            @@@@test:value:
7205              <?xml version="1.1"?>
7206              <p>aaa$u0085bbb</p>
7207          @@@test:domTree:
7208            document {
7209              xml-version: '1.1';
7210              element {
7211                text-content: 'aaa' U+000A 'bbb';
7212              }
7213            }
7214        @@XMLTest:
7215          @@@QName: xp.endofline.1.0.ls.test
7216          @@@DEnt:
7217            @@@@test:value:
7218              <?xml version="1.0"?>
7219              <p>aaa$u2028bbb</p>
7220          @@@test:domTree:
7221            document {
7222              xml-version: '1.0';
7223              element {
7224                text-content: 'aaa' U+2028 'bbb';
7225              }
7226            }
7227        @@XMLTest:
7228          @@@QName: xp.endofline.1.1.ls.test
7229          @@@DEnt:
7230            @@@@test:value:
7231              <?xml version="1.1"?>
7232              <p>aaa$u2028bbb</p>
7233          @@@test:domTree:
7234            document {
7235              xml-version: '1.1';
7236              element {
7237                text-content: 'aaa' U+000A 'bbb';
7238              }
7239            }
7240        @@XMLTest:
7241          @@@QName: xp.endofline.1.0.cr.test
7242          @@@DEnt:
7243            @@@@test:value:
7244              <?xml version="1.0"?>
7245              <p>aaa$u000Dbbb</p>
7246          @@@test:domTree:
7247            document {
7248              xml-version: '1.0';
7249              element {
7250                text-content: 'aaa' U+000A 'bbb';
7251              }
7252            }
7253        @@XMLTest:
7254          @@@QName: xp.endofline.1.1.cr.test
7255          @@@DEnt:
7256            @@@@test:value:
7257              <?xml version="1.1"?>
7258              <p>aaa$u000Dbbb</p>
7259          @@@test:domTree:
7260            document {
7261              xml-version: '1.1';
7262              element {
7263                text-content: 'aaa' U+000A 'bbb';
7264              }
7265            }
7266        @@XMLTest:
7267          @@@QName: xp.endofline.1.0.lf.test
7268          @@@DEnt:
7269            @@@@test:value:
7270              <?xml version="1.0"?>
7271              <p>aaa$u000Abbb</p>
7272          @@@test:domTree:
7273            document {
7274              xml-version: '1.0';
7275              element {
7276                text-content: 'aaa' U+000A 'bbb';
7277              }
7278            }
7279        @@XMLTest:
7280          @@@QName: xp.endofline.1.1.lf.test
7281          @@@DEnt:
7282            @@@@test:value:
7283              <?xml version="1.1"?>
7284              <p>aaa$u000Abbb</p>
7285          @@@test:domTree:
7286            document {
7287              xml-version: '1.1';
7288              element {
7289                text-content: 'aaa' U+000A 'bbb';
7290              }
7291            }
7292        @@XMLTest:
7293          @@@QName: xp.xml10.endofline.nl.in.xmldecl.1.test
7294          @@@DEnt:
7295            @@@@test:value:
7296              <?xml$u0085version="1.0"?>
7297              <p/>
7298          @@@c:erred:
7299            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7300          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7301        @@XMLTest:
7302          @@@QName: xp.xml11.endofline.nl.in.xmldecl.1.test
7303          @@@DEnt:
7304            @@@@test:value:
7305              <?xml$u0085version="1.1"?>
7306              (err)<p/>
7307          @@@c:erred:
7308            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7309          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7310        @@XMLTest:
7311          @@@QName: xp.xml10.endofline.crnl.in.xmldecl.1.test
7312          @@@DEnt:
7313            @@@@test:value:
7314              <?xml$u000D$u0085version="1.0"?>
7315              <p/>
7316          @@@c:erred:
7317            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7318          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7319        @@XMLTest:
7320          @@@QName: xp.xml11.endofline.crnl.in.xmldecl.1.test
7321          @@@DEnt:
7322            @@@@test:value:
7323              <?xml$u000D$u0085version="1.1"?>
7324              (err)<p/>
7325          @@@c:erred:
7326            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7327          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7328        @@XMLTest:
7329          @@@QName: xp.xml10.endofline.ls.in.xmldecl.1.test
7330          @@@DEnt:
7331            @@@@test:value:
7332              <?xml$u2028version="1.0"?>
7333              <p/>
7334          @@@c:erred:
7335            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7336          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7337        @@XMLTest:
7338          @@@QName: xp.xml11.endofline.ls.in.xmldecl.1.test
7339          @@@DEnt:
7340            @@@@test:value:
7341              <?xml$u2028version="1.1"?>
7342              (err)<p/>
7343          @@@c:erred:
7344            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 6)..(2, 0); }
7345          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7346        @@XMLTest:
7347          @@@QName: xp.xml10.endofline.nl.in.xmldecl.2.test
7348          @@@DEnt:
7349            @@@@test:value:
7350              <?xml version="1.0"$u0085?>
7351              <p/>
7352          @@@c:erred:
7353            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7354          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7355        @@XMLTest:
7356          @@@QName: xp.xml11.endofline.nl.in.xmldecl.2.test
7357          @@@DEnt:
7358            @@@@test:value:
7359              <?xml version="1.1"$u0085?>
7360              (err)<p/>
7361          @@@c:erred:
7362            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7363          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7364        @@XMLTest:
7365          @@@QName: xp.xml10.endofline.crnl.in.xmldecl.2.test
7366          @@@DEnt:
7367            @@@@test:value:
7368              <?xml version="1.0"$u000D$u0085?>
7369              <p/>
7370          @@@c:erred:
7371            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7372          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7373        @@XMLTest:
7374          @@@QName: xp.xml11.endofline.crnl.in.xmldecl.2.test
7375          @@@DEnt:
7376            @@@@test:value:
7377              <?xml version="1.1"$u000D$u0085?>
7378              (err)<p/>
7379          @@@c:erred:
7380            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7381          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7382        @@XMLTest:
7383          @@@QName: xp.xml10.endofline.ls.in.xmldecl.2.test
7384          @@@DEnt:
7385            @@@@test:value:
7386              <?xml version="1.0"$u2028?>
7387              <p/>
7388          @@@c:erred:
7389            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7390          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7391        @@XMLTest:
7392          @@@QName: xp.xml11.endofline.ls.in.xmldecl.2.test
7393          @@@DEnt:
7394            @@@@test:value:
7395              <?xml version="1.1"$u2028?>
7396              (err)<p/>
7397          @@@c:erred:
7398            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 20)..(2, 0); }
7399          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7400        @@XMLTest:
7401          @@@QName: xp.xml10.endofline.nl.in.xmldecl.3.test
7402          @@@DEnt:
7403            @@@@test:value:
7404              <?xml $u0085version="1.0"?>
7405              <p/>
7406          @@@c:erred:
7407            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7408          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7409        @@XMLTest:
7410          @@@QName: xp.xml11.endofline.nl.in.xmldecl.3.test
7411          @@@DEnt:
7412            @@@@test:value:
7413              <?xml $u0085version="1.1"?>
7414              (err)<p/>
7415          @@@c:erred:
7416            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7417          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7418        @@XMLTest:
7419          @@@QName: xp.xml10.endofline.crnl.in.xmldecl.3.test
7420          @@@DEnt:
7421            @@@@test:value:
7422              <?xml $u000D$u0085version="1.0"?>
7423              <p/>
7424          @@@c:erred:
7425            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7426          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7427        @@XMLTest:
7428          @@@QName: xp.xml11.endofline.crnl.in.xmldecl.3.test
7429          @@@DEnt:
7430            @@@@test:value:
7431              <?xml $u000D$u0085version="1.1"?>
7432              (err)<p/>
7433          @@@c:erred:
7434            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7435          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7436        @@XMLTest:
7437          @@@QName: xp.xml10.endofline.ls.in.xmldecl.3.test
7438          @@@DEnt:
7439            @@@@test:value:
7440              <?xml $u2028version="1.0"?>
7441              <p/>
7442          @@@c:erred:
7443            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7444          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7445        @@XMLTest:
7446          @@@QName: xp.xml11.endofline.ls.in.xmldecl.3.test
7447          @@@DEnt:
7448            @@@@test:value:
7449              <?xml $u2028version="1.1"?>
7450              (err)<p/>
7451          @@@c:erred:
7452            <[[xp|fatal-xml11-end-of-line-in-xml-declaration]]> { (1, 7)..(2, 0); }
7453          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7454        @@XMLTest:
7455          @@@QName: xp.xml10implied.endofline.nl.in.pi.1.test
7456          @@@DEnt:
7457            @@@@test:value:
7458              <?xml-$u0085?>
7459              <p/>
7460          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 7)..(2, 0); }
7461        @@XMLTest:
7462          @@@QName: xp.xml10.endofline.nl.in.pi.1.test
7463          @@@DEnt:
7464            @@@@test:value:
7465              <?xml version="1.0"?>
7466              <?xml-$u0085?>
7467              <p/>
7468          @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 7)..(3, 0); }
7469        @@XMLTest:
7470          @@@QName: xp.xml11.endofline.nl.in.pi.1.test
7471          @@@DEnt:
7472            @@@@test:value:
7473              <?xml version="1.1"?>
7474              <?xml-$u0085?>
7475              <p/>
7476          @@@test:domTree:
7477            document {
7478              xml-version: '1.1';
7479              pi {
7480                node-name: 'xml-';
7481                node-value: '';
7482              }
7483              element { }
7484            }
7485        @@XMLTest:
7486          @@@QName: xp.xml10implied.endofline.crnl.in.pi.1.test
7487          @@@DEnt:
7488            @@@@test:value:
7489              <?xml-$u000D$u0085?>
7490              <p/>
7491          @@@test:domTree:
7492            document {
7493              xml-version: '1.0';
7494              pi {
7495                node-name: 'xml-';
7496                node-value: U+0085;
7497              }
7498              element { }
7499            }
7500        @@XMLTest:
7501          @@@QName: xp.xml10.endofline.crnl.in.pi.1.test
7502          @@@DEnt:
7503            @@@@test:value:
7504              <?xml version="1.0"?>
7505              <?xml-$u000D$u0085?>
7506              <p/>
7507          @@@test:domTree:
7508            document {
7509              xml-version: '1.0';
7510              pi {
7511                node-name: 'xml-';
7512                node-value: U+0085;
7513              }
7514              element { }
7515            }
7516        @@XMLTest:
7517          @@@QName: xp.xml11.endofline.crnl.in.pi.1.test
7518          @@@DEnt:
7519            @@@@test:value:
7520              <?xml version="1.1"?>
7521              <?xml-$u000D$u0085?>
7522              <p/>
7523          @@@test:domTree:
7524            document {
7525              xml-version: '1.1';
7526              pi {
7527                node-name: 'xml-';
7528                node-value: '';
7529              }
7530              element { }
7531            }
7532        @@XMLTest:
7533          @@@QName: xp.xml10implied.endofline.ls.in.pi.1.test
7534          @@@DEnt:
7535            @@@@test:value:
7536              <?xml-$u2028?>
7537              <p/>
7538          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 7)..(2, 0); }
7539        @@XMLTest:
7540          @@@QName: xp.xml10.endofline.ls.in.pi.1.test
7541          @@@DEnt:
7542            @@@@test:value:
7543              <?xml version="1.0"?>
7544              <?xml-$u2028?>
7545              <p/>
7546          @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 7)..(3, 0); }
7547        @@XMLTest:
7548          @@@QName: xp.xml11.endofline.ls.in.pi.1.test
7549          @@@DEnt:
7550            @@@@test:value:
7551              <?xml version="1.1"?>
7552              <?xml-$u2028?>
7553              <p/>
7554          @@@test:domTree:
7555            document {
7556              xml-version: '1.1';
7557              pi {
7558                node-name: 'xml-';
7559                node-value: '';
7560              }
7561              element { }
7562            }
7563        
7564        @@XMLTest:
7565          @@@QName: xp.xml10.endofline.internal.1.test
7566          @@@DEnt:
7567            @@@@test:value:
7568              <?xml version="1.0"?>
7569              <!DOCTYPE a [
7570              <!ENTITY e "&#x000D; &#x000A; &#x0085; &#x000D;&#x000A; $
7571              &#x000D;&#x0085; &#x2028;">
7572              ]><a>&e;</a>
7573          @@@test:domTree:
7574            document {
7575              xml-version: '1.0';
7576              document-type {
7577                general-entity {
7578                  node-name: 'e';
7579                  text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7580                                U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7581                }
7582              }
7583              element {
7584                text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7585                              U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7586              }
7587            }
7588        @@XMLTest:
7589          @@@QName: xp.xml11.endofline.internal.1.test
7590          @@@DEnt:
7591            @@@@test:value:
7592              <?xml version="1.1"?>
7593              <!DOCTYPE a [
7594              <!ENTITY e "&#x000D; &#x000A; &#x0085; &#x000D;&#x000A; $
7595              &#x000D;&#x0085; &#x2028;">
7596              ]><a>&e;</a>
7597          @@@test:domTree:
7598            document {
7599              xml-version: '1.1';
7600              document-type {
7601                general-entity {
7602                  node-name: 'e';
7603                  text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7604                                U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7605                }
7606              }
7607              element {
7608                text-content: U+000D ' ' U+000A ' ' U+0085 ' '
7609                              U+000D U+000A ' ' U+000D U+0085 ' ' U+2028;
7610              }
7611            }
7612    
7613        @@XMLTest:
7614          @@@QName: xp.noxmldecl.pi.pi.test
7615          @@@DEnt:
7616            @@@@test:value:
7617              <?noxml 1?><?noxml 2?><p/>
7618          @@@test:domTree:
7619            document {
7620              xml-version: '1.0';
7621              pi {
7622                node-name: 'noxml';
7623                node-value: '1';
7624              }
7625              pi {
7626                node-name: 'noxml';
7627                node-value: '2';
7628              }
7629              element { }
7630            }
7631        @@XMLTest:
7632          @@@QName: xp.noxmldecl.pi.pi.2.test
7633          @@@DEnt:
7634            @@@@test:value:
7635              <?xmlno 1?><?xmlno 2?><p/>
7636          @@@test:domTree:
7637            document {
7638              xml-version: '1.0';
7639              pi {
7640                node-name: 'xmlno';
7641                node-value: '1';
7642              }
7643              pi {
7644                node-name: 'xmlno';
7645                node-value: '2';
7646              }
7647              element { }
7648            }
7649        @@XMLTest:
7650          @@@QName: xp.noxmldecl.pi.pi.3.test
7651          @@@DEnt:
7652            @@@@test:value:
7653              <?xmln 1?><?xmln 2?><p/>
7654          @@@test:domTree:
7655            document {
7656              xml-version: '1.0';
7657              pi {
7658                node-name: 'xmln';
7659                node-value: '1';
7660              }
7661              pi {
7662                node-name: 'xmln';
7663                node-value: '2';
7664              }
7665              element { }
7666            }
7667        @@XMLTest:
7668          @@@QName: xp.noxml.s.nl.test
7669          @@@DEnt:
7670            @@@@test:value:
7671              $u0085<p/>
7672          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7673        @@XMLTest:
7674          @@@QName: xp.noxml.s.crnl.test
7675          @@@DEnt:
7676            @@@@test:value:
7677              $u000D$u0085<p/>
7678          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7679        @@XMLTest:
7680          @@@QName: xp.noxml.s.ls.test
7681          @@@DEnt:
7682            @@@@test:value:
7683              $u2028<p/>
7684          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 1)..(2, 0); }
7685        @@XMLTest:
7686          @@@QName: xp.xml10.decl.s.nl.test
7687          @@@DEnt:
7688            @@@@test:value:
7689              <?xml version="1.0"?>$u0085<p/>
7690          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 22)..(2, 0); }
7691        @@XMLTest:
7692          @@@QName: xp.xml10.decl.s.crnl.test
7693          @@@DEnt:
7694            @@@@test:value:
7695              <?xml version="1.0"?>$u000D$u0085<p/>
7696          @@@c:erred: <[[xp|wf-syntax-error]]> { (2, 0)..(3, 0); }
7697        @@XMLTest:
7698          @@@QName: xp.xml10.decl.s.ls.test
7699          @@@DEnt:
7700            @@@@test:value:
7701              <?xml version="1.0"?>$u2028<p/>
7702          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 22)..(2, 0); }
7703        @@XMLTest:
7704          @@@QName: xp.xml11.decl.s.nl.test
7705          @@@DEnt:
7706            @@@@test:value:
7707              <?xml version="1.1"?>$u0085<p/>
7708          @@@test:domTree:
7709            document {
7710              xml-version: '1.1';
7711              element { }
7712            }
7713        @@XMLTest:
7714          @@@QName: xp.xml11.decl.s.crnl.test
7715          @@@DEnt:
7716            @@@@test:value:
7717              <?xml version="1.1"?>$u000D$u0085<p/>
7718          @@@test:domTree:
7719            document {
7720              xml-version: '1.1';
7721              element { }
7722            }
7723        @@XMLTest:
7724          @@@QName: xp.xml11.decl.s.ls.test
7725          @@@DEnt:
7726            @@@@test:value:
7727              <?xml version="1.1"?>$u2028<p/>
7728          @@@test:domTree:
7729            document {
7730              xml-version: '1.1';
7731              element { }
7732            }
7733    
7734        @@XMLTest:
7735          @@@QName: xp.element.type.match.1.test
7736          @@@DEnt:
7737            @@@@test:value:
7738              <p></pa>(err)
7739          @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 4)..(1, 8); }
7740          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7741        @@XMLTest:
7742          @@@QName: xp.element.type.match.2.test
7743          @@@DEnt:
7744            @@@@test:value:
7745              <p><pa></pa></pa>(err)
7746          @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 13)..(1, 17); }
7747          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7748        @@XMLTest:
7749          @@@QName: xp.element.type.match.3.test
7750          @@@DEnt:
7751            @@@@test:value:
7752              <p><pa></p></p>(err)
7753          @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 8)..(1, 11); }
7754          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7755        @@XMLTest:
7756          @@@QName: xp.element.type.match.4.test
7757          @@@DEnt:
7758            @@@@test:value:
7759              <a:p xmlns:a="about:1"></p>(err)
7760          @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 24)..(1, 27); }
7761          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7762        @@XMLTest:
7763          @@@QName: xp.element.type.match.5.test
7764          @@@DEnt:
7765            @@@@test:value:
7766              <a:p xmlns:a="about:1" xmlns:b="about:1"></b:p>(err)
7767          @@@c:erred: <[[xp|wf-element-type-match]]> { (1, 42)..(1, 47); }
7768          @@@c:erred: <[[xp|wf-syntax-error]]> { }
7769    
7770        @@XMLTest:
7771          @@@QName: xp.stag.stago.name.etago.test
7772          @@@DEnt:
7773            @@@@test:value:
7774              <a</a>
7775          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 3); }
7776        @@XMLTest:
7777          @@@QName: xp.stag.stago.name.s.etago.test
7778          @@@DEnt:
7779            @@@@test:value:
7780              <a </a>
7781          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 4); }
7782        @@XMLTest:
7783          @@@QName: xp.stag.stago.name.s.attr.etago.test
7784          @@@DEnt:
7785            @@@@test:value:
7786              <a a="b"</a>
7787          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
7788        @@XMLTest:
7789          @@@QName: xp.stag.stago.name.s.attr.s.attr.etago.test
7790          @@@DEnt:
7791            @@@@test:value:
7792              <a a="b" c="d"</a>
7793          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 15); }
7794        @@XMLTest:
7795          @@@QName: xp.stag.stago.name.s.attr.s.etago.test
7796          @@@DEnt:
7797            @@@@test:value:
7798              <a a="b" </a>
7799          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 10); }
7800        @@XMLTest:
7801          @@@QName: xp.stag.etag.1.test
7802          @@@DEnt:
7803            @@@@test:value:
7804              <root><a></a></root>
7805          @@@test:domTree:
7806            document {
7807              element {
7808                element {
7809                  node-name: 'a';
7810                }
7811              }
7812            }      
7813        @@XMLTest:
7814          @@@QName: xp.stag.etag.2.test
7815          @@@DEnt:
7816            @@@@test:value:
7817              <root><ab></ab></root>
7818          @@@test:domTree:
7819            document {
7820              element {
7821                element {
7822                  node-name: 'ab';
7823                }
7824              }
7825            }      
7826        @@XMLTest:
7827          @@@QName: xp.stag.etag.s.1.test
7828          @@@DEnt:
7829            @@@@test:value:
7830              <root><a  ></a  ></root>
7831          @@@test:domTree:
7832            document {
7833              element {
7834                element {
7835                  node-name: 'a';
7836                }
7837              }
7838            }      
7839        @@XMLTest:
7840          @@@QName: xp.etag.1.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.etag.2.test
7854          @@@DEnt:
7855            @@@@test:value:
7856              <root><a    /></root>
7857          @@@test:domTree:
7858            document {
7859              element {
7860                element {
7861                  node-name: 'a';
7862                }
7863              }
7864            }      
7865        @@XMLTest:
7866          @@@QName: xp.stag.etag.attr.1.test
7867          @@@DEnt:
7868            @@@@test:value:
7869              <root><a at="v"></a></root>
7870          @@@test:domTree:
7871            document {
7872              element {
7873                element {
7874                  node-name: 'a';
7875                  attribute {
7876                    node-name: 'at';
7877                    value: 'v';
7878                  }
7879                }
7880              }
7881            }      
7882        @@XMLTest:
7883          @@@QName: xp.stag.etag.attr.2.test
7884          @@@DEnt:
7885            @@@@test:value:
7886              <root><a at="v"  ></a></root>
7887          @@@test:domTree:
7888            document {
7889              element {
7890                element {
7891                  node-name: 'a';
7892                  attribute {
7893                    node-name: 'at';
7894                    value: 'v';
7895                  }
7896                }
7897              }
7898            }      
7899        @@XMLTest:
7900          @@@QName: xp.stag.etag.attr.3.test
7901          @@@DEnt:
7902            @@@@test:value:
7903              <root><a at     ="v"></a></root>
7904          @@@test:domTree:
7905            document {
7906              element {
7907                element {
7908                  node-name: 'a';
7909                  attribute {
7910                    node-name: 'at';
7911                    value: 'v';
7912                  }
7913                }
7914              }
7915            }      
7916        @@XMLTest:
7917          @@@QName: xp.stag.etag.attr.4.test
7918          @@@DEnt:
7919            @@@@test:value:
7920              <root><a at=   "v"></a></root>
7921          @@@test:domTree:
7922            document {
7923              element {
7924                element {
7925                  node-name: 'a';
7926                  attribute {
7927                    node-name: 'at';
7928                    value: 'v';
7929                  }
7930                }
7931              }
7932            }      
7933        @@XMLTest:
7934          @@@QName: xp.stag.etag.attr.5.test
7935          @@@DEnt:
7936            @@@@test:value:
7937              <root><a at='v'></a></root>
7938          @@@test:domTree:
7939            document {
7940              element {
7941                element {
7942                  node-name: 'a';
7943                  attribute {
7944                    node-name: 'at';
7945                    value: 'v';
7946                  }
7947                }
7948              }
7949            }      
7950        @@XMLTest:
7951          @@@QName: xp.stag.etag.attr.6.test
7952          @@@DEnt:
7953            @@@@test:value:
7954              <root><a at=   'v'  ></a></root>
7955          @@@test:domTree:
7956            document {
7957              element {
7958                element {
7959                  node-name: 'a';
7960                  attribute {
7961                    node-name: 'at';
7962                    value: 'v';
7963                  }
7964                }
7965              }
7966            }      
7967        @@XMLTest:
7968          @@@QName: xp.stag.etag.attr.attr.1.test
7969          @@@DEnt:
7970            @@@@test:value:
7971              <root><a at="v"  tr="w"></a></root>
7972          @@@test:domTree:
7973            document {
7974              element {
7975                element {
7976                  node-name: 'a';
7977                  attribute {
7978                    node-name: 'at';
7979                    value: 'v';
7980                  }
7981                  attribute {
7982                    node-name: 'tr';
7983                    value: 'w';
7984                  }
7985                }
7986              }
7987            }      
7988        @@XMLTest:
7989          @@@QName: xp.stag.etag.attr.attr.2.test
7990          @@@DEnt:
7991            @@@@test:value:
7992              <root><a tr="w" at="v"></a></root>
7993          @@@test:domTree:
7994            document {
7995              element {
7996                element {
7997                  node-name: 'a';
7998                  attribute {
7999                    node-name: 'at';
8000                    value: 'v';
8001                  }
8002                  attribute {
8003                    node-name: 'tr';
8004                    value: 'w';
8005                  }
8006                }
8007              }
8008            }      
8009        @@XMLTest:
8010          @@@QName: xp.stag.etag.attr.no.s.attr.test
8011          @@@DEnt:
8012            @@@@test:value:
8013              <root><a at="v"tr="w"></a></root>
8014          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 16)..(1, 17); }
8015        @@XMLTest:
8016          @@@QName: xp.etag.attr.1.test
8017          @@@DEnt:
8018            @@@@test:value:
8019              <root><a at="v" tr="w"></a b="c"></root>
8020          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 28); }
8021        @@XMLTest:
8022          @@@QName: xp.etag.no.etagc.1.test
8023          @@@DEnt:
8024            @@@@test:value:
8025              <root><a at="v" tr="w"></a</root>
8026          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 27)..(1, 28); }
8027        @@XMLTest:
8028          @@@QName: xp.etag.no.etagc.2.test
8029          @@@DEnt:
8030            @@@@test:value:
8031              <root><a at="v" tr="w"></a  </root>
8032          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 29)..(1, 30); }
8033        @@XMLTest:
8034          @@@QName: xp.mtag.attr.1.test
8035          @@@DEnt:
8036            @@@@test:value:
8037              <root><a  b="c"/></root>
8038          @@@test:domTree:
8039            document {
8040              element {
8041                element {
8042                  node-name: 'a';
8043                  attribute {
8044                    node-name: 'b';
8045                    value: 'c';
8046                  }
8047                }
8048              }
8049            }      
8050        @@XMLTest:
8051          @@@QName: xp.mtag.attr.2.test
8052          @@@DEnt:
8053            @@@@test:value:
8054              <root><a  b="c"  /></root>
8055          @@@test:domTree:
8056            document {
8057              element {
8058                element {
8059                  node-name: 'a';
8060                  attribute {
8061                    node-name: 'b';
8062                    value: 'c';
8063                  }
8064                }
8065              }
8066            }      
8067        @@XMLTest:
8068          @@@QName: xp.mtag.attr.3.test
8069          @@@DEnt:
8070            @@@@test:value:
8071              <root><a  b='c'/></root>
8072          @@@test:domTree:
8073            document {
8074              element {
8075                element {
8076                  node-name: 'a';
8077                  attribute {
8078                    node-name: 'b';
8079                    value: 'c';
8080                  }
8081                }
8082              }
8083            }      
8084        @@XMLTest:
8085          @@@QName: xp.mtag.attr.4.test
8086          @@@DEnt:
8087            @@@@test:value:
8088              <root><a  b="c" d="e"/></root>
8089          @@@test:domTree:
8090            document {
8091              element {
8092                element {
8093                  node-name: 'a';
8094                  attribute {
8095                    node-name: 'b';
8096                    value: 'c';
8097                  }
8098                  attribute {
8099                    node-name: 'd';
8100                    value: 'e';
8101                  }
8102                }
8103              }
8104            }      
8105    
8106        @@XMLTest:
8107          @@@QName: xp.attvalue.lt.1.test
8108          @@@DEnt:
8109            @@@@test:value:
8110              <a b="aa<dd"/>
8111          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
8112        @@XMLTest:
8113          @@@QName: xp.attvalue.lt.2.test
8114          @@@DEnt:
8115            @@@@test:value:
8116              <a b='aa<dd'/>
8117          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9); }
8118        @@XMLTest:
8119          @@@QName: xp.attvalue.amp.1.test
8120          @@@DEnt:
8121            @@@@test:value:
8122              <a b="aa& dd"/>
8123          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 12); }
8124        @@XMLTest:
8125          @@@QName: xp.attvalue.amp.2.test
8126          @@@DEnt:
8127            @@@@test:value:
8128              <a b='aa& dd'/>
8129          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 12); }
8130        @@XMLTest:
8131          @@@QName: xp.attvalue.amp.3.test
8132          @@@DEnt:
8133            @@@@test:value:
8134              <a b="aa&# dd"/>
8135          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 13); }
8136        @@XMLTest:
8137          @@@QName: xp.attvalue.amp.4.test
8138          @@@DEnt:
8139            @@@@test:value:
8140              <a b="aa&#x dd"/>
8141          @@@c:erred: <[[xp|wf-syntax-error]]> { (1, 9)..(1, 14); }
8142    
8143        @@XMLTest:
8144          @@@QName: xp.unique.att.spec.1.test
8145          @@@DEnt:
8146            @@@@test:value:
8147              <a b="c" b="d"/>
8148          @@@c:erred: <[[xp|wf-unique-att-spec]]> { (1, 4)..(1, 14); }
8149        @@XMLTest:
8150          @@@QName: xp.unique.att.spec.2.test
8151          @@@DEnt:
8152            @@@@test:value:
8153              <a d:b="c" d:b="d" xmlns:d="about:2"/>
8154          @@@c:erred: <[[xp|wf-unique-att-spec]]> { (1, 4)..(1, 18); }
8155    
8156        @@XMLTest:
8157          @@@QName: xp.no.external.entity.references.1.test
8158          @@@DEnt:
8159            @@@@test:value:
8160              <!DOCTYPE a [
8161                <!ENTITY ent SYSTEM "something">
8162              ]>
8163              <a b="c&ent;"/>
8164          @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (4, 8)..(4, 12); }
8165        @@XMLTest:
8166          @@@QName: xp.no.external.entity.references.2.test
8167          @@@DEnt:
8168            @@@@test:value:
8169              <!DOCTYPE a [
8170                <!NOTATION n SYSTEM "notation">
8171                <!ENTITY ent SYSTEM "something" NDATA n>
8172              ]>
8173              <a b="c&ent;"/>
8174          @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (5, 8)..(5, 12); }
8175        @@XMLTest:
8176          @@@QName: xp.no.external.entity.references.3.test
8177          @@@DEnt:
8178            @@@@test:value:
8179              <!DOCTYPE a [
8180                <!ENTITY ent SYSTEM "something">
8181                <!ENTITY ent2 "ddd&ent;">
8182              ]>
8183              <a b="c&ent2;"/>
8184          @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 4)..(1, 8); }
8185        @@XMLTest:
8186          @@@QName: xp.no.external.entity.references.4.test
8187          @@@DEnt:
8188            @@@@test:value:
8189              <!DOCTYPE a [
8190                <!NOTATION n SYSTEM "notation">
8191                <!ENTITY ent SYSTEM "something" NDATA n>
8192                <!ENTITY ent2 "ddd&ent;">
8193              ]>
8194              <a b="c&ent2;"/>
8195          @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 4)..(1, 8); }
8196          @@@c:erred: <[[xp|wf-parsed-entity]]> { }
8197        @@XMLTest:
8198          @@@QName: xp.no.lt.in.attr.value.1.test
8199          @@@DEnt:
8200            @@@@test:value:
8201              <!DOCTYPE a [
8202              <!ENTITY ent "aa<bb">
8203              ]>
8204              <a b="c&ent;"/>
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.2.test
8211          @@@DEnt:
8212            @@@@test:value:
8213              <!DOCTYPE a [
8214              <!ENTITY ent "aa<bb">
8215              <!ENTITY ent2 "ccc&ent;">
8216              ]>
8217              <a b="c&ent2;"/>
8218          @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8219          @@@c:erred:
8220            @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8221            @@@@enImplNote: When entity node is created.
8222        @@XMLTest:
8223          @@@QName: xp.no.lt.in.attr.value.3.test
8224          @@@DEnt:
8225            @@@@test:value:
8226              <!DOCTYPE a [
8227              <!ENTITY ent "aa&#x3C;bb">
8228              ]>
8229              <a b="c&ent;"/>
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.no.lt.in.attr.value.4.test
8236          @@@DEnt:
8237            @@@@test:value:
8238              <!DOCTYPE a [
8239              <!ENTITY ent "aa&#x3C;bb">
8240              <!ENTITY ent2 "ccc&ent;">
8241              ]>
8242              <a b="c&ent2;"/>
8243          @@@c:erred: <[[xp|wf-no-lt-in-attribute-values]]> { (1, 3); }
8244          @@@c:erred:
8245            @@@@@: <[[xp|wf-syntax-error]]> { (1, 3)..(1, 6); }
8246            @@@@enImplNote: When entity node is created.
8247        @@XMLTest:
8248          @@@QName: xp.ger.lt.in.attr.value.1.test
8249          @@@DEnt:
8250            @@@@test:value:
8251              <!DOCTYPE a [
8252              <!ENTITY ent "aa&lt;bb">
8253              ]>
8254              <a b="c&ent;"/>
8255          @@@test:domTree:
8256            document {
8257              document-type {
8258                general-entity {
8259                  node-name: 'ent';
8260                  text-content: 'aa<bb';
8261                }
8262              }
8263              element {
8264                attribute {
8265                  node-name: 'b';
8266                  text { data: 'c'; }
8267                  general-entity-reference {
8268                    is-expanded: true;
8269                    node-name: 'ent';
8270                    text-content: 'aa<bb';
8271                  }
8272                }
8273              }
8274            }
8275        @@XMLTest:
8276          @@@QName: xp.ger.lt.in.attr.value.2.test
8277          @@@DEnt:
8278            @@@@test:value:
8279              <!DOCTYPE a [
8280              <!ENTITY ent "aa&lt;bb">
8281              <!ENTITY ent2 "ccc&ent;">
8282              ]>
8283              <a b="c&ent2;"/>
8284          @@@test:domTree:
8285            document {
8286              document-type {
8287                general-entity {
8288                  node-name: 'ent';
8289                  text-content: 'aa<bb';
8290                }
8291                general-entity {
8292                  node-name: 'ent2';
8293                  text { data: 'ccc'; }
8294                  general-entity-reference {
8295                    node-name: 'ent';
8296                    text-content: 'aa<bb';
8297                    is-expanded: true;
8298                  }
8299                }
8300              }
8301              element {
8302                attribute {
8303                  node-name: 'b';
8304                  text { data: 'c'; }
8305                  general-entity-reference {
8306                    node-name: 'ent2';
8307                    text { data: 'ccc'; }
8308                    general-entity-reference {
8309                      node-name: 'ent';
8310                      text-content: 'aa<bb';
8311                      is-expanded: true;
8312                    }
8313                    is-expanded: true;
8314                  }
8315                }
8316              }
8317            }
8318    
8319      @@XMLTest:      @@XMLTest:
8320        @@@QName: xp.doctype.intsubset.pi.test        @@@QName: xp.doctype.intsubset.pi.test
# Line 5240  ClsDef: Line 8429  ClsDef:
8429                text {                text {
8430                  data: 'entity value';                  data: 'entity value';
8431                }                }
8432                  is-expanded: true;
8433              }              }
8434            }            }
8435          }          }
# Line 5273  ClsDef: Line 8463  ClsDef:
8463                text {                text {
8464                  data: 'entity value';                  data: 'entity value';
8465                }                }
8466                  is-expanded: true;
8467              }              }
8468              text { data: ' and '; }              text { data: ' and '; }
8469              general-entity-reference {              general-entity-reference {
# Line 5280  ClsDef: Line 8471  ClsDef:
8471                text {                text {
8472                  data: 'entity value';                  data: 'entity value';
8473                }                }
8474                  is-expanded: true;
8475              }              }
8476            }            }
8477          }          }
# Line 5311  ClsDef: Line 8503  ClsDef:
8503                  node-name: 'e';                  node-name: 'e';
8504                  text-content: 'element';                  text-content: 'element';
8505                }                }
8506                  text { data: ' '; }
8507              }              }
8508            }            }
8509            element {            element {
# Line 5319  ClsDef: Line 8512  ClsDef:
8512              local-name: 'a';              local-name: 'a';
8513              general-entity-reference {              general-entity-reference {
8514                node-name: 'entity';                node-name: 'entity';
8515                  is-expanded: true;
8516                text {                text {
8517                  data: 'entity ';                  data: 'entity ';
8518                }                }
# Line 5385  ClsDef: Line 8579  ClsDef:
8579              general-entity-reference {              general-entity-reference {
8580                node-name: 'entity2';                node-name: 'entity2';
8581                text { data: 'e'; }                text { data: 'e'; }
8582                  is-expanded: true;
8583                general-entity-reference {                general-entity-reference {
8584                  node-name: 'entity1';                  node-name: 'entity1';
8585                  text {                  text {
8586                    data: 'entity value';                    data: 'entity value';
8587                  }                  }
8588                    is-expanded: true;
8589                }                }
8590                text { data: 'n'; }                text { data: 'n'; }
8591              }              }
# Line 6108  ClsDef: Line 9304  ClsDef:
9304            }            }
9305          }          }
9306    
9307        @@XMLTest:
9308          @@@QName: xp.element.content.ncr.1.test
9309          @@@DEnt:
9310            @@@@test:value:
9311              <e>&#33;</e>
9312          @@@test:domTree:
9313            document {
9314              element {
9315                text-content: '!';
9316              }
9317            }
9318        @@XMLTest:
9319          @@@QName: xp.element.content.ncr.2.test
9320          @@@DEnt:
9321            @@@@test:value:
9322              <e>aaaa&#33;bbbb</e>
9323          @@@test:domTree:
9324            document {
9325              element {
9326                text-content: 'aaaa!bbbb';
9327                text {
9328                  text-content: 'aaaa!bbbb';
9329                }
9330              }
9331            }
9332        @@XMLTest:
9333          @@@QName: xp.attrval.ncr.1.test
9334          @@@DEnt:
9335            @@@@test:value:
9336              <e a="&#33;"/>
9337          @@@test:domTree:
9338            document {
9339              element {
9340                attribute {
9341                  node-name: 'a';
9342                  text-content: '!';
9343                }
9344              }
9345            }
9346        @@XMLTest:
9347          @@@QName: xp.attrval.ncr.2.test
9348          @@@DEnt:
9349            @@@@test:value:
9350              <e a="aaaaa&#33;bbbbb"/>
9351          @@@test:domTree:
9352            document {
9353              element {
9354                attribute {
9355                  node-name: 'a';
9356                  text-content: 'aaaaa!bbbbb';
9357                  text {
9358                    text-content: 'aaaaa!bbbbb';
9359                  }
9360                }
9361              }
9362            }
9363        @@XMLTest:
9364          @@@QName: xp.attrval.ncr.3.test
9365          @@@DEnt:
9366            @@@@test:value:
9367              <e a='&#33;'/>
9368          @@@test:domTree:
9369            document {
9370              element {
9371                attribute {
9372                  node-name: 'a';
9373                  text-content: '!';
9374                }
9375              }
9376            }
9377        @@XMLTest:
9378          @@@QName: xp.attrval.ncr.4.test
9379          @@@DEnt:
9380            @@@@test:value:
9381              <e a='aaaaa&#33;bbbbb'/>
9382          @@@test:domTree:
9383            document {
9384              element {
9385                attribute {
9386                  node-name: 'a';
9387                  text-content: 'aaaaa!bbbbb';
9388                }
9389              }
9390            }
9391        @@XMLTest:
9392          @@@QName: xp.entval.ncr.1.test
9393          @@@DEnt:
9394            @@@@test:value:
9395              <!DOCTYPE e [
9396                <!ENTITY ent "&#33;">
9397              ]>
9398              <e/>
9399          @@@test:domTree:
9400            document {
9401              document-type {
9402                general-entity {
9403                  node-name: 'ent';
9404                  text-content: '!';
9405                }
9406              }
9407              element { }
9408            }
9409        @@XMLTest:
9410          @@@QName: xp.entval.ncr.2.test
9411          @@@DEnt:
9412            @@@@test:value:
9413              <!DOCTYPE e [
9414                <!ENTITY ent "aaaaa&#33;bbbbb">
9415              ]>
9416              <e/>
9417          @@@test:domTree:
9418            document {
9419              document-type {
9420                general-entity {
9421                  node-name: 'ent';
9422                  text-content: 'aaaaa!bbbbb';
9423                }
9424              }
9425              element { }
9426            }
9427        @@XMLTest:
9428          @@@QName: xp.element.content.reptxt.ncr.1.test
9429          @@@DEnt:
9430            @@@@test:value:
9431              <!DOCTYPE e [
9432                <!ENTITY ent "&#38;#33;">
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: '!';
9442                  is-expanded: true;
9443                }
9444              }
9445            }
9446        @@XMLTest:
9447          @@@QName: xp.element.content.reptxt.ncr.2.test
9448          @@@DEnt:
9449            @@@@test:value:
9450              <!DOCTYPE e [
9451                <!ENTITY ent "aaaaa&#38;#33;bbbbb">
9452              ]>
9453              <e>&ent;</e>
9454          @@@test:domTree:
9455            document {
9456              document-type { }
9457              element {
9458                general-entity-reference {
9459                  node-name: 'ent';
9460                  text-content: 'aaaaa!bbbbb';
9461                  is-expanded: true;
9462                }
9463              }
9464            }
9465        @@XMLTest:
9466          @@@QName: xp.element.content.reptxt.reptxt.ncr.1.test
9467          @@@DEnt:
9468            @@@@test:value:
9469              <!DOCTYPE e [
9470                <!ENTITY ent "&#38;#33;">
9471                <!ENTITY ent2 "&ent;">
9472              ]>
9473              <e>&ent2;</e>
9474          @@@test:domTree:
9475            document {
9476              document-type { }
9477              element {
9478                general-entity-reference {
9479                  node-name: 'ent2';
9480                  general-entity-reference {
9481                    node-name: 'ent';
9482                    text-content: '!';
9483                    is-expanded: true;
9484                  }
9485                  is-expanded: true;
9486                }
9487              }
9488            }
9489        @@XMLTest:
9490          @@@QName: xp.element.content.reptxt.reptxt.ncr.2.test
9491          @@@DEnt:
9492            @@@@test:value:
9493              <!DOCTYPE e [
9494                <!ENTITY ent "aa&#38;#33;bb">
9495                <!ENTITY ent2 "&ent;">
9496              ]>
9497              <e>&ent2;</e>
9498          @@@test:domTree:
9499            document {
9500              document-type { }
9501              element {
9502                general-entity-reference {
9503                  node-name: 'ent2';
9504                  general-entity-reference {
9505                    node-name: 'ent';
9506                    text-content: 'aa!bb';
9507                    is-expanded: true;
9508                    text {
9509                      text-content: 'aa!bb';
9510                    }
9511                  }
9512                  is-expanded: true;
9513                }
9514              }
9515            }
9516        @@XMLTest:
9517          @@@QName: xp.attval.reptxt.ncr.1.test
9518          @@@DEnt:
9519            @@@@test:value:
9520              <!DOCTYPE e [
9521                <!ENTITY ent "&#38;#33;">
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: '!';
9533                    is-expanded: true;
9534                  }
9535                }
9536              }
9537            }
9538        @@XMLTest:
9539          @@@QName: xp.attval.reptxt.ncr.2.test
9540          @@@DEnt:
9541            @@@@test:value:
9542              <!DOCTYPE e [
9543                <!ENTITY ent "aaaaa&#38;#33;bbbbb">
9544              ]>
9545              <e a="&ent;"/>
9546          @@@test:domTree:
9547            document {
9548              document-type { }
9549              element {
9550                attribute {
9551                  node-name: 'a';
9552                  general-entity-reference {
9553                    node-name: 'ent';
9554                    text-content: 'aaaaa!bbbbb';
9555                    is-expanded: true;
9556                    text {
9557                      text-content: 'aaaaa!bbbbb';
9558                    }
9559                  }
9560                }
9561              }
9562            }
9563        @@XMLTest:
9564          @@@QName: xp.attval.reptxt.reptxt.ncr.1.test
9565          @@@DEnt:
9566            @@@@test:value:
9567              <!DOCTYPE e [
9568                <!ENTITY ent "&#38;#33;">
9569                <!ENTITY ent2 "&ent;">
9570              ]>
9571              <e a="&ent2;"/>
9572          @@@test:domTree:
9573            document {
9574              document-type { }
9575              element {
9576                attribute {
9577                  node-name: 'a';
9578                  general-entity-reference {
9579                    node-name: 'ent2';
9580                    is-expanded: true;
9581                    general-entity-reference {
9582                      node-name: 'ent';
9583                      text-content: '!';
9584                      is-expanded: true;
9585                    }
9586                  }
9587                }
9588              }
9589            }
9590        @@XMLTest:
9591          @@@QName: xp.attval.reptxt.reptxt.ncr.2.test
9592          @@@DEnt:
9593            @@@@test:value:
9594              <!DOCTYPE e [
9595                <!ENTITY ent "aa&#38;#33;bb">
9596                <!ENTITY ent2 "&ent;">
9597              ]>
9598              <e a="&ent2;"/>
9599          @@@test:domTree:
9600            document {
9601              document-type { }
9602              element {
9603                attribute {
9604                  node-name: 'a';
9605                  general-entity-reference {
9606                    node-name: 'ent2';
9607                    is-expanded: true;
9608                    general-entity-reference {
9609                      node-name: 'ent';
9610                      text-content: 'aa!bb';
9611                      is-expanded: true;
9612                    }
9613                  }
9614                }
9615              }
9616            }
9617    
9618        @@XMLTest:
9619          @@@QName: xp.element.content.hcr.1.test
9620          @@@DEnt:
9621            @@@@test:value:
9622              <e>&#x21;</e>
9623          @@@test:domTree:
9624            document {
9625              element {
9626                text-content: '!';
9627              }
9628            }
9629        @@XMLTest:
9630          @@@QName: xp.element.content.hcr.2.test
9631          @@@DEnt:
9632            @@@@test:value:
9633              <e>aaaa&#x21;bbbb</e>
9634          @@@test:domTree:
9635            document {
9636              element {
9637                text-content: 'aaaa!bbbb';
9638                text {
9639                  text-content: 'aaaa!bbbb';
9640                }
9641              }
9642            }
9643        @@XMLTest:
9644          @@@QName: xp.attrval.hcr.1.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.2.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                  text {
9669                    text-content: 'aaaaa!bbbbb';
9670                  }
9671                }
9672              }
9673            }
9674        @@XMLTest:
9675          @@@QName: xp.attrval.hcr.3.test
9676          @@@DEnt:
9677            @@@@test:value:
9678              <e a='&#x21;'/>
9679          @@@test:domTree:
9680            document {
9681              element {
9682                attribute {
9683                  node-name: 'a';
9684                  text-content: '!';
9685                }
9686              }
9687            }
9688        @@XMLTest:
9689          @@@QName: xp.attrval.hcr.4.test
9690          @@@DEnt:
9691            @@@@test:value:
9692              <e a='aaaaa&#x21;bbbbb'/>
9693          @@@test:domTree:
9694            document {
9695              element {
9696                attribute {
9697                  node-name: 'a';
9698                  text-content: 'aaaaa!bbbbb';
9699                }
9700              }
9701            }
9702        @@XMLTest:
9703          @@@QName: xp.entval.hcr.1.test
9704          @@@DEnt:
9705            @@@@test:value:
9706              <!DOCTYPE e [
9707                <!ENTITY ent "&#x21;">
9708              ]>
9709              <e/>
9710          @@@test:domTree:
9711            document {
9712              document-type {
9713                general-entity {
9714                  node-name: 'ent';
9715                  text-content: '!';
9716                }
9717              }
9718              element { }
9719            }
9720        @@XMLTest:
9721          @@@QName: xp.entval.hcr.2.test
9722          @@@DEnt:
9723            @@@@test:value:
9724              <!DOCTYPE e [
9725                <!ENTITY ent "aaaaa&#x21;bbbbb">
9726              ]>
9727              <e/>
9728          @@@test:domTree:
9729            document {
9730              document-type {
9731                general-entity {
9732                  node-name: 'ent';
9733                  text-content: 'aaaaa!bbbbb';
9734                  text {
9735                    text-content: 'aaaaa!bbbbb';
9736                  }
9737                }
9738              }
9739              element { }
9740            }
9741        @@XMLTest:
9742          @@@QName: xp.element.content.reptxt.hcr.1.test
9743          @@@DEnt:
9744            @@@@test:value:
9745              <!DOCTYPE e [
9746                <!ENTITY ent "&#38;#x21;">
9747              ]>
9748              <e>&ent;</e>
9749          @@@test:domTree:
9750            document {
9751              document-type { }
9752              element {
9753                general-entity-reference {
9754                  node-name: 'ent';
9755                  text-content: '!';
9756                  is-expanded: true;
9757                }
9758              }
9759            }
9760        @@XMLTest:
9761          @@@QName: xp.element.content.reptxt.hcr.2.test
9762          @@@DEnt:
9763            @@@@test:value:
9764              <!DOCTYPE e [
9765                <!ENTITY ent "aaaaa&#38;#x21;bbbbb">
9766              ]>
9767              <e>&ent;</e>
9768          @@@test:domTree:
9769            document {
9770              document-type { }
9771              element {
9772                general-entity-reference {
9773                  node-name: 'ent';
9774                  text-content: 'aaaaa!bbbbb';
9775                  is-expanded: true;
9776                }
9777              }
9778            }
9779        @@XMLTest:
9780          @@@QName: xp.element.content.reptxt.reptxt.hcr.1.test
9781          @@@DEnt:
9782            @@@@test:value:
9783              <!DOCTYPE e [
9784                <!ENTITY ent "&#38;#x21;">
9785                <!ENTITY ent2 "&ent;">
9786              ]>
9787              <e>&ent2;</e>
9788          @@@test:domTree:
9789            document {
9790              document-type { }
9791              element {
9792                general-entity-reference {
9793                  node-name: 'ent2';
9794                  is-expanded: true;
9795                  general-entity-reference {
9796                    node-name: 'ent';
9797                    text-content: '!';
9798                    is-expanded: true;
9799                  }
9800                }
9801              }
9802            }
9803        @@XMLTest:
9804          @@@QName: xp.element.content.reptxt.reptxt.hcr.2.test
9805          @@@DEnt:
9806            @@@@test:value:
9807              <!DOCTYPE e [
9808                <!ENTITY ent "aa&#38;#x21;bb">
9809                <!ENTITY ent2 "&ent;">
9810              ]>
9811              <e>&ent2;</e>
9812          @@@test:domTree:
9813            document {
9814              document-type { }
9815              element {
9816                general-entity-reference {
9817                  node-name: 'ent2';
9818                  is-expanded: true;
9819                  general-entity-reference {
9820                    node-name: 'ent';
9821                    is-expanded: true;
9822                    text-content: 'aa!bb';
9823                  }
9824                }
9825              }
9826            }
9827        @@XMLTest:
9828          @@@QName: xp.attval.reptxt.hcr.1.test
9829          @@@DEnt:
9830            @@@@test:value:
9831              <!DOCTYPE e [
9832                <!ENTITY ent "&#38;#x21;">
9833              ]>
9834              <e a="&ent;"/>
9835          @@@test:domTree:
9836            document {
9837              document-type { }
9838              element {
9839                attribute {
9840                  node-name: 'a';
9841                  general-entity-reference {
9842                    node-name: 'ent';
9843                    is-expanded: true;
9844                    text-content: '!';
9845                  }
9846                }
9847              }
9848            }
9849        @@XMLTest:
9850          @@@QName: xp.attval.reptxt.hcr.2.test
9851          @@@DEnt:
9852            @@@@test:value:
9853              <!DOCTYPE e [
9854                <!ENTITY ent "aaaaa&#38;#x21;bbbbb">
9855              ]>
9856              <e a="&ent;"/>
9857          @@@test:domTree:
9858            document {
9859              document-type { }
9860              element {
9861                attribute {
9862                  node-name: 'a';
9863                  general-entity-reference {
9864                    node-name: 'ent';
9865                    is-expanded: true;
9866                    text-content: 'aaaaa!bbbbb';
9867                    text {
9868                      text-content: 'aaaaa!bbbbb';
9869                    }
9870                  }
9871                }
9872              }
9873            }
9874        @@XMLTest:
9875          @@@QName: xp.attval.reptxt.reptxt.hcr.1.test
9876          @@@DEnt:
9877            @@@@test:value:
9878              <!DOCTYPE e [
9879                <!ENTITY ent "&#38;#x21;">
9880                <!ENTITY ent2 "&ent;">
9881              ]>
9882              <e a="&ent2;"/>
9883          @@@test:domTree:
9884            document {
9885              document-type { }
9886              element {
9887                attribute {
9888                  node-name: 'a';
9889                  general-entity-reference {
9890                    node-name: 'ent2';
9891                    is-expanded: true;
9892                    general-entity-reference {
9893                      node-name: 'ent';
9894                      is-expanded: true;
9895                      text-content: '!';
9896                    }
9897                  }
9898                }
9899              }
9900            }
9901        @@XMLTest:
9902          @@@QName: xp.attval.reptxt.reptxt.hcr.2.test
9903          @@@DEnt:
9904            @@@@test:value:
9905              <!DOCTYPE e [
9906                <!ENTITY ent "aa&#38;#x21;bb">
9907                <!ENTITY ent2 "&ent;">
9908              ]>
9909              <e a="&ent2;"/>
9910          @@@test:domTree:
9911            document {
9912              document-type { }
9913              element {
9914                attribute {
9915                  node-name: 'a';
9916                  general-entity-reference {
9917                    node-name: 'ent2';
9918                    is-expanded: true;
9919                    general-entity-reference {
9920                      node-name: 'ent';
9921                      is-expanded: true;
9922                      text-content: 'aa!bb';
9923                    }
9924                  }
9925                }
9926              }
9927            }
9928    
9929        @@XMLTest:
9930          @@@QName: xp.element.content.ncr.legal.char.1.0.1.test
9931          @@@DEnt:
9932            @@@@test:value:
9933              <?xml version="1.0"?>
9934              <e>&#0;</e>
9935          @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9936        @@XMLTest:
9937          @@@QName: xp.element.content.ncr.legal.char.1.1.1.test
9938          @@@DEnt:
9939            @@@@test:value:
9940              <?xml version="1.1"?>
9941              <e>&#0;</e>
9942          @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9943        @@XMLTest:
9944          @@@QName: xp.element.content.ncr.legal.char.1.0.2.test
9945          @@@DEnt:
9946            @@@@test:value:
9947              <?xml version="1.0"?>
9948              <e>&#1;</e>
9949          @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 7); }
9950        @@XMLTest:
9951          @@@QName: xp.element.content.ncr.legal.char.1.1.2.test
9952          @@@DEnt:
9953            @@@@test:value:
9954              <?xml version="1.1"?>
9955              <e>&#1;</e>
9956          @@@test:domTree:
9957            document {
9958              xml-version: '1.1';
9959              element {
9960                text-content: U+0001;
9961              }
9962            }
9963        @@XMLTest:
9964          @@@QName: xp.element.content.hcr.legal.char.1.0.1.test
9965          @@@DEnt:
9966            @@@@test:value:
9967              <?xml version="1.0"?>
9968              <e>&#x0;</e>
9969          @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9970        @@XMLTest:
9971          @@@QName: xp.element.content.hcr.legal.char.1.1.1.test
9972          @@@DEnt:
9973            @@@@test:value:
9974              <?xml version="1.1"?>
9975              <e>&#x0;</e>
9976          @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9977        @@XMLTest:
9978          @@@QName: xp.element.content.hcr.legal.char.1.0.2.test
9979          @@@DEnt:
9980            @@@@test:value:
9981              <?xml version="1.0"?>
9982              <e>&#x1;</e>
9983          @@@c:erred: <[[xp|wf-legal-character]]> { (2, 4)..(2, 8); }
9984        @@XMLTest:
9985          @@@QName: xp.element.content.hcr.legal.char.1.1.2.test
9986          @@@DEnt:
9987            @@@@test:value:
9988              <?xml version="1.1"?>
9989              <e>&#x1;</e>
9990          @@@test:domTree:
9991            document {
9992              xml-version: '1.1';
9993              element {
9994                text-content: U+0001;
9995              }
9996            }
9997    
9998        @@XMLTest:
9999          @@@QName: xp.element.content.ger.entity.declared.nodtd.1.test
10000          @@@DEnt:
10001            @@@@test:value:
10002              <p>&entity;</p>
10003          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 4)..(1, 11); }
10004        @@XMLTest:
10005          @@@QName: xp.element.content.ger.entity.declared.nodtd.2.test
10006          @@@DEnt:
10007            @@@@test:value:
10008              <?xml version="1.0" standalone="yes"?>
10009              <p>&entity;</p>
10010          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
10011        @@XMLTest:
10012          @@@QName: xp.element.content.ger.entity.declared.nodtd.3.test
10013          @@@DEnt:
10014            @@@@test:value:
10015              <?xml version="1.0" standalone="no"?>
10016              <p>&entity;</p>
10017          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
10018        @@XMLTest:
10019          @@@QName: xp.element.content.ger.entity.declared.nodtd.-1.test
10020          @@@DEnt:
10021            @@@@test:value:
10022              <p>&lt;&gt;&amp;&quot;&apos;</p>
10023          @@@test:domTree:
10024            document {
10025              element {
10026                text-content: '<>&"' U+0027;
10027              }
10028            }
10029        @@XMLTest:
10030          @@@QName: xp.element.content.ger.entity.declared.nopref.1.test
10031          @@@DEnt:
10032            @@@@test:value:
10033              <!DOCTYPE p []>
10034              <p>&entity;</p>
10035          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
10036        @@XMLTest:
10037          @@@QName: xp.element.content.ger.entity.declared.nopref.2.test
10038          @@@DEnt:
10039            @@@@test:value:
10040              <!DOCTYPE p [
10041                <!ENTITY other "aa">
10042                <!ENTITY % another "aa">
10043              ]>
10044              <p>&entity;</p>
10045          @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 4)..(5, 11); }
10046        @@XMLTest:
10047          @@@QName: xp.element.content.ger.entity.declared.nopref.3.test
10048          @@@DEnt:
10049            @@@@test:value:
10050              <?xml version="1.0" standalone="yes"?>
10051              <!DOCTYPE p []>
10052              <p>&entity;</p>
10053          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10054        @@XMLTest:
10055          @@@QName: xp.element.content.ger.entity.declared.nopref.4.test
10056          @@@DEnt:
10057            @@@@test:value:
10058              <?xml version="1.0" standalone="no"?>
10059              <!DOCTYPE p []>
10060              <p>&entity;</p>
10061          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10062        @@XMLTest:
10063          @@@QName: xp.element.content.ger.entity.declared.nopref.5.test
10064          @@@DEnt:
10065            @@@@test:value:
10066              <?xml version="1.0" standalone="yes"?>
10067              <!DOCTYPE p [
10068                <!ENTITY other "aa">
10069                <!ENTITY % another "aa">
10070              ]>
10071              <p>&entity;</p>
10072          @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10073        @@XMLTest:
10074          @@@QName: xp.element.content.ger.entity.declared.nopref.6.test
10075          @@@DEnt:
10076            @@@@test:value:
10077              <?xml version="1.0" standalone="no"?>
10078              <!DOCTYPE p [
10079                <!ENTITY other "aa">
10080                <!ENTITY % another "aa">
10081              ]>
10082              <p>&entity;</p>
10083          @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10084        @@XMLTest:
10085          @@@QName: xp.element.content.ger.entity.declared.nopref.-1.test
10086          @@@DEnt:
10087            @@@@test:value:
10088              <!DOCTYPE p [
10089                <!ENTITY entity "value">
10090              ]>
10091              <p>&entity;</p>
10092          @@@test:domTree:
10093            document {
10094              document-type {
10095                general-entity {
10096                  node-name: 'entity';
10097                  text-content: 'value';
10098                }
10099              }
10100              element {
10101                general-entity-reference {
10102                  node-name: 'entity';
10103                  is-expanded: true;
10104                  text-content: 'value';
10105                }
10106              }
10107            }
10108        @@XMLTest:
10109          @@@QName: xp.element.content.ger.entity.declared.nopref.-2.test
10110          @@@DEnt:
10111            @@@@test:value:
10112              <!DOCTYPE p [
10113                <!ENTITY entity "value">
10114                <!ENTITY another SYSTEM "another">
10115              ]>
10116              <p>&entity;</p>
10117          @@@test:domTree:
10118            document {
10119              document-type {
10120                general-entity {
10121                  node-name: 'entity';
10122                  text-content: 'value';
10123                }
10124                general-entity {
10125                  node-name: 'another';
10126                  public-id: null;
10127                  system-id: 'another';
10128                }
10129              }
10130              element {
10131                general-entity-reference {
10132                  node-name: 'entity';
10133                  is-expanded: true;
10134                  text-content: 'value';
10135                }
10136              }
10137            }
10138        @@XMLTest:
10139          @@@QName: xp.element.content.ger.entity.declared.standalone.1.test
10140          @@@DEnt:
10141            @@@@test:value:
10142              <?xml version="1.0" standalone="yes"?>
10143              <p>&entity;</p>
10144          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 4)..(2, 11); }
10145        @@XMLTest:
10146          @@@QName: xp.element.content.ger.entity.declared.standalone.2.test
10147          @@@DEnt:
10148            @@@@test:value:
10149              <?xml version="1.0" standalone="yes"?>
10150              <!DOCTYPE p []>
10151              <p>&entity;</p>
10152          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10153        @@XMLTest:
10154          @@@QName: xp.element.content.ger.entity.declared.standalone.3.test
10155          @@@DEnt:
10156            @@@@test:value:
10157              <?xml version="1.0" standalone="yes"?>
10158              <!DOCTYPE p [
10159                <!ENTITY % para "<!-- -->">
10160                %para;
10161              ]>
10162              <p>&entity;</p>
10163          @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10164        @@XMLTest:
10165          @@@QName: xp.element.content.ger.entity.declared.standalone.-1.test
10166          @@@DEnt:
10167            @@@@test:value:
10168              <?xml version="1.0" standalone="no"?>
10169              <!DOCTYPE p [
10170                <!ENTITY % para "<!-- -->">
10171                %para;
10172              ]>
10173              <p>&entity;</p>
10174          @@@test:domTree:
10175            document {
10176              document-type { }
10177              element {
10178                general-entity-reference {
10179                  is-expanded: false;
10180                }
10181              }
10182            }
10183        @@XMLTest:
10184          @@@QName: xp.element.content.ger.entity.declared.standalone.-2.test
10185          @@@DEnt:
10186            @@@@test:value:
10187              <!DOCTYPE p [
10188                <!ENTITY % para "<!-- -->">
10189                %para;
10190              ]>
10191              <p>&entity;</p>
10192          @@@test:domTree:
10193            document {
10194              document-type { }
10195              element {
10196                general-entity-reference {
10197                  is-expanded: false;
10198                }
10199              }
10200            }
10201        @@XMLTest:
10202          @@@QName: xp.element.content.ger.entity.declared.standalone.4.test
10203          @@@DEnt:
10204            @@@@test:value:
10205              <?xml version="1.0" standalone="yes"?>
10206              <!DOCTYPE p [
10207                <!ENTITY % para SYSTEM "para">
10208                %para;
10209              ]>
10210              <p>&entity;</p>
10211          @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 4)..(6, 11); }
10212        @@XMLTest:
10213          @@@QName: xp.element.content.ger.entity.declared.standalone.-3.test
10214          @@@DEnt:
10215            @@@@test:value:
10216              <?xml version="1.0" standalone="no"?>
10217              <!DOCTYPE p [
10218                <!ENTITY % para SYSTEM "para">
10219                %para;
10220              ]>
10221              <p>&entity;</p>
10222          @@@test:domTree:
10223            document {
10224              document-type { }
10225              element {
10226                general-entity-reference {
10227                  is-expanded: false;
10228                }
10229              }
10230            }
10231        @@XMLTest:
10232          @@@QName: xp.element.content.ger.entity.declared.standalone.-4.test
10233          @@@DEnt:
10234            @@@@test:value:
10235              <!DOCTYPE p [
10236                <!ENTITY % para SYSTEM "para">
10237                %para;
10238              ]>
10239              <p>&entity;</p>
10240          @@@test:domTree:
10241            document {
10242              document-type { }
10243              element {
10244                general-entity-reference {
10245                  is-expanded: false;
10246                }
10247              }
10248            }
10249        @@XMLTest:
10250          @@@QName: xp.element.content.ger.entity.declared.standalone.5.test
10251          @@@DEnt:
10252            @@@@test:value:
10253              <?xml version="1.0" standalone="yes"?>
10254              <!DOCTYPE p SYSTEM "dtd">
10255              <p>&entity;</p>
10256          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 4)..(3, 11); }
10257        @@XMLTest:
10258          @@@QName: xp.element.content.ger.entity.declared.standalone.-5.test
10259          @@@DEnt:
10260            @@@@test:value:
10261              <?xml version="1.0" standalone="no"?>
10262              <!DOCTYPE p SYSTEM "dtd">
10263              <p>&entity;</p>
10264          @@@test:domTree:
10265            document {
10266              document-type { }
10267              element {
10268                general-entity-reference {
10269                  is-expanded: false;
10270                }
10271              }
10272            }
10273        @@XMLTest:
10274          @@@QName: xp.element.content.ger.entity.declared.standalone.-6.test
10275          @@@DEnt:
10276            @@@@test:value:
10277              <!DOCTYPE p SYSTEM "dtd">
10278              <p>&entity;</p>
10279          @@@test:domTree:
10280            document {
10281              document-type { }
10282              element {
10283                general-entity-reference {
10284                  is-expanded: false;
10285                }
10286              }
10287            }
10288    
10289        @@XMLTest:
10290          @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.1.test
10291          @@@DEnt:
10292            @@@@test:value:
10293              <!DOCTYPE p [
10294              <!ENTITY c "&entity;">
10295              ]>
10296              <p>&c;</p>
10297          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10298        @@XMLTest:
10299          @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.2.test
10300          @@@DEnt:
10301            @@@@test:value:
10302              <!DOCTYPE p [
10303                <!ENTITY other "aa">
10304                <!ENTITY % another "aa">
10305              <!ENTITY c "&entity;">
10306              ]>
10307              <p>&c;</p>
10308          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10309        @@XMLTest:
10310          @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.3.test
10311          @@@DEnt:
10312            @@@@test:value:
10313              <?xml version="1.0" standalone="yes"?>
10314              <!DOCTYPE p [
10315              <!ENTITY c "&entity;">
10316              ]>
10317              <p>&c;</p>
10318          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10319        @@XMLTest:
10320          @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.4.test
10321          @@@DEnt:
10322            @@@@test:value:
10323              <?xml version="1.0" standalone="no"?>
10324              <!DOCTYPE p [
10325              <!ENTITY c "&entity;">
10326              ]>
10327              <p>&c;</p>
10328          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10329        @@XMLTest:
10330          @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.5.test
10331          @@@DEnt:
10332            @@@@test:value:
10333              <?xml version="1.0" standalone="yes"?>
10334              <!DOCTYPE p [
10335                <!ENTITY other "aa">
10336                <!ENTITY % another "aa">
10337              <!ENTITY c "&entity;">
10338              ]>
10339              <p>&c;</p>
10340          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10341        @@XMLTest:
10342          @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.6.test
10343          @@@DEnt:
10344            @@@@test:value:
10345              <?xml version="1.0" standalone="no"?>
10346              <!DOCTYPE p [
10347                <!ENTITY other "aa">
10348                <!ENTITY % another "aa">
10349              <!ENTITY c "&entity;">
10350              ]>
10351              <p>&c;</p>
10352          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10353        @@XMLTest:
10354          @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.-1.test
10355          @@@DEnt:
10356            @@@@test:value:
10357              <!DOCTYPE p [
10358                <!ENTITY entity "value">
10359              <!ENTITY c "&entity;">
10360              ]>
10361              <p>&c;</p>
10362          @@@test:domTree:
10363            document {
10364              document-type {
10365                general-entity {
10366                  node-name: 'entity';
10367                  text-content: 'value';
10368                }
10369                general-entity {
10370                  node-name: 'c';
10371                  general-entity-reference {
10372                    node-name: 'entity';
10373                    text-content: 'value';
10374                  }
10375                }
10376              }
10377              element {
10378                general-entity-reference {
10379                  node-name: 'c';
10380                  general-entity-reference {
10381                    node-name: 'entity';
10382                    text-content: 'value';
10383                  }
10384                }
10385              }
10386            }
10387        @@XMLTest:
10388          @@@QName: xp.reptxt.element.content.ger.entity.declared.nopref.-2.test
10389          @@@DEnt:
10390            @@@@test:value:
10391              <!DOCTYPE p [
10392                <!ENTITY entity "value">
10393                <!ENTITY another SYSTEM "another">
10394              <!ENTITY c "&entity;">
10395              ]>
10396              <p>&c;</p>
10397          @@@test:domTree:
10398            document {
10399              document-type {
10400                general-entity {
10401                  node-name: 'entity';
10402                  text-content: 'value';
10403                }
10404                general-entity {
10405                  node-name: 'c';
10406                  general-entity-reference {
10407                    node-name: 'entity';
10408                    is-expanded: true;
10409                    text-content: 'value';
10410                  }
10411                }
10412                general-entity {
10413                  node-name: 'another';
10414                  public-id: null;
10415                  system-id: 'another';
10416                  has-replacement-tree: false;
10417                }
10418              }
10419              element {
10420                general-entity-reference {
10421                  node-name: 'c';
10422                  is-expanded: true;
10423                  general-entity-reference {
10424                    node-name: 'entity';
10425                    is-expanded: true;
10426                    text-content: 'value';
10427                  }
10428                }
10429              }
10430            }
10431        @@XMLTest:
10432          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.2.test
10433          @@@DEnt:
10434            @@@@test:value:
10435              <?xml version="1.0" standalone="yes"?>
10436              <!DOCTYPE p [
10437              <!ENTITY c "&entity;">
10438              ]>
10439              <p>&c;</p>
10440          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10441        @@XMLTest:
10442          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.3.test
10443          @@@DEnt:
10444            @@@@test:value:
10445              <?xml version="1.0" standalone="yes"?>
10446              <!DOCTYPE p [
10447                <!ENTITY % para "<!-- -->">
10448                %para;
10449              <!ENTITY c "&entity;">
10450              ]>
10451              <p>&c;</p>
10452          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10453        @@XMLTest:
10454          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-1.test
10455          @@@DEnt:
10456            @@@@test:value:
10457              <?xml version="1.0" standalone="no"?>
10458              <!DOCTYPE p [
10459              <!ENTITY c "&entity;">
10460                <!ENTITY % para "<!-- -->">
10461                %para;
10462              ]>
10463              <p>&c;</p>
10464          @@@test:domTree:
10465            document {
10466              document-type {
10467                general-entity {
10468                  node-name: 'c';
10469                  general-entity-reference {
10470                    node-name: 'entity';
10471                    is-expanded: false;
10472                  }
10473                }
10474              }
10475              element {
10476                general-entity-reference {
10477                  node-name: 'c';
10478                  general-entity-reference {
10479                    node-name: 'entity';
10480                    is-expanded: false;
10481                  }
10482                }
10483              }
10484            }
10485        @@XMLTest:
10486          @@@QName:
10487            xp.reptxt.element.content.ger.entity.declared.standalone.-1.2.test
10488          @@@DEnt:
10489            @@@@test:value:
10490              <?xml version="1.0" standalone="no"?>
10491              <!DOCTYPE p [
10492                <!ENTITY % para "<!-- -->">
10493                %para;
10494              <!ENTITY c "&entity;">
10495              ]>
10496              <p>&c;</p>
10497          @@@test:domTree:
10498            document {
10499              document-type { }
10500              element {
10501                general-entity-reference {
10502                  node-name: 'c';
10503                  is-expanded: false;
10504                }
10505              }
10506            }
10507        @@XMLTest:
10508          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-2.test
10509          @@@DEnt:
10510            @@@@test:value:
10511              <!DOCTYPE p [
10512              <!ENTITY c "&entity;">
10513                <!ENTITY % para "<!-- -->">
10514                %para;
10515              ]>
10516              <p>&c;</p>
10517          @@@test:domTree:
10518            document {
10519              document-type { }
10520              element {
10521                general-entity-reference {
10522                  node-name: 'c';
10523                  is-expanded: true;
10524                  general-entity-reference {
10525                    node-name: 'entity';
10526                    is-expanded: false;
10527                  }
10528                }
10529              }
10530            }
10531        @@XMLTest:
10532          @@@QName:
10533            xp.reptxt.element.content.ger.entity.declared.standalone.-2.2.test
10534          @@@DEnt:
10535            @@@@test:value:
10536              <!DOCTYPE p [
10537                <!ENTITY % para "<!-- -->">
10538                %para;
10539              <!ENTITY c "&entity;">
10540              ]>
10541              <p>&c;</p>
10542          @@@test:domTree:
10543            document {
10544              document-type { }
10545              element {
10546                general-entity-reference {
10547                  node-name: 'c';
10548                  is-expanded: false;
10549                }
10550              }
10551            }
10552        @@XMLTest:
10553          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.4.test
10554          @@@DEnt:
10555            @@@@test:value:
10556              <?xml version="1.0" standalone="yes"?>
10557              <!DOCTYPE p [
10558                <!ENTITY % para SYSTEM "para">
10559                %para;
10560              <!ENTITY c "&entity;">
10561              ]>
10562              <p>&c;</p>
10563          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10564        @@XMLTest:
10565          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-3.test
10566          @@@DEnt:
10567            @@@@test:value:
10568              <?xml version="1.0" standalone="no"?>
10569              <!DOCTYPE p [
10570              <!ENTITY c "&entity;">
10571                <!ENTITY % para SYSTEM "para">
10572                %para;
10573              ]>
10574              <p>&c;</p>
10575          @@@test:domTree:
10576            document {
10577              document-type { }
10578              element {
10579                general-entity-reference {
10580                  node-name: 'c';
10581                  is-expanded: true;
10582                  general-entity-reference {
10583                    node-name: 'entity';
10584                    is-expanded: false;
10585                  }
10586                }
10587              }
10588            }
10589        @@XMLTest:
10590          @@@QName:
10591            xp.reptxt.element.content.ger.entity.declared.standalone.-3.2.test
10592          @@@DEnt:
10593            @@@@test:value:
10594              <?xml version="1.0" standalone="no"?>
10595              <!DOCTYPE p [
10596                <!ENTITY % para SYSTEM "para">
10597                %para;
10598              <!ENTITY c "&entity;">
10599              ]>
10600              <p>&c;</p>
10601          @@@test:domTree:
10602            document {
10603              document-type { }
10604              element {
10605                general-entity-reference {
10606                  node-name: 'c';
10607                  is-expanded: false;
10608                }
10609              }
10610            }
10611        @@XMLTest:
10612          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-4.test
10613          @@@DEnt:
10614            @@@@test:value:
10615              <!DOCTYPE p [
10616              <!ENTITY c "&entity;">
10617                <!ENTITY % para SYSTEM "para">
10618                %para;
10619              ]>
10620              <p>&c;</p>
10621          @@@test:domTree:
10622            document {
10623              document-type { }
10624              element {
10625                general-entity-reference {
10626                  node-name: 'c';
10627                  is-expanded: true;
10628                  general-entity-reference {
10629                    node-name: 'entity';
10630                    is-expanded: false;
10631                  }
10632                }
10633              }
10634            }
10635        @@XMLTest:
10636          @@@QName:
10637            xp.reptxt.element.content.ger.entity.declared.standalone.-4.2.test
10638          @@@DEnt:
10639            @@@@test:value:
10640              <!DOCTYPE p [
10641                <!ENTITY % para SYSTEM "para">
10642                %para;
10643              <!ENTITY c "&entity;">
10644              ]>
10645              <p>&c;</p>
10646          @@@test:domTree:
10647            document {
10648              document-type { }
10649              element {
10650                general-entity-reference {
10651                  node-name: 'c';
10652                  is-expanded: false;
10653                }
10654              }
10655            }
10656        @@XMLTest:
10657          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.5.test
10658          @@@DEnt:
10659            @@@@test:value:
10660              <?xml version="1.0" standalone="yes"?>
10661              <!DOCTYPE p SYSTEM "dtd" [
10662              <!ENTITY c "&entity;">
10663              ]>
10664              <p>&c;</p>
10665          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
10666        @@XMLTest:
10667          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-5.test
10668          @@@DEnt:
10669            @@@@test:value:
10670              <?xml version="1.0" standalone="no"?>
10671              <!DOCTYPE p SYSTEM "dtd" [
10672              <!ENTITY c "&entity;">
10673              ]>
10674              <p>&c;</p>
10675          @@@test:domTree:
10676            document {
10677              document-type { }
10678              element {
10679                general-entity-reference {
10680                  node-name: 'c';
10681                  is-expanded: true;
10682                  general-entity-reference {
10683                    node-name: 'entity';
10684                    is-expanded: false;
10685                  }
10686                }
10687              }
10688            }
10689        @@XMLTest:
10690          @@@QName: xp.reptxt.element.content.ger.entity.declared.standalone.-6.test
10691          @@@DEnt:
10692            @@@@test:value:
10693              <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">]>
10694              <p>&c;</p>
10695          @@@test:domTree:
10696            document {
10697              document-type { }
10698              element {
10699                general-entity-reference {
10700                  node-name: 'c';
10701                  is-expanded: true;
10702                  general-entity-reference {
10703                    node-name: 'entity';
10704                    is-expanded: false;
10705                  }
10706                }
10707              }
10708            }
10709    
10710        @@XMLTest:
10711          @@@QName: xp.attval.ger.entity.declared.nodtd.1.test
10712          @@@DEnt:
10713            @@@@test:value:
10714              <p a="&entity;"/>
10715          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 7)..(1, 14); }
10716        @@XMLTest:
10717          @@@QName: xp.attval.ger.entity.declared.nodtd.2.test
10718          @@@DEnt:
10719            @@@@test:value:
10720              <?xml version="1.0" standalone="yes"?>
10721              <p a="&entity;"/>
10722          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10723        @@XMLTest:
10724          @@@QName: xp.attval.ger.entity.declared.nodtd.3.test
10725          @@@DEnt:
10726            @@@@test:value:
10727              <?xml version="1.0" standalone="no"?>
10728              <p a="&entity;"/>
10729          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10730        @@XMLTest:
10731          @@@QName: xp.attval.ger.entity.declared.nodtd.-1.test
10732          @@@DEnt:
10733            @@@@test:value:
10734              <p a="&lt;&gt;&amp;&quot;&apos;"/>
10735          @@@test:domTree:
10736            document {
10737              element {
10738                attribute {
10739                  node-name: 'a';
10740                  text-content: '<>&"' U+0027;
10741                }
10742              }
10743            }
10744        @@XMLTest:
10745          @@@QName: xp.attval.ger.entity.declared.nopref.1.test
10746          @@@DEnt:
10747            @@@@test:value:
10748              <!DOCTYPE p []>
10749              <p a="&entity;"/>
10750          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10751        @@XMLTest:
10752          @@@QName: xp.attval.ger.entity.declared.nopref.2.test
10753          @@@DEnt:
10754            @@@@test:value:
10755              <!DOCTYPE p [
10756                <!ENTITY other "aa">
10757                <!ENTITY % another "aa">
10758              ]>
10759              <p a="&entity;"/>
10760          @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 7)..(5, 14); }
10761        @@XMLTest:
10762          @@@QName: xp.attval.ger.entity.declared.nopref.3.test
10763          @@@DEnt:
10764            @@@@test:value:
10765              <?xml version="1.0" standalone="yes"?>
10766              <!DOCTYPE p []>
10767              <p a="&entity;"/>
10768          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10769        @@XMLTest:
10770          @@@QName: xp.attval.ger.entity.declared.nopref.4.test
10771          @@@DEnt:
10772            @@@@test:value:
10773              <?xml version="1.0" standalone="no"?>
10774              <!DOCTYPE p []>
10775              <p a="&entity;"/>
10776          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10777        @@XMLTest:
10778          @@@QName: xp.attval.ger.entity.declared.nopref.5.test
10779          @@@DEnt:
10780            @@@@test:value:
10781              <?xml version="1.0" standalone="yes"?>
10782              <!DOCTYPE p [
10783                <!ENTITY other "aa">
10784                <!ENTITY % another "aa">
10785              ]>
10786              <p a="&entity;"/>
10787          @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10788        @@XMLTest:
10789          @@@QName: xp.attval.ger.entity.declared.nopref.6.test
10790          @@@DEnt:
10791            @@@@test:value:
10792              <?xml version="1.0" standalone="no"?>
10793              <!DOCTYPE p [
10794                <!ENTITY other "aa">
10795                <!ENTITY % another "aa">
10796              ]>
10797              <p a="&entity;"/>
10798          @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10799        @@XMLTest:
10800          @@@QName: xp.attval.ger.entity.declared.nopref.-1.test
10801          @@@DEnt:
10802            @@@@test:value:
10803              <!DOCTYPE p [
10804                <!ENTITY entity "value">
10805              ]>
10806              <p a="&entity;"/>
10807          @@@test:domTree:
10808            document {
10809              document-type {
10810                general-entity {
10811                  node-name: 'entity';
10812                  text-content: 'value';
10813                }
10814              }
10815              element {
10816                attribute {
10817                  node-name: 'a';
10818                  general-entity-reference {
10819                    node-name: 'entity';
10820                    is-expanded: true;
10821                    text-content: 'value';
10822                  }
10823                }
10824              }
10825            }
10826        @@XMLTest:
10827          @@@QName: xp.attval.ger.entity.declared.nopref.-2.test
10828          @@@DEnt:
10829            @@@@test:value:
10830              <!DOCTYPE p [
10831                <!ENTITY entity "value">
10832                <!ENTITY another SYSTEM "another">
10833              ]>
10834              <p a="&entity;"/>
10835          @@@test:domTree:
10836            document {
10837              document-type {
10838                general-entity {
10839                  node-name: 'entity';
10840                  text-content: 'value';
10841                  has-replacement-tree: true;
10842                }
10843                general-entity {
10844                  node-name: 'another';
10845                  public-id: null;
10846                  system-id: 'another';
10847                  has-replacement-tree: false;
10848                }
10849              }
10850              element {
10851                attribute {
10852                  node-name: 'a';
10853                  general-entity-reference {
10854                    node-name: 'entity';
10855                    is-expanded: true;
10856                    text-content: 'value';
10857                  }
10858                }
10859              }
10860            }
10861        @@XMLTest:
10862          @@@QName: xp.attval.ger.entity.declared.standalone.1.test
10863          @@@DEnt:
10864            @@@@test:value:
10865              <?xml version="1.0" standalone="yes"?>
10866              <p a="&entity;"/>
10867          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 7)..(2, 14); }
10868        @@XMLTest:
10869          @@@QName: xp.attval.ger.entity.declared.standalone.2.test
10870          @@@DEnt:
10871            @@@@test:value:
10872              <?xml version="1.0" standalone="yes"?>
10873              <!DOCTYPE p []>
10874              <p a="&entity;"/>
10875          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10876        @@XMLTest:
10877          @@@QName: xp.attval.ger.entity.declared.standalone.3.test
10878          @@@DEnt:
10879            @@@@test:value:
10880              <?xml version="1.0" standalone="yes"?>
10881              <!DOCTYPE p [
10882                <!ENTITY % para "<!-- -->">
10883                %para;
10884              ]>
10885              <p a="&entity;"/>
10886          @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10887        @@XMLTest:
10888          @@@QName: xp.attval.ger.entity.declared.standalone.-1.test
10889          @@@DEnt:
10890            @@@@test:value:
10891              <?xml version="1.0" standalone="no"?>
10892              <!DOCTYPE p [
10893                <!ENTITY % para "<!-- -->">
10894                %para;
10895              ]>
10896              <p a="&entity;"/>
10897          @@@test:domTree:
10898            document {
10899              document-type { }
10900              element {
10901                attribute {
10902                  node-name: 'a';
10903                  general-entity-reference {
10904                    is-expanded: false;
10905                  }
10906                }
10907              }
10908            }
10909        @@XMLTest:
10910          @@@QName: xp.attval.ger.entity.declared.standalone.-2.test
10911          @@@DEnt:
10912            @@@@test:value:
10913              <!DOCTYPE p [
10914                <!ENTITY % para "<!-- -->">
10915                %para;
10916              ]>
10917              <p a="&entity;"/>
10918          @@@test:domTree:
10919            document {
10920              document-type { }
10921              element {
10922                attribute {
10923                  node-name: 'a';
10924                  general-entity-reference {
10925                    is-expanded: false;
10926                  }
10927                }
10928              }
10929            }
10930        @@XMLTest:
10931          @@@QName: xp.attval.ger.entity.declared.standalone.4.test
10932          @@@DEnt:
10933            @@@@test:value:
10934              <?xml version="1.0" standalone="yes"?>
10935              <!DOCTYPE p [
10936                <!ENTITY % para SYSTEM "para">
10937                %para;
10938              ]>
10939              <p a="&entity;"/>
10940          @@@c:erred: <[[xp|wf-entity-declared]]> { (6, 7)..(6, 14); }
10941        @@XMLTest:
10942          @@@QName: xp.attval.ger.entity.declared.standalone.-3.test
10943          @@@DEnt:
10944            @@@@test:value:
10945              <?xml version="1.0" standalone="no"?>
10946              <!DOCTYPE p [
10947                <!ENTITY % para SYSTEM "para">
10948                %para;
10949              ]>
10950              <p a="&entity;"/>
10951          @@@test:domTree:
10952            document {
10953              document-type { }
10954              element {
10955                attribute {
10956                  node-name: 'a';
10957                  general-entity-reference {
10958                    is-expanded: false;
10959                  }
10960                }
10961              }
10962            }
10963        @@XMLTest:
10964          @@@QName: xp.attval.ger.entity.declared.standalone.-4.test
10965          @@@DEnt:
10966            @@@@test:value:
10967              <!DOCTYPE p [
10968                <!ENTITY % para SYSTEM "para">
10969                %para;
10970              ]>
10971              <p a="&entity;"/>
10972          @@@test:domTree:
10973            document {
10974              document-type { }
10975              element {
10976                attribute {
10977                  node-name: 'a';
10978                  general-entity-reference {
10979                    is-expanded: false;
10980                  }
10981                }
10982              }
10983            }
10984        @@XMLTest:
10985          @@@QName: xp.attval.ger.entity.declared.standalone.5.test
10986          @@@DEnt:
10987            @@@@test:value:
10988              <?xml version="1.0" standalone="yes"?>
10989              <!DOCTYPE p SYSTEM "dtd">
10990              <p a="&entity;"/>
10991          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 7)..(3, 14); }
10992        @@XMLTest:
10993          @@@QName: xp.attval.ger.entity.declared.standalone.-5.test
10994          @@@DEnt:
10995            @@@@test:value:
10996              <?xml version="1.0" standalone="no"?>
10997              <!DOCTYPE p SYSTEM "dtd">
10998              <p a="&entity;"/>
10999          @@@test:domTree:
11000            document {
11001              document-type { }
11002              element {
11003                attribute {
11004                  node-name: 'a';
11005                  general-entity-reference {
11006                    is-expanded: false;
11007                  }
11008                }
11009              }
11010            }
11011        @@XMLTest:
11012          @@@QName: xp.attval.ger.entity.declared.standalone.-6.test
11013          @@@DEnt:
11014            @@@@test:value:
11015              <!DOCTYPE p SYSTEM "dtd">
11016              <p a="&entity;"/>
11017          @@@test:domTree:
11018            document {
11019              document-type { }
11020              element {
11021                attribute {
11022                  node-name: 'a';
11023                  general-entity-reference {
11024                    is-expanded: false;
11025                  }
11026                }
11027              }
11028            }
11029    
11030        @@XMLTest:
11031          @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.1.test
11032          @@@DEnt:
11033            @@@@test:value:
11034              <!DOCTYPE p [
11035              <!ENTITY c "&entity;">
11036              ]>
11037              <p a="&c;"/>
11038          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11039        @@XMLTest:
11040          @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.2.test
11041          @@@DEnt:
11042            @@@@test:value:
11043              <!DOCTYPE p [
11044                <!ENTITY other "aa">
11045                <!ENTITY % another "aa">
11046              <!ENTITY c "&entity;">
11047              ]>
11048              <p a="&c;"/>
11049          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11050        @@XMLTest:
11051          @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.3.test
11052          @@@DEnt:
11053            @@@@test:value:
11054              <?xml version="1.0" standalone="yes"?>
11055              <!DOCTYPE p [
11056              <!ENTITY c "&entity;">
11057              ]>
11058              <p a="&c;"/>
11059          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11060        @@XMLTest:
11061          @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.4.test
11062          @@@DEnt:
11063            @@@@test:value:
11064              <?xml version="1.0" standalone="no"?>
11065              <!DOCTYPE p [
11066              <!ENTITY c "&entity;">
11067              ]>
11068              <p a="&c;"/>
11069          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11070        @@XMLTest:
11071          @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.5.test
11072          @@@DEnt:
11073            @@@@test:value:
11074              <?xml version="1.0" standalone="yes"?>
11075              <!DOCTYPE p [
11076                <!ENTITY other "aa">
11077                <!ENTITY % another "aa">
11078              <!ENTITY c "&entity;">
11079              ]>
11080              <p a="&c;"/>
11081          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11082        @@XMLTest:
11083          @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.6.test
11084          @@@DEnt:
11085            @@@@test:value:
11086              <?xml version="1.0" standalone="no"?>
11087              <!DOCTYPE p [
11088                <!ENTITY other "aa">
11089                <!ENTITY % another "aa">
11090              <!ENTITY c "&entity;">
11091              ]>
11092              <p a="&c;"/>
11093          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11094        @@XMLTest:
11095          @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.-1.test
11096          @@@DEnt:
11097            @@@@test:value:
11098              <!DOCTYPE p [
11099                <!ENTITY entity "value">
11100              <!ENTITY c "&entity;">
11101              ]>
11102              <p a="&c;"/>
11103          @@@test:domTree:
11104            document {
11105              document-type {
11106                general-entity {
11107                  node-name: 'entity';
11108                  text-content: 'value';
11109                }
11110                general-entity {
11111                  node-name: 'c';
11112                  general-entity-reference {
11113                    node-name: 'entity';
11114                    text-content: 'value';
11115                  }
11116                }
11117              }
11118              element {
11119                attribute {
11120                  node-name: 'a';
11121                  general-entity-reference {
11122                    node-name: 'c';
11123                    general-entity-reference {
11124                      node-name: 'entity';
11125                      text-content: 'value';
11126                    }
11127                  }
11128                }
11129              }
11130            }
11131        @@XMLTest:
11132          @@@QName: xp.reptxt.attval.ger.entity.declared.nopref.-2.test
11133          @@@DEnt:
11134            @@@@test:value:
11135              <!DOCTYPE p [
11136                <!ENTITY entity "value">
11137                <!ENTITY another SYSTEM "another">
11138              <!ENTITY c "&entity;">
11139              ]>
11140              <p a="&c;"/>
11141          @@@test:domTree:
11142            document {
11143              document-type {
11144                general-entity {
11145                  node-name: 'entity';
11146                  text-content: 'value';
11147                }
11148                general-entity {
11149                  node-name: 'c';
11150                  general-entity-reference {
11151                    node-name: 'entity';
11152                    text-content: 'value';
11153                  }
11154                }
11155                general-entity {
11156                  node-name: 'another';
11157                  public-id: null;
11158                  system-id: 'another';
11159                  has-replacement-tree: false;
11160                }
11161              }
11162              element {
11163                attribute {
11164                  node-name: 'a';
11165                  general-entity-reference {
11166                    node-name: 'c';
11167                    general-entity-reference {
11168                      node-name: 'entity';
11169                      text-content: 'value';
11170                    }
11171                  }
11172                }
11173              }
11174            }
11175        @@XMLTest:
11176          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.2.test
11177          @@@DEnt:
11178            @@@@test:value:
11179              <?xml version="1.0" standalone="yes"?>
11180              <!DOCTYPE p [
11181              <!ENTITY c "&entity;">
11182              ]>
11183              <p a="&c;"/>
11184          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11185        @@XMLTest:
11186          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.3.test
11187          @@@DEnt:
11188            @@@@test:value:
11189              <?xml version="1.0" standalone="yes"?>
11190              <!DOCTYPE p [
11191                <!ENTITY % para "<!-- -->">
11192                %para;
11193              <!ENTITY c "&entity;">
11194              ]>
11195              <p a="&c;"/>
11196          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11197        @@XMLTest:
11198          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-1.test
11199          @@@DEnt:
11200            @@@@test:value:
11201              <?xml version="1.0" standalone="no"?>
11202              <!DOCTYPE p [
11203              <!ENTITY c "&entity;">
11204                <!ENTITY % para "<!-- -->">
11205                %para;
11206              ]>
11207              <p a="&c;"/>
11208          @@@test:domTree:
11209            document {
11210              document-type {
11211                general-entity {
11212                  node-name: 'c';
11213                  general-entity-reference {
11214                    node-name: 'entity';
11215                    is-expanded: false;
11216                  }
11217                }
11218              }
11219              element {
11220                attribute {
11221                  node-name: 'a';
11222                  general-entity-reference {
11223                    node-name: 'c';
11224                    general-entity-reference {
11225                      node-name: 'entity';
11226                      is-expanded: false;
11227                    }
11228                  }
11229                }
11230              }
11231            }
11232        @@XMLTest:
11233          @@@QName:
11234            xp.reptxt.attval.ger.entity.declared.standalone.-1.2.test
11235          @@@DEnt:
11236            @@@@test:value:
11237              <?xml version="1.0" standalone="no"?>
11238              <!DOCTYPE p [
11239                <!ENTITY % para "<!-- -->">
11240                %para;
11241              <!ENTITY c "&entity;">
11242              ]>
11243              <p a="&c;"/>
11244          @@@test:domTree:
11245            document {
11246              document-type { }
11247              element {
11248                attribute {
11249                  node-name: 'a';
11250                  general-entity-reference {
11251                    node-name: 'c';
11252                    is-expanded: false;
11253                  }
11254                }
11255              }
11256            }
11257        @@XMLTest:
11258          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-2.test
11259          @@@DEnt:
11260            @@@@test:value:
11261              <!DOCTYPE p [
11262              <!ENTITY c "&entity;">
11263                <!ENTITY % para "<!-- -->">
11264                %para;
11265              ]>
11266              <p a="&c;"/>
11267          @@@test:domTree:
11268            document {
11269              document-type { }
11270              element {
11271                attribute {
11272                  node-name: 'a';
11273                  general-entity-reference {
11274                    node-name: 'c';
11275                    is-expanded: true;
11276                    general-entity-reference {
11277                      node-name: 'entity';
11278                      is-expanded: false;
11279                    }
11280                  }
11281                }
11282              }
11283            }
11284        @@XMLTest:
11285          @@@QName:
11286            xp.reptxt.attval.ger.entity.declared.standalone.-2.2.test
11287          @@@DEnt:
11288            @@@@test:value:
11289              <!DOCTYPE p [
11290                <!ENTITY % para "<!-- -->">
11291                %para;
11292              <!ENTITY c "&entity;">
11293              ]>
11294              <p a="&c;"/>
11295          @@@test:domTree:
11296            document {
11297              document-type { }
11298              element {
11299                attribute {
11300                  node-name: 'a';
11301                  general-entity-reference {
11302                    node-name: 'c';
11303                    is-expanded: false;
11304                  }
11305                }
11306              }
11307            }
11308        @@XMLTest:
11309          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.4.test
11310          @@@DEnt:
11311            @@@@test:value:
11312              <?xml version="1.0" standalone="yes"?>
11313              <!DOCTYPE p [
11314                <!ENTITY % para SYSTEM "para">
11315                %para;
11316              <!ENTITY c "&entity;">
11317              ]>
11318              <p a="&c;"/>
11319          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11320        @@XMLTest:
11321          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-3.test
11322          @@@DEnt:
11323            @@@@test:value:
11324              <?xml version="1.0" standalone="no"?>
11325              <!DOCTYPE p [
11326              <!ENTITY c "&entity;">
11327                <!ENTITY % para SYSTEM "para">
11328                %para;
11329              ]>
11330              <p a="&c;"/>
11331          @@@test:domTree:
11332            document {
11333              document-type { }
11334              element {
11335                attribute {
11336                  node-name: 'a';
11337                  general-entity-reference {
11338                    node-name: 'c';
11339                    is-expanded: true;
11340                    general-entity-reference {
11341                      node-name: 'entity';
11342                      is-expanded: false;
11343                    }
11344                  }
11345                }
11346              }
11347            }
11348        @@XMLTest:
11349          @@@QName:
11350            xp.reptxt.attval.ger.entity.declared.standalone.-3.2.test
11351          @@@DEnt:
11352            @@@@test:value:
11353              <?xml version="1.0" standalone="no"?>
11354              <!DOCTYPE p [
11355                <!ENTITY % para SYSTEM "para">
11356                %para;
11357              <!ENTITY c "&entity;">
11358              ]>
11359              <p a="&c;"/>
11360          @@@test:domTree:
11361            document {
11362              document-type { }
11363              element {
11364                attribute {
11365                  node-name: 'a';
11366                  general-entity-reference {
11367                    node-name: 'c';
11368                    is-expanded: false;
11369                  }
11370                }
11371              }
11372            }
11373        @@XMLTest:
11374          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-4.test
11375          @@@DEnt:
11376            @@@@test:value:
11377              <!DOCTYPE p [
11378              <!ENTITY c "&entity;">
11379                <!ENTITY % para SYSTEM "para">
11380                %para;
11381              ]>
11382              <p a="&c;"/>
11383          @@@test:domTree:
11384            document {
11385              document-type { }
11386              element {
11387                attribute {
11388                  node-name: 'a';
11389                  general-entity-reference {
11390                    node-name: 'c';
11391                    is-expanded: true;
11392                    general-entity-reference {
11393                      node-name: 'entity';
11394                      is-expanded: false;
11395                    }
11396                  }
11397                }
11398              }
11399            }
11400        @@XMLTest:
11401          @@@QName:
11402            xp.reptxt.attval.ger.entity.declared.standalone.-4.2.test
11403          @@@DEnt:
11404            @@@@test:value:
11405              <!DOCTYPE p [
11406                <!ENTITY % para SYSTEM "para">
11407                %para;
11408              <!ENTITY c "&entity;">
11409              ]>
11410              <p a="&c;"/>
11411          @@@test:domTree:
11412            document {
11413              document-type { }
11414              element {
11415                attribute {
11416                  node-name: 'a';
11417                  general-entity-reference {
11418                    node-name: 'c';
11419                    is-expanded: false;
11420                  }
11421                }
11422              }
11423            }
11424        @@XMLTest:
11425          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.5.test
11426          @@@DEnt:
11427            @@@@test:value:
11428              <?xml version="1.0" standalone="yes"?>
11429              <!DOCTYPE p SYSTEM "dtd" [
11430              <!ENTITY c "&entity;">
11431              ]>
11432              <p a="&c;"/>
11433          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11434        @@XMLTest:
11435          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-5.test
11436          @@@DEnt:
11437            @@@@test:value:
11438              <?xml version="1.0" standalone="no"?>
11439              <!DOCTYPE p SYSTEM "dtd" [
11440              <!ENTITY c "&entity;">
11441              ]>
11442              <p a="&c;"/>
11443          @@@test:domTree:
11444            document {
11445              document-type { }
11446              element {
11447                attribute {
11448                  node-name: 'a';
11449                  general-entity-reference {
11450                    node-name: 'c';
11451                    is-expanded: true;
11452                    general-entity-reference {
11453                      node-name: 'entity';
11454                      is-expanded: false;
11455                    }
11456                  }
11457                }
11458              }
11459            }
11460        @@XMLTest:
11461          @@@QName: xp.reptxt.attval.ger.entity.declared.standalone.-6.test
11462          @@@DEnt:
11463            @@@@test:value:
11464              <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">]>
11465              <p a="&c;"/>
11466          @@@test:domTree:
11467            document {
11468              document-type { }
11469              element {
11470                attribute {
11471                  node-name: 'a';
11472                  general-entity-reference {
11473                    node-name: 'c';
11474                    is-expanded: true;
11475                    general-entity-reference {
11476                      node-name: 'entity';
11477                      is-expanded: false;
11478                    }
11479                  }
11480                }
11481              }
11482            }
11483    
11484        @@XMLTest:
11485          @@@QName: xp.attlist.dup.entity.declared.1.test
11486          @@@DEnt:
11487            @@@@test:value:
11488              <!DOCTYPE p [
11489              <!ATTLIST p a CDATA "no-entity">
11490              <!ATTLIST p a CDATA "&entity;">
11491              ]>
11492              <p/>
11493          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 21)..(3, 29); }
11494        @@XMLTest:
11495          @@@QName: xp.attlist.dup.entity.declared.2.test
11496          @@@DEnt:
11497            @@@@test:value:
11498              <!DOCTYPE p [
11499              <!ATTLIST p a CDATA "no-entity"
11500                          a CDATA "&entity;">
11501              ]>
11502              <p/>
11503          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 21)..(3, 29); }
11504        @@XMLTest:
11505          @@@QName: xp.attlist.unused.entity.declared.1.test
11506          @@@DEnt:
11507            @@@@test:value:
11508              <!DOCTYPE p [
11509              <!ATTLIST q a CDATA "&entity;">
11510              ]>
11511              <p/>
11512          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 21)..(2, 29); }
11513        @@XMLTest:
11514          @@@QName: xp.attlist.unused.entity.declared.2.test
11515          @@@DEnt:
11516            @@@@test:value:
11517              <!DOCTYPE p [
11518              <!ATTLIST p a CDATA "&entity;">
11519              ]>
11520              <p a="bb"/>
11521          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 21)..(2, 29); }
11522    
11523        @@XMLTest:
11524          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.1.test
11525          @@@DEnt:
11526            @@@@test:value:
11527              <!DOCTYPE p [
11528              <!ENTITY c "&entity;">
11529              <!ATTLIST p a CDATA "&c;">
11530              ]>
11531              <p/>
11532          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11533        @@XMLTest:
11534          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.2.test
11535          @@@DEnt:
11536            @@@@test:value:
11537              <!DOCTYPE p [
11538                <!ENTITY other "aa">
11539                <!ENTITY % another "aa">
11540              <!ENTITY c "&entity;">
11541              <!ATTLIST p a CDATA "&c;">
11542              ]>
11543              <p/>
11544          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11545        @@XMLTest:
11546          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.3.test
11547          @@@DEnt:
11548            @@@@test:value:
11549              <?xml version="1.0" standalone="yes"?>
11550              <!DOCTYPE p [
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.4.test
11558          @@@DEnt:
11559            @@@@test:value:
11560              <?xml version="1.0" standalone="no"?>
11561              <!DOCTYPE p [
11562              <!ENTITY c "&entity;">
11563              <!ATTLIST p a CDATA "&c;">
11564              ]>
11565              <p/>
11566          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11567        @@XMLTest:
11568          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.5.test
11569          @@@DEnt:
11570            @@@@test:value:
11571              <?xml version="1.0" standalone="yes"?>
11572              <!DOCTYPE p [
11573                <!ENTITY other "aa">
11574                <!ENTITY % another "aa">
11575              <!ENTITY c "&entity;">
11576              <!ATTLIST p a CDATA "&c;">
11577              ]>
11578              <p/>
11579          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11580        @@XMLTest:
11581          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.6.test
11582          @@@DEnt:
11583            @@@@test:value:
11584              <?xml version="1.0" standalone="no"?>
11585              <!DOCTYPE p [
11586                <!ENTITY other "aa">
11587                <!ENTITY % another "aa">
11588              <!ENTITY c "&entity;">
11589              <!ATTLIST p a CDATA "&c;">
11590              ]>
11591              <p/>
11592          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11593        @@XMLTest:
11594          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.-1.test
11595          @@@DEnt:
11596            @@@@test:value:
11597              <!DOCTYPE p [
11598                <!ENTITY entity "value">
11599              <!ENTITY c "&entity;">
11600              <!ATTLIST p a CDATA "&c;">
11601              ]>
11602              <p/>
11603          @@@test:domTree:
11604            document {
11605              document-type {
11606                general-entity {
11607                  node-name: 'entity';
11608                  text-content: 'value';
11609                }
11610                general-entity {
11611                  node-name: 'c';
11612                  general-entity-reference {
11613                    node-name: 'entity';
11614                    is-expanded: true;
11615                    text-content: 'value';
11616                  }
11617                }
11618                element-type-definition {
11619                  node-name: 'p';
11620                  attribute-definition {
11621                    node-name: 'a';
11622                    general-entity-reference {
11623                      node-name: 'c';
11624                      is-expanded: true;
11625                      general-entity-reference {
11626                        node-name: 'entity';
11627                        is-expanded: true;
11628                        text-content: 'value';
11629                      }
11630                    }
11631                  }
11632                }
11633              }
11634              element {
11635                attribute {
11636                  node-name: 'a';
11637                  specified: false;
11638                  general-entity-reference {
11639                    node-name: 'c';
11640                    general-entity-reference {
11641                      node-name: 'entity';
11642                      text-content: 'value';
11643                    }
11644                  }
11645                }
11646              }
11647            }
11648        @@XMLTest:
11649          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.nopref.-2.test
11650          @@@DEnt:
11651            @@@@test:value:
11652              <!DOCTYPE p [
11653                <!ENTITY entity "value">
11654                <!ENTITY another SYSTEM "another">
11655              <!ENTITY c "&entity;">
11656              <!ATTLIST p a CDATA "&c;">
11657              ]>
11658              <p/>
11659          @@@test:domTree:
11660            document {
11661              document-type {
11662                general-entity {
11663                  node-name: 'entity';
11664                  text-content: 'value';
11665                }
11666                general-entity {
11667                  node-name: 'c';
11668                  general-entity-reference {
11669                    node-name: 'entity';
11670                    text-content: 'value';
11671                  }
11672                }
11673                general-entity {
11674                  node-name: 'another';
11675                  public-id: null;
11676                  system-id: 'another';
11677                  has-replacement-tree: false;
11678                }
11679                element-type-definition {
11680                  node-name: 'p';
11681                  attribute-definition {
11682                    node-name: 'a';
11683                    general-entity-reference {
11684                      node-name: 'c';
11685                      is-expanded: true;
11686                      general-entity-reference {
11687                        node-name: 'entity';
11688                        is-expanded: true;
11689                        text-content: 'value';
11690                      }
11691                    }
11692                  }
11693                }
11694              }
11695              element {
11696                attribute {
11697                  node-name: 'a';
11698                  specified: false;
11699                  general-entity-reference {
11700                    node-name: 'c';
11701                    general-entity-reference {
11702                      node-name: 'entity';
11703                      text-content: 'value';
11704                    }
11705                  }
11706                }
11707              }
11708            }
11709        @@XMLTest:
11710          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.2.test
11711          @@@DEnt:
11712            @@@@test:value:
11713              <?xml version="1.0" standalone="yes"?>
11714              <!DOCTYPE p [
11715              <!ENTITY c "&entity;">
11716              <!ATTLIST p a CDATA "&c;">
11717              ]>
11718              <p/>
11719          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11720        @@XMLTest:
11721          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.3.test
11722          @@@DEnt:
11723            @@@@test:value:
11724              <?xml version="1.0" standalone="yes"?>
11725              <!DOCTYPE p [
11726                <!ENTITY % para "<!-- -->">
11727                %para;
11728              <!ENTITY c "&entity;">
11729              <!ATTLIST p a CDATA "&c;">
11730              ]>
11731              <p/>
11732          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11733        @@XMLTest:
11734          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-1.test
11735          @@@DEnt:
11736            @@@@test:value:
11737              <?xml version="1.0" standalone="no"?>
11738              <!DOCTYPE p [
11739              <!ENTITY c "&entity;">
11740              <!ATTLIST p a CDATA "&c;">
11741                <!ENTITY % para "<!-- -->">
11742                %para;
11743              ]>
11744              <p/>
11745          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11746        @@XMLTest:
11747          @@@QName:
11748            xp.reptxt.attlist.attval.ger.entity.declared.standalone.-1.2.test
11749          @@@DEnt:
11750            @@@@test:value:
11751              <?xml version="1.0" standalone="no"?>
11752              <!DOCTYPE p [
11753                <!ENTITY % para "<!-- -->">
11754                %para;
11755              <!ENTITY c "&entity;">
11756              <!ATTLIST p a CDATA "&c;">
11757              ]>
11758              <p g="h"/>
11759          @@@test:domTree:
11760            document {
11761              document-type { }
11762              element {
11763                attribute {
11764                  node-name: 'g';
11765                  text-content: 'h';
11766                }
11767              }
11768            }
11769        @@XMLTest:
11770          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-2.test
11771          @@@DEnt:
11772            @@@@test:value:
11773              <!DOCTYPE p [
11774              <!ENTITY c "&entity;">
11775              <!ATTLIST p a CDATA "&c;">
11776                <!ENTITY % para "<!-- -->">
11777                %para;
11778              ]>
11779              <p/>
11780          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11781        @@XMLTest:
11782          @@@QName:
11783            xp.reptxt.attlist.attval.ger.entity.declared.standalone.-2.2.test
11784          @@@DEnt:
11785            @@@@test:value:
11786              <!DOCTYPE p [
11787                <!ENTITY % para "<!-- -->">
11788                %para;
11789              <!ENTITY c "&entity;">
11790              <!ATTLIST p a CDATA "&c;">
11791              ]>
11792              <p g="h"/>
11793          @@@test:domTree:
11794            document {
11795              document-type { }
11796              element {
11797                attribute {
11798                  node-name: 'g';
11799                  text-content: 'h';
11800                }
11801              }
11802            }
11803        @@XMLTest:
11804          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.4.test
11805          @@@DEnt:
11806            @@@@test:value:
11807              <?xml version="1.0" standalone="yes"?>
11808              <!DOCTYPE p [
11809                <!ENTITY % para SYSTEM "para">
11810                %para;
11811              <!ENTITY c "&entity;">
11812              <!ATTLIST p a CDATA "&c;">
11813              ]>
11814              <p/>
11815          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11816        @@XMLTest:
11817          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-3.test
11818          @@@DEnt:
11819            @@@@test:value:
11820              <?xml version="1.0" standalone="no"?>
11821              <!DOCTYPE p [
11822              <!ENTITY c "&entity;">
11823              <!ATTLIST p a CDATA "&c;">
11824                <!ENTITY % para SYSTEM "para">
11825                %para;
11826              ]>
11827              <p/>
11828          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11829        @@XMLTest:
11830          @@@QName:
11831            xp.reptxt.attlist.attval.ger.entity.declared.standalone.-3.2.test
11832          @@@DEnt:
11833            @@@@test:value:
11834              <?xml version="1.0" standalone="no"?>
11835              <!DOCTYPE p [
11836                <!ENTITY % para SYSTEM "para">
11837                %para;
11838              <!ENTITY c "&entity;">
11839              <!ATTLIST p a CDATA "&c;">
11840              ]>
11841              <p g="h"/>
11842          @@@test:domTree:
11843            document {
11844              document-type { }
11845              element {
11846                attribute {
11847                  node-name: 'g';
11848                  text-content: 'h';
11849                }
11850              }
11851            }
11852        @@XMLTest:
11853          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-4.test
11854          @@@DEnt:
11855            @@@@test:value:
11856              <!DOCTYPE p [
11857              <!ENTITY c "&entity;">
11858              <!ATTLIST p a CDATA "&c;">
11859                <!ENTITY % para SYSTEM "para">
11860                %para;
11861              ]>
11862              <p/>
11863          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11864        @@XMLTest:
11865          @@@QName:
11866            xp.reptxt.attlist.attval.ger.entity.declared.standalone.-4.2.test
11867          @@@DEnt:
11868            @@@@test:value:
11869              <!DOCTYPE p [
11870                <!ENTITY % para SYSTEM "para">
11871                %para;
11872              <!ENTITY c "&entity;">
11873              <!ATTLIST p a CDATA "&c;">
11874              ]>
11875              <p g="h"/>
11876          @@@test:domTree:
11877            document {
11878              document-type { }
11879              element {
11880                attribute {
11881                  node-name: 'g';
11882                  text-content: 'h';
11883                }
11884              }
11885            }
11886        @@XMLTest:
11887          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.5.test
11888          @@@DEnt:
11889            @@@@test:value:
11890              <?xml version="1.0" standalone="yes"?>
11891              <!DOCTYPE p SYSTEM "dtd" [
11892              <!ENTITY c "&entity;">
11893              <!ATTLIST p a CDATA "&c;">
11894              ]>
11895              <p/>
11896          @@@c:erred: <[[xp|wf-entity-declared]]> { (1, 1)..(1, 8); }
11897        @@XMLTest:
11898          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-5.test
11899          @@@DEnt:
11900            @@@@test:value:
11901              <?xml version="1.0" standalone="no"?>
11902              <!DOCTYPE p SYSTEM "dtd" [
11903              <!ENTITY c "&entity;">
11904              <!ATTLIST p a CDATA "&c;">
11905              ]>
11906              <p/>
11907          @@@test:domTree:
11908            document {
11909              document-type { }
11910              element {
11911                attribute {
11912                  node-name: 'a';
11913                  specified: false;
11914                  general-entity-reference {
11915                    node-name: 'c';
11916                    is-expanded: true;
11917                    general-entity-reference {
11918                      node-name: 'entity';
11919                      is-expanded: false;
11920                    }
11921                  }
11922                }
11923              }
11924            }
11925        @@XMLTest:
11926          @@@QName: xp.reptxt.attlist.attval.ger.entity.declared.standalone.-6.test
11927          @@@DEnt:
11928            @@@@test:value:
11929              <!DOCTYPE p SYSTEM "dtd" [<!ENTITY c "&entity;">
11930              <!ATTLIST p a CDATA "&c;">
11931              ]>
11932              <p/>
11933          @@@test:domTree:
11934            document {
11935              document-type { }
11936              element {
11937                attribute {
11938                  node-name: 'a';
11939                  specified: false;
11940                  general-entity-reference {
11941                    node-name: 'c';
11942                    is-expanded: true;
11943                    general-entity-reference {
11944                      node-name: 'entity';
11945                      is-expanded: false;
11946                    }
11947                  }
11948                }
11949              }
11950            }
11951    
11952        @@XMLTest:
11953          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.1.test
11954          @@@DEnt:
11955            @@@@test:value:
11956              <!DOCTYPE p [
11957              <!ATTLIST p a CDATA "&entity;">
11958              ]>
11959              <p/>
11960          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
11961        @@XMLTest:
11962          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.2.test
11963          @@@DEnt:
11964            @@@@test:value:
11965              <!DOCTYPE p [
11966                <!ENTITY other "aa">
11967                <!ENTITY % another "aa">
11968              <!ATTLIST p a CDATA "&entity;">
11969              ]>
11970              <p/>
11971          @@@c:erred: <[[xp|wf-entity-declared]]> { (4, 22)..(4, 29); }
11972        @@XMLTest:
11973          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.3.test
11974          @@@DEnt:
11975            @@@@test:value:
11976              <?xml version="1.0" standalone="yes"?>
11977              <!DOCTYPE p [
11978              <!ATTLIST p a CDATA "&entity;">
11979              ]>
11980              <p/>
11981          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11982        @@XMLTest:
11983          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.4.test
11984          @@@DEnt:
11985            @@@@test:value:
11986              <?xml version="1.0" standalone="no"?>
11987              <!DOCTYPE p [
11988              <!ATTLIST p a CDATA "&entity;">
11989              ]>
11990              <p/>
11991          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
11992        @@XMLTest:
11993          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.5.test
11994          @@@DEnt:
11995            @@@@test:value:
11996              <?xml version="1.0" standalone="yes"?>
11997              <!DOCTYPE p [
11998                <!ENTITY other "aa">
11999                <!ENTITY % another "aa">
12000              <!ATTLIST p a CDATA "&entity;">
12001              ]>
12002              <p/>
12003          @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
12004        @@XMLTest:
12005          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.6.test
12006          @@@DEnt:
12007            @@@@test:value:
12008              <?xml version="1.0" standalone="no"?>
12009              <!DOCTYPE p [
12010                <!ENTITY other "aa">
12011                <!ENTITY % another "aa">
12012              <!ATTLIST p a CDATA "&entity;">
12013              ]>
12014              <p/>
12015          @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
12016        @@XMLTest:
12017          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-1.test
12018          @@@DEnt:
12019            @@@@test:value:
12020              <!DOCTYPE p [
12021                <!ENTITY entity "value">
12022              <!ATTLIST p a CDATA "&entity;">
12023              ]>
12024              <p/>
12025          @@@test:domTree:
12026            document {
12027              document-type {
12028                general-entity {
12029                  node-name: 'entity';
12030                  text-content: 'value';
12031                }
12032                element-type-definition {
12033                  node-name: 'p';
12034                  attribute-definition {
12035                    node-name: 'a';
12036                    general-entity-reference {
12037                      node-name: 'entity';
12038                      is-expanded: true;
12039                      text-content: 'value';
12040                    }
12041                  }
12042                }
12043              }
12044              element {
12045                attribute {
12046                  node-name: 'a';
12047                  specified: false;
12048                  general-entity-reference {
12049                    node-name: 'entity';
12050                    is-expanded: true;
12051                    text-content: 'value';
12052                  }
12053                }
12054              }
12055            }
12056        @@XMLTest:
12057          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-1.2.test
12058          @@@DEnt:
12059            @@@@test:value:
12060              <!DOCTYPE p [
12061              <!ATTLIST p a CDATA "&entity;">
12062                <!ENTITY entity "value">
12063              ]>
12064              <p/>
12065          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12066        @@XMLTest:
12067          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-2.test
12068          @@@DEnt:
12069            @@@@test:value:
12070              <!DOCTYPE p [
12071                <!ENTITY entity "value">
12072                <!ENTITY another SYSTEM "another">
12073              <!ATTLIST p a CDATA "&entity;">
12074              ]>
12075              <p/>
12076          @@@test:domTree:
12077            document {
12078              document-type {
12079                element-type-definition {
12080                  node-name: 'p';
12081                  attribute-definition {
12082                    node-name: 'a';
12083                    general-entity-reference {
12084                      node-name: 'entity';
12085                      is-expanded: true;
12086                      text-content: 'value';
12087                    }
12088                  }
12089                }
12090                general-entity {
12091                  node-name: 'entity';
12092                  text-content: 'value';
12093                  has-replacement-tree: true;
12094                }
12095                general-entity {
12096                  node-name: 'another';
12097                  public-id: null;
12098                  system-id: 'another';
12099                  has-replacement-tree: false;
12100                }
12101              }
12102              element {
12103                attribute {
12104                  node-name: 'a';
12105                  specified: false;
12106                  general-entity-reference {
12107                    node-name: 'entity';
12108                    is-expanded: true;
12109                    text-content: 'value';
12110                  }
12111                }
12112              }
12113            }
12114        @@XMLTest:
12115          @@@QName: xp.attlist.attval.ger.entity.declared.nopref.-2.2.test
12116          @@@DEnt:
12117            @@@@test:value:
12118              <!DOCTYPE p [
12119              <!ATTLIST p a CDATA "&entity;">
12120                <!ENTITY entity "value">
12121                <!ENTITY another SYSTEM "another">
12122              ]>
12123              <p/>
12124          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12125        @@XMLTest:
12126          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.2.test
12127          @@@DEnt:
12128            @@@@test:value:
12129              <?xml version="1.0" standalone="yes"?>
12130              <!DOCTYPE p [
12131              <!ATTLIST p a CDATA "&entity;">
12132              ]>
12133              <p/>
12134          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12135        @@XMLTest:
12136          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.3.test
12137          @@@DEnt:
12138            @@@@test:value:
12139              <?xml version="1.0" standalone="yes"?>
12140              <!DOCTYPE p [
12141              <!ATTLIST p a CDATA "&entity;">
12142                <!ENTITY % para "<!-- -->">
12143                %para;
12144              ]>
12145              <p/>
12146          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12147        @@XMLTest:
12148          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.3.2.test
12149          @@@DEnt:
12150            @@@@test:value:
12151              <?xml version="1.0" standalone="yes"?>
12152              <!DOCTYPE p [
12153                <!ENTITY % para "<!-- -->">
12154                %para;
12155              <!ATTLIST p a CDATA "&entity;">
12156              ]>
12157              <p/>
12158          @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
12159          @@@enImplNote:
12160            The <XML::ATTLIST> declaration is processed since
12161            it is a <XA::standalone> document.
12162        @@XMLTest:
12163          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-1.test
12164          @@@DEnt:
12165            @@@@test:value:
12166              <?xml version="1.0" standalone="no"?>
12167              <!DOCTYPE p [
12168              <!ATTLIST p a CDATA "&entity;">
12169                <!ENTITY % para "<!-- -->">
12170                %para;
12171              ]>
12172              <p/>
12173          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12174        @@XMLTest:
12175          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-1.2.test
12176          @@@DEnt:
12177            @@@@test:value:
12178              <?xml version="1.0" standalone="no"?>
12179              <!DOCTYPE p [
12180                <!ATTLIST p b CDATA #IMPLIED>
12181                <!ENTITY % para "<!-- -->">
12182                %para;
12183              <!ATTLIST p a CDATA "&entity;">
12184              ]>
12185              <p c="d"/>
12186          @@@c:erred:
12187            <[[xp|warning-attribute-definition-not-processed]]> { (6, 13)..(6, 30); }
12188          @@@test:domTree:
12189            document {
12190              document-type {
12191                element-type-definition {
12192                  node-name: 'p';
12193                  attribute-definition {
12194                    node-name: 'b';
12195                  }
12196                }
12197              }
12198              element {
12199                attribute {
12200                  node-name: 'c';
12201                  text-content: 'd';
12202                }
12203              }
12204            }
12205          @@@enImplNote:
12206            The second <XML::ATTLIST> declaration is read but not processed
12207            and its <XML::&entity;> general entity reference violates
12208            entity declared validty constraint rather than well-formedness
12209            constraint.
12210        @@XMLTest:
12211          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-2.test
12212          @@@DEnt:
12213            @@@@test:value:
12214              <!DOCTYPE p [
12215              <!ATTLIST p a CDATA "&entity;">
12216                <!ENTITY % para "<!-- -->">
12217                %para;
12218              ]>
12219              <p/>
12220          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12221        @@XMLTest:
12222          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-2.2.test
12223          @@@DEnt:
12224            @@@@test:value:
12225              <!DOCTYPE p [
12226                <!ATTLIST p b CDATA #IMPLIED>
12227                <!ENTITY % para "<!-- -->">
12228                %para;
12229              <!ATTLIST p a CDATA "&entity;">
12230              ]>
12231              <p c="d"/>
12232          @@@c:erred:
12233            <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 30); }
12234          @@@test:domTree:
12235            document {
12236              document-type {
12237                element-type-definition {
12238                  node-name: 'p';
12239                  attribute-definition {
12240                    node-name: 'b';
12241                  }
12242                }
12243              }
12244              element {
12245                attribute {
12246                  node-name: 'c';
12247                  text-content: 'd';
12248                }
12249              }
12250            }
12251        @@XMLTest:
12252          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.4.test
12253          @@@DEnt:
12254            @@@@test:value:
12255              <?xml version="1.0" standalone="yes"?>
12256              <!DOCTYPE p [
12257              <!ATTLIST p a CDATA "&entity;">
12258                <!ENTITY % para SYSTEM "p">
12259                %para;
12260              ]>
12261              <p/>
12262          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12263        @@XMLTest:
12264          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.4.2.test
12265          @@@DEnt:
12266            @@@@test:value:
12267              <?xml version="1.0" standalone="yes"?>
12268              <!DOCTYPE p [
12269                <!ENTITY % para SYSTEM "p">
12270                %para;
12271              <!ATTLIST p a CDATA "&entity;">
12272              ]>
12273              <p/>
12274          @@@c:erred: <[[xp|wf-entity-declared]]> { (5, 22)..(5, 29); }
12275          @@@enImplNote:
12276            The <XML::ATTLIST> declaration is processed since
12277            it is a <XA::standalone> document.
12278        @@XMLTest:
12279          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-3.test
12280          @@@DEnt:
12281            @@@@test:value:
12282              <?xml version="1.0" standalone="no"?>
12283              <!DOCTYPE p [
12284              <!ATTLIST p a CDATA "&entity;">
12285                <!ENTITY % para SYSTEM "p">
12286                %para;
12287              ]>
12288              <p/>
12289          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12290          @@@enImplNote:
12291            Is this well-formed?  It has a parameter entity reference,
12292            therefore, it does not violates Entity Declared WFC, isn't it?
12293    
12294            Note that Firefox 1.5 and Opera 9 TP1 reports that this document has a
12295            fatal error (also note that they does not support unexpanded).
12296    
12297            See also:
12298            <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>
12299        @@XMLTest:
12300          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-3.2.test
12301          @@@DEnt:
12302            @@@@test:value:
12303              <?xml version="1.0" standalone="no"?>
12304              <!DOCTYPE p [
12305                <!ATTLIST p b CDATA #IMPLIED>
12306                <!ENTITY % para SYSTEM "p">
12307                %para;
12308              <!ATTLIST p a CDATA "&entity;">
12309              ]>
12310              <p c="d"/>
12311          @@@c:erred:
12312            <[[xp|warning-attribute-definition-not-processed]]> { (6, 13)..(6, 30); }
12313          @@@test:domTree:
12314            document {
12315              document-type {
12316                element-type-definition {
12317                  node-name: 'p';
12318                  attribute-definition {
12319                    node-name: 'b';
12320                  }
12321                }
12322              }
12323              element {
12324                attribute {
12325                  node-name: 'c';
12326                  text-content: 'd';
12327                }
12328              }
12329            }
12330          @@@enImplNote:
12331            The second <XML::ATTLIST> declaration is read but not processed
12332            and its <XML::&entity;> general entity reference violates
12333            entity declared validty constraint rather than well-formedness
12334            constraint.
12335        @@XMLTest:
12336          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-4.test
12337          @@@DEnt:
12338            @@@@test:value:
12339              <!DOCTYPE p [
12340              <!ATTLIST p a CDATA "&entity;">
12341                <!ENTITY % para SYSTEM "p">
12342                %para;
12343              ]>
12344              <p/>
12345          @@@c:erred: <[[xp|wf-entity-declared]]> { (2, 22)..(2, 29); }
12346        @@XMLTest:
12347          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-4.2.test
12348          @@@DEnt:
12349            @@@@test:value:
12350              <!DOCTYPE p [
12351                <!ATTLIST p b CDATA #IMPLIED>
12352                <!ENTITY % para SYSTEM "p">
12353                %para;
12354              <!ATTLIST p a CDATA "&entity;">
12355              ]>
12356              <p c="d"/>
12357          @@@c:erred:
12358            <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 30); }
12359          @@@test:domTree:
12360            document {
12361              document-type {
12362                element-type-definition {
12363                  node-name: 'p';
12364                  attribute-definition {
12365                    node-name: 'b';
12366                  }
12367                }
12368              }
12369              element {
12370                attribute {
12371                  node-name: 'c';
12372                  text-content: 'd';
12373                }
12374              }
12375            }
12376        @@XMLTest:
12377          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.5.test
12378          @@@DEnt:
12379            @@@@test:value:
12380              <?xml version="1.0" standalone="yes"?>
12381              <!DOCTYPE p SYSTEM "dtd" [
12382              <!ATTLIST p a CDATA "&entity;">
12383              ]>
12384              <p/>
12385          @@@c:erred: <[[xp|wf-entity-declared]]> { (3, 22)..(3, 29); }
12386          @@@enImplNote:
12387            This document has an error - result is implementation dependent.
12388        @@XMLTest:
12389          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-5.test
12390          @@@DEnt:
12391            @@@@test:value:
12392              <?xml version="1.0" standalone="no"?>
12393              <!DOCTYPE p SYSTEM "dtd" [
12394              <!ATTLIST p a CDATA "&entity;">
12395              ]>
12396              <p/>
12397          @@@test:domTree:
12398            document {
12399              document-type {
12400                element-type-definition {
12401                  node-name: 'p';
12402                  attribute-definition {
12403                    node-name: 'a';
12404                    general-entity-reference {
12405                      node-name: 'entity';
12406                      is-expanded: false;
12407                    }
12408                  }
12409                }
12410              }
12411              element {
12412                attribute {
12413                  node-name: 'a';
12414                  specified: false;
12415                  general-entity-reference {
12416                    node-name: 'entity';
12417                    is-expanded: false;
12418                  }
12419                }
12420              }
12421            }
12422          @@@enImplNote:
12423            This document has an error - result is implementation dependent.
12424        @@XMLTest:
12425          @@@QName: xp.attlist.attval.ger.entity.declared.standalone.-6.test
12426          @@@DEnt:
12427            @@@@test:value:
12428              <!DOCTYPE p SYSTEM "dtd" [
12429              <!ATTLIST p a CDATA "&entity;">
12430              ]>
12431              <p/>
12432          @@@test:domTree:
12433            document {
12434              document-type {
12435                element-type-definition {
12436                  node-name: 'p';
12437                  attribute-definition {
12438                    node-name: 'a';
12439                    general-entity-reference {
12440                      node-name: 'entity';
12441                      is-expanded: false;
12442                    }
12443                  }
12444                }
12445              }
12446              element {
12447                attribute {
12448                  node-name: 'a';
12449                  specified: false;
12450                  general-entity-reference {
12451                    node-name: 'entity';
12452                    is-expanded: false;
12453                  }
12454                }
12455              }
12456            }
12457          @@@enImplNote:
12458            This document has an error - result is implementation dependent.
12459    
12460        @@enImplNote:
12461          {TODO:: Entity declared WFC for
12462    
12463             - General entity references in entity value??
12464    
12465          }
12466    
12467        @@XMLTest:
12468          @@@QName: xp.element.content.parsed.entity.reference.test
12469          @@@DEnt:
12470            @@@@test:value:
12471              <!DOCTYPE p [
12472              <!NOTATION n SYSTEM "notation">
12473              <!ENTITY ext SYSTEM "system" NDATA n>
12474              ]>
12475              <p>&ext;</p>
12476          @@@c:erred: <[[xp|wf-parsed-entity]]> { (5, 4)..(5, 8); }
12477        @@XMLTest:
12478          @@@QName: xp.attval.parsed.entity.reference.test
12479          @@@DEnt:
12480            @@@@test:value:
12481              <!DOCTYPE p [
12482              <!NOTATION n SYSTEM "notation">
12483              <!ENTITY ext SYSTEM "system" NDATA n>
12484              ]>
12485              <p a="&ext;"/>
12486    #      @@@c:erred: <[[xp|wf-parsed-entity]]> { (5, 7)..(5, 11); }
12487          @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (5, 7)..(5, 11); }
12488        @@XMLTest:
12489          @@@QName: xp.element.content.reptxt.parsed.entity.reference.test
12490          @@@DEnt:
12491            @@@@test:value:
12492              <!DOCTYPE p [
12493              <!NOTATION n SYSTEM "notation">
12494              <!ENTITY ext SYSTEM "system" NDATA n>
12495              <!ENTITY c "&#x26;ext;">
12496              ]>
12497              <p>&c;</p>
12498          @@@c:erred: <[[xp|wf-parsed-entity]]> { (1, 1)..(1, 5); }
12499        @@XMLTest:
12500          @@@QName: xp.attval.reptxt.parsed.entity.reference.test
12501          @@@DEnt:
12502            @@@@test:value:
12503              <!DOCTYPE p [
12504              <!NOTATION n SYSTEM "notation">
12505              <!ENTITY ext SYSTEM "system" NDATA n>
12506              <!ENTITY c "&#x26;ext;">
12507              ]>
12508              <p a="&c;"/>
12509          @@@c:erred: <[[xp|wf-no-external-entity-references]]> { (1, 1)..(1, 5); }
12510          @@@c:erred:
12511            @@@@@: <[[xp|wf-parsed-entity]]> { }
12512            @@@@enImplNote: During entity node construction.
12513        @@XMLTest:
12514          @@@QName: xp.element.content.entval.parsed.entity.reference.test
12515          @@@DEnt:
12516            @@@@test:value:
12517              <!DOCTYPE p [
12518              <!NOTATION n SYSTEM "notation">
12519              <!ENTITY ext SYSTEM "system" NDATA n>
12520              <!ENTITY c "&ext;">
12521              ]>
12522              <p>&c;</p>
12523          @@@c:erred: <[[xp|wf-parsed-entity]]> { }
12524        @@XMLTest:
12525          @@@QName: xp.attval.entval.parsed.entity.reference.test
12526          @@@DEnt:
12527            @@@@test:value:
12528              <!DOCTYPE p [
12529              <!NOTATION n SYSTEM "notation">
12530              <!ENTITY ext SYSTEM "system" NDATA n>
12531              <!ENTITY c "&ext;">
12532              ]>
12533              <p a="&c;"/>
12534          @@@c:erred: <[[xp|wf-no-external-entity-references]]> { }
12535          @@@c:erred: <[[xp|wf-parsed-entity]]> { }
12536    
12537        @@XMLTest:
12538          @@@QName: xp.element.content.no.recursion.direct.test
12539          @@@DEnt:
12540            @@@@test:value:
12541              <!DOCTYPE p [
12542              <!ENTITY c "&c;">
12543              ]>
12544              <p>&c;</p>
12545          @@@c:erred: <[[xp|wf-no-recursion]]> { (1, 1)..(1, 3); }
12546        @@XMLTest:
12547          @@@QName: xp.element.content.no.recursion.indirect.test
12548          @@@DEnt:
12549            @@@@test:value:
12550              <!DOCTYPE p [
12551              <!ENTITY d "&c;">
12552              <!ENTITY c "&d;">
12553              ]>
12554              <p>&c;</p>
12555          @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12556        @@XMLTest:
12557          @@@QName: xp.attval.no.recursion.direct.test
12558          @@@DEnt:
12559            @@@@test:value:
12560              <!DOCTYPE p [
12561              <!ENTITY c "&c;">
12562              ]>
12563              <p a="&c;"/>
12564          @@@c:erred: <[[xp|wf-no-recursion]]> { (1, 1)..(1, 3); }
12565        @@XMLTest:
12566          @@@QName: xp.attval.no.recursion.indirect.test
12567          @@@DEnt:
12568            @@@@test:value:
12569              <!DOCTYPE p [
12570              <!ENTITY d "&c;">
12571              <!ENTITY c "&d;">
12572              ]>
12573              <p a="&c;"/>
12574          @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12575        @@XMLTest:
12576          @@@QName: xp.reptxt.element.content.no.recursion.direct.test
12577          @@@DEnt:
12578            @@@@test:value:
12579              <!DOCTYPE p [
12580              <!ENTITY c "&c;">
12581              <!ENTITY e "&#x26;c;">
12582              ]>
12583              <p>&e;</p>
12584          @@@c:erred: <[[xp|wf-no-recursion]]> { /* |e| */ (1, 1)..(1, 3); }
12585        @@XMLTest:
12586          @@@QName: xp.reptxt.element.content.no.recursion.indirect.test
12587          @@@DEnt:
12588            @@@@test:value:
12589              <!DOCTYPE p [
12590              <!ENTITY d "&c;">
12591              <!ENTITY c "&d;">
12592              <!ENTITY e "&#x26;c;">
12593              ]>
12594              <p>&e;</p>
12595          @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12596        @@XMLTest:
12597          @@@QName: xp.reptxt.attval.no.recursion.direct.test
12598          @@@DEnt:
12599            @@@@test:value:
12600              <!DOCTYPE p [
12601              <!ENTITY c "&c;">
12602              <!ENTITY e "&#x26;c;">
12603              ]>
12604              <p a="&e;"/>
12605          @@@c:erred: <[[xp|wf-no-recursion]]> { /* |e| */ (1, 1)..(1, 3); }
12606        @@XMLTest:
12607          @@@QName: xp.reptxt.attval.no.recursion.indirect.test
12608          @@@DEnt:
12609            @@@@test:value:
12610              <!DOCTYPE p [
12611              <!ENTITY d "&c;">
12612              <!ENTITY c "&d;">
12613              <!ENTITY e "&#x26;c;">
12614              ]>
12615              <p a="&e;"/>
12616          @@@c:erred: <[[xp|wf-no-recursion]]> { /* |d| */ (1, 1)..(1, 3); }
12617    
12618        @@XMLTest:
12619          @@@QName: xp.ENTITY.system.ndata.name.test
12620          @@@DEnt:
12621            @@@@test:value:
12622              <!DOCTYPE a [
12623              <!NOTATION n SYSTEM "n">
12624              <!ENTITY % e SYSTEM "sys" NDATA n>
12625              ]><a/>
12626          @@@c:erred: <[[xp|wf-syntax-error]]> { (3, 26)..(3, 30); }
12627        @@XMLTest:
12628          @@@QName: xp.ENTITY.public.ndata.name.test
12629          @@@DEnt:
12630            @@@@test:value:
12631              <!DOCTYPE a [
12632              <!NOTATION n SYSTEM "n">
12633              <!ENTITY % e PUBLIC "pub" "sys" NDATA n>
12634              ]><a/>
12635          @@@c:erred: <[[xp|wf-syntax-error]]> { (3, 33)..(3, 37); }
12636        @@XMLTest:
12637          @@@QName: xp.ENTITY.public.ndata.name.-1.test
12638          @@@DEnt:
12639            @@@@test:value:
12640              <!DOCTYPE a [
12641              <!NOTATION n SYSTEM "n">
12642              <!ENTITY % e PUBLIC "pub" "sys" >
12643              ]><a/>
12644          @@@test:domTree:
12645            document { }
12646    
12647        @@XMLTest:
12648          @@@QName: xp.ENTITY.pubid.1.test
12649          @@@DEnt:
12650            @@@@test:value:
12651              <!DOCTYPE a [
12652              <!ENTITY e PUBLIC "p" "s">
12653              ]><a/>
12654          @@@test:domTree:
12655            document {
12656              document-type {
12657                general-entity {
12658                  node-name: 'e';
12659                  public-id: 'p';
12660                  system-id: 's';
12661                }
12662              }
12663              element { }
12664            }
12665        @@XMLTest:
12666          @@@QName: xp.ENTITY.pubid.2.test
12667          @@@DEnt:
12668            @@@@test:value:
12669              <!DOCTYPE a [
12670              <!ENTITY e PUBLIC "  p  " "s">
12671              ]><a/>
12672          @@@test:domTree:
12673            document {
12674              document-type {
12675                general-entity {
12676                  node-name: 'e';
12677                  public-id: 'p';
12678                  system-id: 's';
12679                }
12680              }
12681              element { }
12682            }
12683        @@XMLTest:
12684          @@@QName: xp.ENTITY.pubid.3.test
12685          @@@DEnt:
12686            @@@@test:value:
12687              <!DOCTYPE a [
12688              <!ENTITY e PUBLIC "  p  $u000Aq$u000A " "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        @@XMLTest:
12702          @@@QName: xp.ENTITY.pubid.4.test
12703          @@@DEnt:
12704            @@@@test:value:
12705              <!DOCTYPE a [
12706              <!ENTITY e PUBLIC "  p  $u000D$u000Aq" "s">
12707              ]><a/>
12708          @@@test:domTree:
12709            document {
12710              document-type {
12711                general-entity {
12712                  node-name: 'e';
12713                  public-id: 'p q';
12714                  system-id: 's';
12715                }
12716              }
12717              element { }
12718            }
12719        @@XMLTest:
12720          @@@QName: xp.ENTITY.pubid.5.test
12721          @@@DEnt:
12722            @@@@test:value:
12723              <?xml version="1.1"?>
12724              <!DOCTYPE a [
12725              <!ENTITY e PUBLIC "  p  $u000D$u0085q" "s">
12726              ]><a/>
12727          @@@test:domTree:
12728            document {
12729              document-type {
12730                general-entity {
12731                  node-name: 'e';
12732                  public-id: 'p q';
12733                  system-id: 's';
12734                }
12735              }
12736              element { }
12737            }
12738    
12739        @@XMLTest:
12740          @@@QName: xp.ENTITY.ignored.test
12741          @@@DEnt:
12742            @@@@test:value:
12743              <!DOCTYPE a [
12744              <!ENTITY e "a">
12745              <!ENTITY e "b">
12746              ]><a/>
12747          @@@test:domTree:
12748            document {
12749              document-type {
12750                general-entity {
12751                  node-name: 'e';
12752                  text-content: 'a';
12753                }
12754              }
12755              element { }
12756            }
12757          @@@c:erred:
12758            <[[xp|warning-entity-declaration-ignored]]> { (3, 1)..(3, 15); }
12759        @@XMLTest:
12760          @@@QName: xp.ENTITY.ignored.2.test
12761          @@@DEnt:
12762            @@@@test:value:
12763              <!DOCTYPE a [
12764              <!ENTITY % e "a">
12765              <!ENTITY % e "b">
12766              ]><a/>
12767          @@@test:domTree:
12768            document { }
12769          @@@c:erred:
12770            <[[xp|warning-entity-declaration-ignored]]> { (3, 1)..(3, 17); }
12771    
12772        @@XMLTest:
12773          @@@QName: xp.ENTITY.predefined.1.test
12774          @@@DEnt:
12775            @@@@test:value:
12776              <!DOCTYPE a [
12777              <!ENTITY lt     "&#38;#60;">
12778              <!ENTITY gt     "&#62;">
12779              <!ENTITY amp    "&#38;#38;">
12780              <!ENTITY apos   "&#39;">
12781              <!ENTITY quot   "&#34;">
12782              <!ENTITY e      "f">
12783              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12784          @@@test:domTree:
12785            document {
12786              document-type {
12787                general-entity {
12788                  node-name: 'e';
12789                  text-content: 'f';
12790                }
12791              }
12792              element {
12793                text-content: '<>&' U+0027 '"';
12794              }
12795            }
12796        @@XMLTest:
12797          @@@QName: xp.ENTITY.predefined.2.test
12798          @@@DEnt:
12799            @@@@test:value:
12800              <!DOCTYPE a [
12801              <!ENTITY lt     "&#38;#60;">
12802              <!ENTITY gt     "&#x26;#62;">
12803              <!ENTITY amp    "&#38;#38;">
12804              <!ENTITY apos   "&#x26;#39;">
12805              <!ENTITY quot   "&#x26;#34;">
12806              <!ENTITY e      "f">
12807              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12808          @@@test:domTree:
12809            document {
12810              document-type {
12811                general-entity {
12812                  node-name: 'e';
12813                  text-content: 'f';
12814                }
12815              }
12816              element {
12817                text-content: '<>&' U+0027 '"';
12818              }
12819            }
12820        @@XMLTest:
12821          @@@QName: xp.ENTITY.predefined.3.test
12822          @@@DEnt:
12823            @@@@test:value:
12824              <!DOCTYPE a [
12825              <!ENTITY lt     "&#60;">
12826              <!ENTITY gt     "&#62;">
12827              <!ENTITY amp    "&#38;">
12828              <!ENTITY apos   "&#39;">
12829              <!ENTITY quot   "&#34;">
12830              <!ENTITY e      "f">
12831              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12832          @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (2, 1)..(2, 24); }
12833          @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (4, 1)..(4, 24); }
12834          @@@test:domTree:
12835            document {
12836              document-type {
12837                general-entity {
12838                  node-name: 'e';
12839                  text-content: 'f';
12840                }
12841              }
12842              element {
12843                text-content: '<>&' U+0027 '"';
12844              }
12845            }
12846        @@XMLTest:
12847          @@@QName: xp.ENTITY.predefined.4.test
12848          @@@DEnt:
12849            @@@@test:value:
12850              <!DOCTYPE a [
12851              <!ENTITY lt     "1">
12852              <!ENTITY gt     "2">
12853              <!ENTITY amp    "3">
12854              <!ENTITY apos   "4">
12855              <!ENTITY quot   "5">
12856              <!ENTITY e      "f">
12857              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12858          @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (2, 1)..(2, 24); }
12859          @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (3, 1)..(3, 24); }
12860          @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (4, 1)..(4, 24); }
12861          @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (5, 1)..(5, 24); }
12862          @@@c:erred: <[[xp|error-malformed-predefined-entity]]> { (6, 1)..(6, 24); }
12863          @@@test:domTree:
12864            document {
12865              document-type {
12866                general-entity {
12867                  node-name: 'e';
12868                  text-content: 'f';
12869                }
12870              }
12871              element {
12872                text-content: '<>&' U+0027 '"';
12873              }
12874            }
12875        @@XMLTest:
12876          @@@QName: xp.ENTITY.predefined.5.test
12877          @@@DEnt:
12878            @@@@test:value:
12879              <!DOCTYPE a [
12880              <!ENTITY lt     SYSTEM "1">
12881              <!ENTITY gt     SYSTEM "2">
12882              <!ENTITY amp    SYSTEM "3">
12883              <!ENTITY apos   SYSTEM "4">
12884              <!ENTITY quot   SYSTEM "5">
12885              <!ENTITY e      "f">
12886              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12887          @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (2, 1)..(2, 27); }
12888          @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (3, 1)..(3, 27); }
12889          @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (4, 1)..(4, 27); }
12890          @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (5, 1)..(5, 27); }
12891          @@@c:erred: <[[xp|error-internal-predefined-entity]]> { (6, 1)..(6, 27); }
12892          @@@test:domTree:
12893            document {
12894              document-type {
12895                general-entity {
12896                  node-name: 'e';
12897                  text-content: 'f';
12898                }
12899              }
12900              element {
12901                text-content: '<>&' U+0027 '"';
12902              }
12903            }
12904        @@XMLTest:
12905          @@@QName: xp.ENTITY.predefined.6.test
12906          @@@DEnt:
12907            @@@@test:value:
12908              <!DOCTYPE a [
12909              <!ENTITY % lt     SYSTEM "1">
12910              <!ENTITY % gt     SYSTEM "2">
12911              <!ENTITY % amp    SYSTEM "3">
12912              <!ENTITY % apos   SYSTEM "4">
12913              <!ENTITY % quot   SYSTEM "5">
12914              <!ENTITY e      "f">
12915              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12916          @@@test:domTree:
12917            document {
12918              document-type {
12919                general-entity {
12920                  node-name: 'e';
12921                  text-content: 'f';
12922                }
12923              }
12924              element {
12925                text-content: '<>&' U+0027 '"';
12926              }
12927            }
12928        @@XMLTest:
12929          @@@QName: xp.ENTITY.predefined.7.test
12930          @@@DEnt:
12931            @@@@test:value:
12932              <!DOCTYPE a [
12933              <!ENTITY lt     "&#38;#x3C;">
12934              <!ENTITY gt     "&#x3E;">
12935              <!ENTITY amp    "&#38;#x26;">
12936              <!ENTITY apos   "&#x27;">
12937              <!ENTITY quot   "&#x22;">
12938              <!ENTITY e      "f">
12939              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12940          @@@test:domTree:
12941            document {
12942              document-type {
12943                general-entity {
12944                  node-name: 'e';
12945                  text-content: 'f';
12946                }
12947              }
12948              element {
12949                text-content: '<>&' U+0027 '"';
12950              }
12951            }
12952        @@XMLTest:
12953          @@@QName: xp.ENTITY.predefined.8.test
12954          @@@DEnt:
12955            @@@@test:value:
12956              <!DOCTYPE a [
12957              <!ENTITY lt     "&#38;#x3c;">
12958              <!ENTITY gt     "&#x3e;">
12959              <!ENTITY amp    "&#38;#x26;">
12960              <!ENTITY apos   "&#x27;">
12961              <!ENTITY quot   "&#x22;">
12962              <!ENTITY e      "f">
12963              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12964          @@@test:domTree:
12965            document {
12966              document-type {
12967                general-entity {
12968                  node-name: 'e';
12969                  text-content: 'f';
12970                }
12971              }
12972              element {
12973                text-content: '<>&' U+0027 '"';
12974              }
12975            }
12976        @@XMLTest:
12977          @@@QName: xp.ENTITY.predefined.9.test
12978          @@@DEnt:
12979            @@@@test:value:
12980              <!DOCTYPE a [
12981              <!ENTITY lt     "&#38;#x00003C;">
12982              <!ENTITY gt     "&#x0003E;">
12983              <!ENTITY amp    "&#38;#x026;">
12984              <!ENTITY apos   "&#x000027;">
12985              <!ENTITY quot   "&#x0022;">
12986              <!ENTITY e      "f">
12987              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
12988          @@@test:domTree:
12989            document {
12990              document-type {
12991                general-entity {
12992                  node-name: 'e';
12993                  text-content: 'f';
12994                }
12995              }
12996              element {
12997                text-content: '<>&' U+0027 '"';
12998              }
12999            }
13000        @@XMLTest:
13001          @@@QName: xp.ENTITY.predefined.10.test
13002          @@@DEnt:
13003            @@@@test:value:
13004              <!DOCTYPE a [
13005              <!ENTITY lt     "&#38;#00060;">
13006              <!ENTITY gt     "&#062;">
13007              <!ENTITY amp    "&#38;#000038;">
13008              <!ENTITY apos   "&#0000039;">
13009              <!ENTITY quot   "&#0034;">
13010              <!ENTITY e      "f">
13011              ]><a>&lt;&gt;&amp;&apos;&quot;</a>
13012          @@@test:domTree:
13013            document {
13014              document-type {
13015                general-entity {
13016                  node-name: 'e';
13017                  text-content: 'f';
13018                }
13019              }
13020              element {
13021                text-content: '<>&' U+0027 '"';
13022              }
13023            }
13024    
13025        @@XMLTest:
13026          @@@QName: xp.processed.1.test
13027          @@@DEnt:
13028            @@@@test:value:
13029              <a/>
13030          @@@test:domTree:
13031            document {
13032              all-declarations-processed: true;
13033              element { }
13034            }
13035        @@XMLTest:
13036          @@@QName: xp.processed.2.test
13037          @@@DEnt:
13038            @@@@test:value:
13039              <!DOCTYPE a [
13040              <!ENTITY e      "f">
13041              <!ATTLIST a b NMTOKEN "  c  ">
13042              ]><a>&e;</a>
13043          @@@test:domTree:
13044            document {
13045              document-type {
13046                general-entity {
13047                  node-name: 'e';
13048                }
13049                element-type-definition {
13050                  node-name: 'a';
13051                  attribute-definition {
13052                    node-name: 'b';
13053                  }
13054                }
13055              }
13056              all-declarations-processed: true;
13057              element {
13058                attribute {
13059                  node-name: 'b';
13060                  node-value: 'c';
13061                }
13062                text-content: 'f';
13063              }
13064            }
13065        @@XMLTest:
13066          @@@QName: xp.processed.3.test
13067          @@@DEnt:
13068            @@@@test:value:
13069              <!DOCTYPE a [
13070              <!ENTITY % p    SYSTEM "p">
13071              %p;
13072              <!ENTITY e      "f">
13073              <!ATTLIST a b NMTOKEN "  c  ">
13074              ]><a d="e">&e;</a>
13075          @@@test:domTree:
13076            document {
13077              document-type { }
13078              all-declarations-processed: false;
13079              element {
13080                attribute {
13081                  node-name: 'd';
13082                  node-value: 'e';
13083                }
13084                general-entity-reference {
13085                  node-name: 'e';
13086                  is-expanded: false;
13087                }
13088              }
13089            }
13090          @@@c:erred:
13091            <[[xp|warning-entity-declaration-not-processed]]> { (4, 1)..(4, 20); }
13092          @@@c:erred:
13093            <[[xp|warning-attribute-definition-not-processed]]> { (5, 13)..(5, 31); }
13094        @@XMLTest:
13095          @@@QName: xp.processed.4.test
13096          @@@DEnt:
13097            @@@@test:value:
13098              <?xml version="1.1" standalone="yes"?>
13099              <!DOCTYPE a [
13100              <!ENTITY % p    SYSTEM "p">
13101              %p;
13102              <!ENTITY e      "f">
13103              <!ATTLIST a b NMTOKEN "  c  ">
13104              ]><a>&e;</a>
13105          @@@test:domTree:
13106            document {
13107              document-type {
13108                general-entity {
13109                  node-name: 'e';
13110                }
13111                element-type-definition {
13112                  node-name: 'a';
13113                  attribute-definition {
13114                    node-name: 'b';
13115                  }
13116                }
13117              }
13118              all-declarations-processed: false;
13119              element {
13120                attribute {
13121                  node-name: 'b';
13122                  node-value: 'c';
13123                }
13124                text-content: 'f';
13125              }
13126            }
13127        @@XMLTest:
13128          @@@QName: xp.processed.5.test
13129          @@@DEnt:
13130            @@@@test:value:
13131              <!DOCTYPE a SYSTEM "p" [
13132              <!ENTITY e      "f">
13133              <!ATTLIST a b NMTOKEN "  c  ">
13134              ]><a>&e;</a>
13135          @@@test:domTree:
13136            document {
13137              document-type {
13138                general-entity {
13139                  node-name: 'e';
13140                }
13141                element-type-definition {
13142                  node-name: 'a';
13143                  attribute-definition {
13144                    node-name: 'b';
13145                  }
13146                }
13147              }
13148              all-declarations-processed: false;
13149              element {
13150                attribute {
13151                  node-name: 'b';
13152                  node-value: 'c';
13153                }
13154                text-content: 'f';
13155              }
13156            }
13157    
13158        @@XMLTest:
13159          @@@QName: xp.PEs.in.internal.subset.1.test
13160          @@@DEnt:
13161            @@@@test:value:
13162              <!DOCTYPE a [
13163              <!ENTITY % p " ">
13164              <!ENTITY % q "%p;">
13165              ]><a/>
13166          @@@c:erred: <[[xp|wf-pes-in-internal-subset]]> { (3, 15)..(3, 17); }
13167        @@XMLTest:
13168          @@@QName: xp.PEs.in.internal.subset.2.test
13169          @@@DEnt:
13170            @@@@test:value:
13171              <!DOCTYPE a [
13172              <!ENTITY % p " ">
13173              <!ENTITY % q '%p;'>
13174              ]><a/>
13175          @@@c:erred: <[[xp|wf-pes-in-internal-subset]]> { (3, 15)..(3, 17); }
13176    
13177        @@XMLTest:
13178          @@@QName: xp.name.pitarget.content.1.0.2.test
13179          @@@DEnt:
13180            @@@@test:value:
13181              <?xml version="1.0"?>
13182              <p>
13183              <?$u3001$u3002?>
13184              </p>
13185          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13186        @@XMLTest:
13187          @@@QName: xp.name.pitarget.content.1.1.2.test
13188          @@@DEnt:
13189            @@@@test:value:
13190              <?xml version="1.1"?>
13191              <p>$
13192              <?$u3001$u3002?>$
13193              </p>
13194          @@@test:domTree:
13195            document {
13196              xml-version: '1.1';
13197              element {
13198                pi {
13199                  node-name: U+3001 U+3002;
13200                }
13201              }
13202            }
13203        @@XMLTest:
13204          @@@QName: xp.name.pitarget.content.1.0.3.test
13205          @@@DEnt:
13206            @@@@test:value:
13207              <?xml version="1.0"?>
13208              <p>
13209              <?$u3005b?>
13210              </p>
13211          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13212        @@XMLTest:
13213          @@@QName: xp.name.pitarget.content.1.1.3.test
13214          @@@DEnt:
13215            @@@@test:value:
13216              <?xml version="1.1"?>
13217              <p>$
13218              <?$u3005b?>$
13219              </p>
13220          @@@test:domTree:
13221            document {
13222              xml-version: '1.1';
13223              element {
13224                pi {
13225                  node-name: U+3005 'b';
13226                }
13227              }
13228            }
13229        @@XMLTest:
13230          @@@QName: xp.name.pitarget.content.names.1.0.1.test
13231          @@@DEnt:
13232            @@@@test:value:
13233              <?xml version="1.0"?>
13234              <p>
13235              <?a:b?>
13236              </p>
13237          @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13238        @@XMLTest:
13239          @@@QName: xp.name.pitarget.content.names.1.1.1.test
13240          @@@DEnt:
13241            @@@@test:value:
13242              <?xml version="1.1"?>
13243              <p>
13244              <?a:b?>
13245              </p>
13246          @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13247        @@XMLTest:
13248          @@@QName: xp.name.pitarget.intsubset.1.0.2.test
13249          @@@DEnt:
13250            @@@@test:value:
13251              <?xml version="1.0"?>
13252              <!DOCTYPE p [
13253              <?$u3001$u3002?>
13254              ]><p/>
13255          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13256        @@XMLTest:
13257          @@@QName: xp.name.pitarget.intsubset.1.1.2.test
13258          @@@DEnt:
13259            @@@@test:value:
13260              <?xml version="1.1"?>
13261              <!DOCTYPE p [
13262              <?$u3001$u3002?>
13263              ]><p/>
13264          @@@test:domTree:
13265            document {
13266              xml-version: '1.1';
13267              document-type {
13268                pi {
13269                  node-name: U+3001 U+3002;
13270                }
13271              }
13272              element { }
13273            }
13274        @@XMLTest:
13275          @@@QName: xp.name.pitarget.intsubset.1.0.3.test
13276          @@@DEnt:
13277            @@@@test:value:
13278              <?xml version="1.0"?>
13279              <!DOCTYPE p [
13280              <?$u3005b?>
13281              ]><p/>
13282          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]> { (3, 3)..(3, 4); }
13283        @@XMLTest:
13284          @@@QName: xp.name.pitarget.intsubset.1.1.3.test
13285          @@@DEnt:
13286            @@@@test:value:
13287              <?xml version="1.1"?>
13288              <!DOCTYPE p [
13289              <?$u3005b?>
13290              ]><p/>
13291          @@@test:domTree:
13292            document {
13293              xml-version: '1.1';
13294              document-type {
13295                pi {
13296                  node-name: U+3005 'b';
13297                }
13298              }
13299              element { }
13300            }
13301        @@XMLTest:
13302          @@@QName: xp.name.pitarget.intsubset.names.1.0.1.test
13303          @@@DEnt:
13304            @@@@test:value:
13305              <?xml version="1.0"?>
13306              <!DOCTYPE p [
13307              <?a:b?>
13308              ]><p/>
13309          @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13310        @@XMLTest:
13311          @@@QName: xp.name.pitarget.intsubset.names.1.1.1.test
13312          @@@DEnt:
13313            @@@@test:value:
13314              <?xml version="1.1"?>
13315              <!DOCTYPE p [
13316              <?a:b?>
13317              ]><p/>
13318          @@@c:erred: <[[xp|nswf-legal-ncname]]> { (3, 3)..(3, 5); }
13319        @@XMLTest:
13320          @@@QName: xp.name.doctypedecl.stag.etag.1.0.2.test
13321          @@@DEnt:
13322            @@@@test:value:
13323              <?xml version="1.0"?>
13324              <!DOCTYPE $u3001$u3002>
13325              <$u3001$u3002>
13326              </$u3001$u3002>
13327          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 11)..(2, 12); }
13328          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 2)..(3, 3); }
13329    #      @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 3)..(4, 4); }
13330        @@XMLTest:
13331          @@@QName: xp.name.doctypedecl.stag.etag.1.1.2.test
13332          @@@DEnt:
13333            @@@@test:value:
13334              <?xml version="1.1"?>
13335              <!DOCTYPE $u3001$u3002>
13336              <$u3001$u3002>
13337              </$u3001$u3002>
13338          @@@test:domTree:
13339            document {
13340              xml-version: '1.1';
13341              document-type {
13342                node-name: U+3001 U+3002;
13343              }
13344              element {
13345                node-name: U+3001 U+3002;
13346              }
13347            }
13348        @@XMLTest:
13349          @@@QName: xp.name.doctypedecl.stag.etag.1.0.3.test
13350          @@@DEnt:
13351            @@@@test:value:
13352              <?xml version="1.0"?>
13353              <!DOCTYPE $u3005b>
13354              <$u3005b>
13355              </$u3005b>
13356          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 11)..(2, 12); }
13357          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 2)..(3, 3); }
13358    #      @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 3)..(4, 4); }
13359        @@XMLTest:
13360          @@@QName: xp.name.doctype.decl.stag.etag.1.1.3.test
13361          @@@DEnt:
13362            @@@@test:value:
13363              <?xml version="1.1"?>
13364              <!DOCTYPE $u3005b>
13365              <$u3005b>
13366              </$u3005b>
13367          @@@test:domTree:
13368            document {
13369              xml-version: '1.1';
13370              document-type {
13371                node-name: U+3005 'b';
13372              }
13373              element {
13374                node-name: U+3005 'b';
13375              }
13376            }
13377        @@XMLTest:
13378          @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.1.test
13379          @@@DEnt:
13380            @@@@test:value:
13381              <?xml version="1.0"?>
13382              <!DOCTYPE a:b>
13383              <a:b xmlns:a="http://a.example/">
13384              </a:b>
13385          @@@test:domTree:
13386            document {
13387              xml-version: '1.0';
13388              document-type {
13389                node-name: 'a:b';
13390              }
13391              element {
13392                prefix: 'a';
13393                local-name: 'b';
13394                namespace-uri: 'http://a.example/';
13395                attribute {
13396                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
13397                  prefix: 'xmlns';
13398                  local-name: 'a';
13399                  value: 'http://a.example/';
13400                  specified: true;
13401                }
13402              }
13403            }
13404        @@XMLTest:
13405          @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.1.test
13406          @@@DEnt:
13407            @@@@test:value:
13408              <?xml version="1.1"?>
13409              <!DOCTYPE a:b>
13410              <a:b xmlns:a="http://a.example/">
13411              </a:b>
13412          @@@test:domTree:
13413            document {
13414              xml-version: '1.1';
13415              document-type {
13416                node-name: 'a:b';
13417              }
13418              element {
13419                prefix: 'a';
13420                local-name: 'b';
13421                namespace-uri: 'http://a.example/';
13422                attribute {
13423                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
13424                  prefix: 'xmlns';
13425                  local-name: 'a';
13426                  specified: true;
13427                }
13428              }
13429            }
13430        @@XMLTest:
13431          @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.2.test
13432          @@@DEnt:
13433            @@@@test:value:
13434              <?xml version="1.0"?>
13435              <!DOCTYPE :ab>
13436              <:ab>
13437              </:ab>
13438          @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13439          @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13440          @@@c:erred: <[[xp|nsc-prefix-declared]]> { /* prefix || */ }
13441        @@XMLTest:
13442          @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.2.test
13443          @@@DEnt:
13444            @@@@test:value:
13445              <?xml version="1.1"?>
13446              <!DOCTYPE :ab>
13447              <:ab>
13448              </:ab>
13449          @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13450          @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13451          @@@c:erred: <[[xp|nsc-prefix-declared]]> { /* prefix || */ }
13452        @@XMLTest:
13453          @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.3.test
13454          @@@DEnt:
13455            @@@@test:value:
13456              <?xml version="1.0"?>
13457              <!DOCTYPE a:$u3005>
13458              <a:$u3005 xmlns:a="http://a.example/">
13459              </a:$u3005>
13460          @@@c:erred: <[[xp|nswf-legal-qname]]> { (2, 11)..(2, 13); }
13461          @@@c:erred: <[[xp|nswf-legal-qname]]> { (3, 2)..(3, 4); }
13462        @@XMLTest:
13463          @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.3.test
13464          @@@DEnt:
13465            @@@@test:value:
13466              <?xml version="1.1"?>
13467              <!DOCTYPE a:$u3005>
13468              <a:$u3005 xmlns:a="http://a.example/">
13469              </a:$u3005>
13470          @@@test:domTree:
13471            document {
13472              xml-version: '1.1';
13473              document-type {
13474                node-name: 'a:' U+3005;
13475              }
13476              element {
13477                prefix: 'a';
13478                local-name: U+3005;
13479                namespace-uri: 'http://a.example/';
13480                attribute {
13481                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
13482                  prefix: 'xmlns';
13483                  local-name: 'a';
13484                  value: 'http://a.example/';
13485                  specified: true;
13486                }
13487              }
13488            }
13489        @@XMLTest:
13490          @@@QName: xp.name.doctypedecl.stag.etag.names.1.0.4.test
13491          @@@DEnt:
13492            @@@@test:value:
13493              <?xml version="1.0"?>
13494              <!DOCTYPE a:b>
13495              <a:b>
13496              </a:b>
13497          @@@c:erred: <[[xp|nsc-prefix-declared]]> { (3, 1)..(3, 5); }
13498        @@XMLTest:
13499          @@@QName: xp.name.doctypedecl.stag.etag.names.1.1.4.test
13500          @@@DEnt:
13501            @@@@test:value:
13502              <?xml version="1.1"?>
13503              <!DOCTYPE a:b>
13504              <a:b>
13505              </a:b>
13506          @@@c:erred: <[[xp|nsc-prefix-declared]]> { (3, 1)..(3, 5); }
13507        @@XMLTest:
13508          @@@QName: xp.name.emptyelemtag.1.0.2.test
13509          @@@DEnt:
13510            @@@@test:value:
13511              <?xml version="1.0"?>
13512              <$u3001$u3002/>
13513          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 2)..(2, 3); }
13514        @@XMLTest:
13515          @@@QName: xp.name.emptyelemtag.1.1.2.test
13516          @@@DEnt:
13517            @@@@test:value:
13518              <?xml version="1.1"?>
13519              <$u3001$u3002/>
13520          @@@test:domTree:
13521            document {
13522              xml-version: '1.1';
13523              element {
13524                node-name: U+3001 U+3002;
13525              }
13526            }
13527        @@XMLTest:
13528          @@@QName: xp.name.emptyelemtag.1.0.3.test
13529          @@@DEnt:
13530            @@@@test:value:
13531              <?xml version="1.0"?>
13532              <$u3005b/>
13533          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 2)..(2, 3); }
13534        @@XMLTest:
13535          @@@QName: xp.name.emptyelemtag.1.1.3.test
13536          @@@DEnt:
13537            @@@@test:value:
13538              <?xml version="1.1"?>
13539              <$u3005b/>
13540          @@@test:domTree:
13541            document {
13542              xml-version: '1.1';
13543              element {
13544                node-name: U+3005 'b';
13545              }
13546            }
13547        @@XMLTest:
13548          @@@QName: xp.name.emptyelemtag.names.1.0.1.test
13549          @@@DEnt:
13550            @@@@test:value:
13551              <?xml version="1.0"?>
13552              <a:b/>
13553          @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 6); }
13554        @@XMLTest:
13555          @@@QName: xp.name.emptyelemtag.names.1.1.1.test
13556          @@@DEnt:
13557            @@@@test:value:
13558              <?xml version="1.1"?>
13559              <a:b/>
13560          @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 6); }
13561        @@XMLTest:
13562          @@@QName: xp.name.attr.1.0.2.test
13563          @@@DEnt:
13564            @@@@test:value:
13565              <?xml version="1.0"?>
13566              <a $u3001$u3002=""/>
13567          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 4)..(2, 5); }
13568        @@XMLTest:
13569          @@@QName: xp.name.attr.1.1.2.test
13570          @@@DEnt:
13571            @@@@test:value:
13572              <?xml version="1.1"?>
13573              <a $u3001$u3002=""/>
13574          @@@test:domTree:
13575            document {
13576              xml-version: '1.1';
13577              element {
13578                attribute {
13579                  node-name: U+3001 U+3002;
13580                }
13581              }
13582            }
13583        @@XMLTest:
13584          @@@QName: xp.name.attr.1.0.3.test
13585          @@@DEnt:
13586            @@@@test:value:
13587              <?xml version="1.0"?>
13588              <a $u3005b=""/>
13589          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (2, 4)..(2, 5); }
13590        @@XMLTest:
13591          @@@QName: xp.name.attr.1.1.3.test
13592          @@@DEnt:
13593            @@@@test:value:
13594              <?xml version="1.1"?>
13595              <a $u3005b=""/>
13596          @@@test:domTree:
13597            document {
13598              xml-version: '1.1';
13599              element {
13600                attribute {
13601                  node-name: U+3005 'b';
13602                }
13603              }
13604            }
13605        @@XMLTest:
13606          @@@QName: xp.name.attr.names.1.0.1.test
13607          @@@DEnt:
13608            @@@@test:value:
13609              <?xml version="1.0"?>
13610              <a a:b=""/>
13611          @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 11); }
13612        @@XMLTest:
13613          @@@QName: xp.name.attr.names.1.1.1.test
13614          @@@DEnt:
13615            @@@@test:value:
13616              <?xml version="1.1"?>
13617              <a a:b=""/>
13618          @@@c:erred: <[[xp|nsc-prefix-declared]]>{ (2, 1)..(2, 11); }
13619        @@XMLTest:
13620          @@@QName: xp.name.attr.names.1.0.2.test
13621          @@@DEnt:
13622            @@@@test:value:
13623              <?xml version="1.0"?>
13624              <a :ab=""/>
13625          @@@c:erred: <[[xp|nswf-legal-qname]]>{ (2, 4)..(2, 6); }
13626          @@@c:erred: <[[xp|nsc-prefix-declared]]> { }
13627        @@XMLTest:
13628          @@@QName: xp.name.attr.names.1.1.2.test
13629          @@@DEnt:
13630            @@@@test:value:
13631              <?xml version="1.1"?>
13632              <a :ab=""/>
13633          @@@c:erred: <[[xp|nswf-legal-qname]]>{ (2, 4)..(2, 6); }
13634          @@@c:erred: <[[xp|nsc-prefix-declared]]> { }
13635        @@XMLTest:
13636          @@@QName: xp.name.attlist.1.0.2.test
13637          @@@DEnt:
13638            @@@@test:value:
13639              <?xml version="1.0"?>
13640              <!DOCTYPE p [
13641              <!NOTATION $u3001$u3002 SYSTEM "n">
13642              <!ATTLIST $u3001$u3002
13643              $u3001$u3002
13644              NOTATION
13645              ($u3001$u3002)
13646              #IMPLIED>
13647              ]><p/>
13648          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13649          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 11)..(4, 12); }
13650          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 1)..(5, 2); }
13651          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (7, 2)..(7, 3); }
13652        @@XMLTest:
13653          @@@QName: xp.name.attlist.1.1.2.test
13654          @@@DEnt:
13655            @@@@test:value:
13656              <?xml version="1.1"?>
13657              <!DOCTYPE p [
13658              <!NOTATION $u3001$u3002 SYSTEM "n">
13659              <!ATTLIST $u3001$u3002
13660              $u3001$u3002
13661              NOTATION
13662              ($u3001$u3002)
13663              #IMPLIED>
13664              ]><p/>
13665          @@@test:domTree:
13666            document {
13667              xml-version: '1.1';
13668              document-type {
13669                notation {
13670                  node-name: U+3001 U+3002;
13671                }
13672                element-type-definition {
13673                  node-name: U+3001 U+3002;
13674                  attribute-definition {
13675                    node-name: U+3001 U+3002;
13676                    allowed-tokens: DOMStringList (U+3001 U+3002);
13677                  }
13678                }
13679              }
13680              element { }
13681            }
13682        @@XMLTest:
13683          @@@QName: xp.name.attlist.1.0.3.test
13684          @@@DEnt:
13685            @@@@test:value:
13686              <?xml version="1.0"?>
13687              <!DOCTYPE p [
13688              <!NOTATION $u3005b SYSTEM "n">
13689              <!ATTLIST $u3005b
13690              $u3005b
13691              NOTATION
13692              ($u3005b)
13693              #IMPLIED>
13694              ]><p/>
13695          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13696          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 11)..(4, 12); }
13697          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 1)..(5, 2); }
13698          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (7, 2)..(7, 3); }
13699        @@XMLTest:
13700          @@@QName: xp.name.attlist.1.1.3.test
13701          @@@DEnt:
13702            @@@@test:value:
13703              <?xml version="1.1"?>
13704              <!DOCTYPE p [
13705              <!NOTATION $u3005b SYSTEM "n">
13706              <!ATTLIST $u3005b
13707              $u3005b
13708              NOTATION
13709              ($u3005b)
13710              #IMPLIED>
13711              ]><p/>
13712          @@@test:domTree:
13713            document {
13714              xml-version: '1.1';
13715              document-type {
13716                notation {
13717                  node-name: U+3005 'b';
13718                }
13719                element-type-definition {
13720                  node-name: U+3005 'b';
13721                  attribute-definition {
13722                    node-name: U+3005 'b';
13723                    allowed-tokens: DOMStringList (U+3005 'b');
13724                  }
13725                }
13726              }
13727              element { }
13728            }
13729        @@XMLTest:
13730          @@@QName: xp.name.attlist.names.1.0.1.test
13731          @@@DEnt:
13732            @@@@test:value:
13733              <?xml version="1.0"?>
13734              <!DOCTYPE p [
13735              <!NOTATION a:b SYSTEM "n">
13736              <!ATTLIST a:b
13737              a:b
13738              NOTATION
13739              (a:b)
13740              #IMPLIED>
13741              ]><p/>
13742          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13743          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13744        @@XMLTest:
13745          @@@QName: xp.name.attlist.names.1.1.1.test
13746          @@@DEnt:
13747            @@@@test:value:
13748              <?xml version="1.1"?>
13749              <!DOCTYPE p [
13750              <!NOTATION a:b SYSTEM "n">
13751              <!ATTLIST a:b
13752              a:b
13753              NOTATION
13754              (a:b)
13755              #IMPLIED>
13756              ]><p/>
13757          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13758          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13759        @@XMLTest:
13760          @@@QName: xp.name.attlist.names.1.0.2.test
13761          @@@DEnt:
13762            @@@@test:value:
13763              <?xml version="1.0"?>
13764              <!DOCTYPE p [
13765              <!NOTATION :ab SYSTEM "n">
13766              <!ATTLIST :ab
13767              :ab
13768              NOTATION
13769              (:ab)
13770              #IMPLIED>
13771              ]><p/>
13772          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13773          @@@c:erred: <[[xp|nswf-legal-qname]]>{ (4, 11)..(4, 13); }
13774          @@@c:erred: <[[xp|nswf-legal-qname]]>{ (5, 1)..(5, 3); }
13775          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13776        @@XMLTest:
13777          @@@QName: xp.name.attlist.names.1.1.2.test
13778          @@@DEnt:
13779            @@@@test:value:
13780              <?xml version="1.1"?>
13781              <!DOCTYPE p [
13782              <!NOTATION :ab SYSTEM "n">
13783              <!ATTLIST :ab
13784              :ab
13785              NOTATION
13786              (:ab)
13787              #IMPLIED>
13788              ]><p/>
13789          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13790          @@@c:erred: <[[xp|nswf-legal-qname]]>{ (4, 11)..(4, 13); }
13791          @@@c:erred: <[[xp|nswf-legal-qname]]>{ (5, 1)..(5, 3); }
13792          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (7, 2)..(7, 4); }
13793        @@XMLTest:
13794          @@@QName: xp.name.gent.1.0.2.test
13795          @@@DEnt:
13796            @@@@test:value:
13797              <?xml version="1.0"?>
13798              <!DOCTYPE p [
13799              <!ENTITY $u3001$u3002 "n">
13800              ]>
13801              <p a="&$u3001$u3002;">
13802              &$u3001$u3002;
13803              </p>
13804          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 10)..(3, 11); }
13805          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 8)..(5, 9); }
13806          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (6, 2)..(6, 3); }
13807        @@XMLTest:
13808          @@@QName: xp.name.ger.1.1.2.test
13809          @@@DEnt:
13810            @@@@test:value:
13811              <?xml version="1.1"?>
13812              <!DOCTYPE p [
13813              <!ENTITY $u3001$u3002 "n">
13814              ]>
13815              <p a="&$u3001$u3002;">$
13816              &$u3001$u3002;$
13817              </p>
13818          @@@test:domTree:
13819            document {
13820              xml-version: '1.1';
13821              document-type {
13822                general-entity {
13823                  node-name: U+3001 U+3002;
13824                }
13825              }
13826              element {
13827                attribute {
13828                  node-name: 'a';
13829                  general-entity-reference {
13830                    node-name: U+3001 U+3002;
13831                  }
13832                }
13833                general-entity-reference {
13834                  node-name: U+3001 U+3002;
13835                }
13836              }
13837            }
13838        @@XMLTest:
13839          @@@QName: xp.name.ger.1.0.3.test
13840          @@@DEnt:
13841            @@@@test:value:
13842              <?xml version="1.0"?>
13843              <!DOCTYPE p [
13844              <!ENTITY $u3005b "n">
13845              ]>
13846              <p a="&$u3005b;">
13847              &$u3005b;
13848              </p>
13849          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 10)..(3, 11); }
13850          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (5, 8)..(5, 9); }
13851          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (6, 2)..(6, 3); }
13852        @@XMLTest:
13853          @@@QName: xp.name.ger.1.1.3.test
13854          @@@DEnt:
13855            @@@@test:value:
13856              <?xml version="1.1"?>
13857              <!DOCTYPE p [
13858              <!ENTITY $u3005b "n">
13859              ]>
13860              <p a="&$u3005b;">$
13861              &$u3005b;$
13862              </p>
13863          @@@test:domTree:
13864            document {
13865              xml-version: '1.1';
13866              document-type {
13867                general-entity {
13868                  node-name: U+3005 'b';
13869                }
13870              }
13871              element {
13872                attribute {
13873                  node-name: 'a';
13874                  general-entity-reference {
13875                    node-name: U+3005 'b';
13876                  }
13877                }
13878                general-entity-reference {
13879                  node-name: U+3005 'b';
13880                }
13881              }
13882            }
13883        @@XMLTest:
13884          @@@QName: xp.name.ger.names.1.0.1.test
13885          @@@DEnt:
13886            @@@@test:value:
13887              <?xml version="1.0"?>
13888              <!DOCTYPE p [
13889              <!ENTITY a:b "n">
13890              ]>
13891              <p a="&a:b;">
13892              &a:b;
13893              </p>
13894          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 10)..(3, 12); }
13895          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (5, 8)..(5, 10); }
13896          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (6, 2)..(6, 4); }
13897        @@XMLTest:
13898          @@@QName: xp.name.ger.names.1.1.1.test
13899          @@@DEnt:
13900            @@@@test:value:
13901              <?xml version="1.1"?>
13902              <!DOCTYPE p [
13903              <!ENTITY a:b "n">
13904              ]>
13905              <p a="&a:b;">
13906              &a:b;
13907              </p>
13908          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 10)..(3, 12); }
13909          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (5, 8)..(5, 10); }
13910          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (6, 2)..(6, 4); }
13911        @@XMLTest:
13912          @@@QName: xp.name.ndata.1.0.2.test
13913          @@@DEnt:
13914            @@@@test:value:
13915              <?xml version="1.0"?>
13916              <!DOCTYPE p [
13917              <!NOTATION $u3001$u3002 SYSTEM "n">
13918              <!ENTITY e SYSTEM "s" NDATA $u3001$u3002>
13919              ]><p/>
13920          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13921          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 29)..(4, 30); }
13922        @@XMLTest:
13923          @@@QName: xp.name.ndata.1.1.2.test
13924          @@@DEnt:
13925            @@@@test:value:
13926              <?xml version="1.1"?>
13927              <!DOCTYPE p [
13928              <!NOTATION $u3001$u3002 SYSTEM "n">
13929              <!ENTITY e SYSTEM "s" NDATA $u3001$u3002>
13930              ]><p/>
13931          @@@test:domTree:
13932            document {
13933              xml-version: '1.1';
13934              document-type {
13935                notation {
13936                  node-name: U+3001 U+3002;
13937                }
13938                general-entity {
13939                  node-name: 'e';
13940                  notation-name: U+3001 U+3002;
13941                }
13942              }
13943              element { }
13944            }
13945        @@XMLTest:
13946          @@@QName: xp.name.ndata.1.0.3.test
13947          @@@DEnt:
13948            @@@@test:value:
13949              <?xml version="1.0"?>
13950              <!DOCTYPE p [
13951              <!NOTATION $u3005b SYSTEM "n">
13952              <!ENTITY e SYSTEM "s" NDATA $u3005b>
13953              ]><p/>
13954          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (3, 12)..(3, 13); }
13955          @@@c:erred: <[[xp|wf-invalid-character-in-node-name]]>{ (4, 29)..(4, 30); }
13956        @@XMLTest:
13957          @@@QName: xp.name.ndata.1.1.3.test
13958          @@@DEnt:
13959            @@@@test:value:
13960              <?xml version="1.1"?>
13961              <!DOCTYPE p [
13962              <!NOTATION $u3005b SYSTEM "n">
13963              <!ENTITY e SYSTEM "s" NDATA $u3005b>
13964              ]><p/>
13965          @@@test:domTree:
13966            document {
13967              xml-version: '1.1';
13968              document-type {
13969                notation {
13970                  node-name: U+3005 'b';
13971                }
13972                general-entity {
13973                  node-name: 'e';
13974                  notation-name: U+3005 'b';
13975                }
13976              }
13977              element { }
13978            }
13979        @@XMLTest:
13980          @@@QName: xp.name.ndata.names.1.0.1.test
13981          @@@DEnt:
13982            @@@@test:value:
13983              <?xml version="1.0"?>
13984              <!DOCTYPE p [
13985              <!NOTATION a:b SYSTEM "n">
13986              <!ENTITY e SYSTEM "s" NDATA a:b>
13987              ]><p/>
13988          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
13989          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (4, 29)..(4, 31); }
13990        @@XMLTest:
13991          @@@QName: xp.name.ndata.names.1.1.1.test
13992          @@@DEnt:
13993            @@@@test:value:
13994              <?xml version="1.1"?>
13995              <!DOCTYPE p [
13996              <!NOTATION a:b SYSTEM "n">
13997              <!ENTITY e SYSTEM "s" NDATA a:b>
13998              ]><p/>
13999          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (3, 12)..(3, 14); }
14000          @@@c:erred: <[[xp|nswf-legal-ncname]]>{ (4, 29)..(4, 31); }
14001    
14002        @@enImplNote:
14003          @@@ddid: wf-invalid-character-in-node-name
14004          @@@@:
14005            {ISSUE::
14006              {P:: Tests required for:
14007    
14008                - <CODE::Name> in element type declaration
14009    
14010                - <CODE::Name> in model group
14011    
14012                - <CODE::Name> in parameter entity declaration
14013    
14014                - <CODE::Name> in parameter entity reference
14015    
14016              }
14017            }
14018    
14019        @@XMLTest:
14020          @@@QName: xp.NOTATION.1.test
14021          @@@DEnt:
14022            @@@@test:value:
14023              <!DOCTYPE p [
14024              <!NOTATION n SYSTEM "m">
14025              ]><p/>
14026          @@@test:domTree:
14027            document {
14028              document-type {
14029                notation {
14030                  node-name: 'n';
14031                  public-id: null;
14032                  system-id: 'm';
14033                }
14034              }
14035              element { }
14036            }
14037        @@XMLTest:
14038          @@@QName: xp.NOTATION.2.test
14039          @@@DEnt:
14040            @@@@test:value:
14041              <!DOCTYPE p [
14042              <!NOTATION n PUBLIC "m">
14043              ]><p/>
14044          @@@test:domTree:
14045            document {
14046              document-type {
14047                notation {
14048                  node-name: 'n';
14049                  system-id: null;
14050                  public-id: 'm';
14051                }
14052              }
14053              element { }
14054            }
14055        @@XMLTest:
14056          @@@QName: xp.NOTATION.3.test
14057          @@@DEnt:
14058            @@@@test:value:
14059              <!DOCTYPE p [
14060              <!NOTATION n PUBLIC "m" "l">
14061              ]><p/>
14062          @@@test:domTree:
14063            document {
14064              document-type {
14065                notation {
14066                  node-name: 'n';
14067                  public-id: 'm';
14068                  system-id: 'l';
14069                }
14070              }
14071              element { }
14072            }
14073        @@XMLTest:
14074          @@@QName: xp.NOTATION.4.test
14075          @@@DEnt:
14076            @@@@test:value:
14077              <!DOCTYPE p [
14078              <!NOTATION n SYSTEM "m">
14079              <!NOTATION n SYSTEM "l">
14080              ]><p/>
14081          @@@c:erred: <[[xp|vc-unique-notation-name]]> { (3, 1)..(3, 24); }
14082          @@@test:domTree:
14083            document {
14084              document-type {
14085                notation {
14086                  node-name: 'n';
14087                  system-id: 'm';
14088                }
14089              }
14090              element { }
14091            }
14092    
14093        @@XMLTest:
14094          @@@QName: xp.names.1.test
14095          @@@DEnt:
14096            @@@@test:value:
14097              <p xmlns="http://1.example/" a="b"/>
14098          @@@test:domTree:
14099            document {
14100              element {
14101                prefix: null;
14102                local-name: 'p';
14103                namespace-uri: 'http://1.example/';
14104                attribute {
14105                  prefix: null;
14106                  local-name: 'xmlns';
14107                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14108                  specified: true;
14109                }
14110                attribute {
14111                  prefix: null;
14112                  local-name: 'a';
14113                  specified: true;
14114                }
14115              }
14116            }
14117        @@XMLTest:
14118          @@@QName: xp.names.2.test
14119          @@@DEnt:
14120            @@@@test:value:
14121              <p xmlns:a="http://1.example/" a="b" a:a="c"/>
14122          @@@test:domTree:
14123            document {
14124              element {
14125                prefix: null;
14126                local-name: 'p';
14127                namespace-uri: null;
14128                attribute {
14129                  prefix: 'xmlns';
14130                  local-name: 'a';
14131                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14132                  specified: true;
14133                }
14134                attribute {
14135                  prefix: null;
14136                  local-name: 'a';
14137                  specified: true;
14138                }
14139                attribute {
14140                  prefix: 'a';
14141                  local-name: 'a';
14142                  namespace-uri: 'http://1.example/';
14143                  specified: true;
14144                }
14145              }
14146            }
14147        @@XMLTest:
14148          @@@QName: xp.names.3.test
14149          @@@DEnt:
14150            @@@@test:value:
14151              <a:p xmlns:a="http://1.example/" a="b" a:a="c"/>
14152          @@@test:domTree:
14153            document {
14154              element {
14155                prefix: 'a';
14156                local-name: 'p';
14157                namespace-uri: 'http://1.example/';
14158                attribute {
14159                  prefix: 'xmlns';
14160                  local-name: 'a';
14161                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14162                  specified: true;
14163                }
14164                attribute {
14165                  prefix: null;
14166                  local-name: 'a';
14167                  specified: true;
14168                }
14169                attribute {
14170                  prefix: 'a';
14171                  local-name: 'a';
14172                  namespace-uri: 'http://1.example/';
14173                  specified: true;
14174                }
14175              }
14176            }
14177        @@XMLTest:
14178          @@@QName: xp.names.5.test
14179          @@@DEnt:
14180            @@@@test:value:
14181              <p xmlns:a="http://1.example/">$
14182              <a:q/>$
14183              </p>
14184          @@@test:domTree:
14185            document {
14186              element {
14187                prefix: null;
14188                local-name: 'p';
14189                namespace-uri: null;
14190                attribute {
14191                  prefix: 'xmlns';
14192                  local-name: 'a';
14193                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14194                  specified: true;
14195                }
14196                element {
14197                  prefix: 'a';
14198                  local-name: 'q';
14199                  namespace-uri: 'http://1.example/';
14200                }
14201              }
14202            }
14203        @@XMLTest:
14204          @@@QName: xp.names.6.test
14205          @@@DEnt:
14206            @@@@test:value:
14207              <p xmlns:a="http://1.example/">$
14208              <q a:b="c"/>$
14209              </p>
14210          @@@test:domTree:
14211            document {
14212              element {
14213                prefix: null;
14214                local-name: 'p';
14215                namespace-uri: null;
14216                attribute {
14217                  prefix: 'xmlns';
14218                  local-name: 'a';
14219                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14220                  specified: true;
14221                }
14222                element {
14223                  prefix: null;
14224                  local-name: 'q';
14225                  namespace-uri: null;
14226                  attribute {
14227                    prefix: 'a';
14228                    local-name: 'b';
14229                    namespace-uri: 'http://1.example/';
14230                    specified: true;
14231                  }
14232                }
14233              }
14234            }
14235        @@XMLTest:
14236          @@@QName: xp.names.7.test
14237          @@@DEnt:
14238            @@@@test:value:
14239              <p xmlns:a="http://1.example/">$
14240              <q a:b="c" xmlns:a="http://2.example/"/>$
14241              </p>
14242          @@@test:domTree:
14243            document {
14244              element {
14245                prefix: null;
14246                local-name: 'p';
14247                namespace-uri: null;
14248                attribute {
14249                  prefix: 'xmlns';
14250                  local-name: 'a';
14251                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14252                  specified: true;
14253                }
14254                element {
14255                  prefix: null;
14256                  local-name: 'q';
14257                  namespace-uri: null;
14258                  attribute {
14259                    prefix: 'a';
14260                    local-name: 'b';
14261                    namespace-uri: 'http://2.example/';
14262                    specified: true;
14263                  }
14264                  attribute {
14265                    prefix: 'xmlns';
14266                    local-name: 'a';
14267                    namespace-uri: 'http://www.w3.org/2000/xmlns/';
14268                    specified: true;
14269                  }
14270                }
14271              }
14272            }
14273    
14274        @@XMLTest:
14275          @@@QName: xp.names.undeclare.1.test
14276          @@@DEnt:
14277            @@@@test:value:
14278              <p xmlns="http://1.example/">$
14279              <q xmlns="">$
14280              <r xmlns="http://2.example/"/>$
14281              </q>$
14282              </p>
14283          @@@test:domTree:
14284            document {
14285              element {
14286                prefix: null;
14287                local-name: 'p';
14288                namespace-uri: 'http://1.example/';
14289                attribute {
14290                  prefix: null;
14291                  local-name: 'xmlns';
14292                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14293                  specified: true;
14294                }
14295                element {
14296                  prefix: null;
14297                  local-name: 'q';
14298                  namespace-uri: null;
14299                  attribute {
14300                    prefix: null;
14301                    local-name: 'xmlns';
14302                    namespace-uri: 'http://www.w3.org/2000/xmlns/';
14303                    specified: true;
14304                  }
14305                  element {
14306                    prefix: null;
14307                    local-name: 'r';
14308                    namespace-uri: 'http://2.example/';
14309                    attribute {
14310                      prefix: null;
14311                      local-name: 'xmlns';
14312                      namespace-uri: 'http://www.w3.org/2000/xmlns/';
14313                      specified: true;
14314                    }
14315                  }
14316                }
14317              }
14318            }
14319    
14320        @@XMLTest:
14321          @@@QName: xp.names.undeclare.1.0.1.test
14322          @@@DEnt:
14323            @@@@test:value:
14324              <?xml version="1.0"?>
14325              <a:p xmlns:a="http://1.example/">$
14326              <q xmlns:a="">$
14327              <a:r xmlns:a="http://2.example/"/>$
14328              </q>$
14329              </a:p>
14330          @@@c:erred: <[[xp|nswf-empty-namespace-name]]> { (2, 34)..(2, 47); }
14331        @@XMLTest:
14332          @@@QName: xp.names.undeclare.1.1.1.test
14333          @@@DEnt:
14334            @@@@test:value:
14335              <?xml version="1.1"?>
14336              <a:p xmlns:a="http://1.example/">$
14337              <q xmlns:a="">$
14338              <a:r xmlns:a="http://2.example/"/>$
14339              </q>$
14340              </a:p>
14341          @@@test:domTree:
14342            document {
14343              element {
14344                prefix: 'a';
14345                local-name: 'p';
14346                namespace-uri: 'http://1.example/';
14347                attribute {
14348                  prefix: 'xmlns';
14349                  local-name: 'a';
14350                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14351                  specified: true;
14352                }
14353                element {
14354                  prefix: null;
14355                  local-name: 'q';
14356                  namespace-uri: null;
14357                  attribute {
14358                    prefix: 'xmlns';
14359                    local-name: 'a';
14360                    namespace-uri: 'http://www.w3.org/2000/xmlns/';
14361                    specified: true;
14362                  }
14363                  element {
14364                    prefix: 'a';
14365                    local-name: 'r';
14366                    namespace-uri: 'http://2.example/';
14367                    attribute {
14368                      prefix: 'xmlns';
14369                      local-name: 'a';
14370                      namespace-uri: 'http://www.w3.org/2000/xmlns/';
14371                      specified: true;
14372                    }
14373                  }
14374                }
14375              }
14376            }
14377        @@XMLTest:
14378          @@@QName: xp.names.undeclare.1.1.2.test
14379          @@@DEnt:
14380            @@@@test:value:
14381              <?xml version="1.1"?>
14382              <a:p xmlns:a="http://1.example/">$
14383              <q xmlns:a="">$
14384              <a:r/>$
14385              </q>$
14386              </a:p>
14387          @@@c:erred: <[[xp|nsc-prefix-declared]]> { (2, 48)..(2, 53); }
14388    
14389        @@XMLTest:
14390          @@@QName: xp.names.xml.prefix.1.test
14391          @@@DEnt:
14392            @@@@test:value:
14393              <a xmlns:xml="http://www.w3.org/XML/1998/namespace"/>
14394          @@@test:domTree:
14395            document {
14396              element {
14397                attribute {
14398                  prefix: 'xmlns';
14399                  local-name: 'xml';
14400                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14401                }
14402              }
14403            }
14404        @@XMLTest:
14405          @@@QName: xp.names.xml.prefix.2.test
14406          @@@DEnt:
14407            @@@@test:value:
14408              <a xmlns:xml="a"/>
14409          @@@c:erred: <[[xp|nsc-reserved-prefix-xml]]> { (1, 1)..(1, 18); }
14410        @@XMLTest:
14411          @@@QName: xp.names.xml.prefix.3.test
14412          @@@DEnt:
14413            @@@@test:value:
14414              <a xmlns:a="http://www.w3.org/XML/1998/namespace"
14415              />
14416          @@@c:erred: <[[xp|nsc-reserved-namespace-name-xml]]> { (1, 1)..(2, 2); }
14417        @@XMLTest:
14418          @@@QName: xp.names.xml.prefix.4.test
14419          @@@DEnt:
14420            @@@@test:value:
14421              <a xml:lang="ja"/>
14422          @@@test:domTree:
14423            document {
14424              element {
14425                attribute {
14426                  prefix: 'xml';
14427                  local-name: 'lang';
14428                  namespace-uri: 'http://www.w3.org/XML/1998/namespace';
14429                }
14430              }
14431            }
14432    
14433        @@XMLTest:
14434          @@@QName: xp.names.prefix.declared.1.test
14435          @@@DEnt:
14436            @@@@test:value:
14437              <!DOCTYPE a [
14438              <!ATTLIST a
14439              b:c CDATA "d"
14440              >
14441              ]>
14442              <a/>
14443          @@@c:erred: <[[xp|nsc-prefix-declared]]> { (6, 1)..(6, 4); }
14444    
14445        @@XMLTest:
14446          @@@QName: xp.names.xmlns.reserved.1.test
14447          @@@DEnt:
14448            @@@@test:value:
14449              <a xmlns:xmlns="http://www.w3.org/2000/xmlns/"
14450              />
14451          @@@c:erred: <[[xp|nsc-reserved-prefix-xmlns]]> { (1, 1)..(2, 2); }
14452          @@@c:erred: <[[xp|nsc-reserved-namespace-name-xmlns]]> { (1, 1)..(2, 2); }
14453        @@XMLTest:
14454          @@@QName: xp.names.xmlns.reserved.2.test
14455          @@@DEnt:
14456            @@@@test:value:
14457              <a xmlns:xmlns="a"
14458              />
14459          @@@c:erred: <[[xp|nsc-reserved-prefix-xmlns]]> { (1, 1)..(2, 2); }
14460        @@XMLTest:
14461          @@@QName: xp.names.xmlns.reserved.3.test
14462          @@@DEnt:
14463            @@@@test:value:
14464              <a xmlns:a="http://www.w3.org/2000/xmlns/"
14465              />
14466          @@@c:erred: <[[xp|nsc-reserved-namespace-name-xmlns]]> { (1, 1)..(2, 2); }
14467    
14468        @@XMLTest:
14469          @@@QName: xp.names.default.1.test
14470          @@@DEnt:
14471            @@@@test:value:
14472              <!DOCTYPE a [
14473              <!ATTLIST a
14474              xmlns CDATA "http://1.example/">
14475              ]>
14476              <a/>
14477          @@@test:domTree:
14478            document {
14479              document-type {
14480                element-type-definition {
14481                  node-name: 'a';
14482                  attribute-definition {
14483                    node-name: 'xmlns';
14484                    node-value: 'http://1.example/';
14485                  }
14486                }
14487              }
14488              element {
14489                prefix: null;
14490                local-name: 'a';
14491                namespace-uri: 'http://1.example/';
14492                attribute {
14493                  prefix: null;
14494                  local-name: 'xmlns';
14495                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14496                  value: 'http://1.example/';
14497                  specified: false;
14498                }
14499              }
14500            }
14501        @@XMLTest:
14502          @@@QName: xp.names.default.2.test
14503          @@@DEnt:
14504            @@@@test:value:
14505              <!DOCTYPE a [
14506              <!ATTLIST a
14507              xmlns CDATA "http://1.example/">
14508              ]>
14509              <a xmlns="http://2.example/"/>
14510          @@@test:domTree:
14511            document {
14512              document-type {
14513                element-type-definition {
14514                  node-name: 'a';
14515                  attribute-definition {
14516                    node-name: 'xmlns';
14517                    node-value: 'http://1.example/';
14518                  }
14519                }
14520              }
14521              element {
14522                prefix: null;
14523                local-name: 'a';
14524                namespace-uri: 'http://2.example/';
14525                attribute {
14526                  prefix: null;
14527                  local-name: 'xmlns';
14528                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14529                  value: 'http://2.example/';
14530                  specified: true;
14531                }
14532              }
14533            }
14534        @@XMLTest:
14535          @@@QName: xp.names.default.3.test
14536          @@@DEnt:
14537            @@@@test:value:
14538              <!DOCTYPE b:a [
14539              <!ATTLIST b:a
14540              xmlns:b CDATA "http://1.example/">
14541              ]>
14542              <b:a/>
14543          @@@test:domTree:
14544            document {
14545              document-type {
14546                element-type-definition {
14547                  node-name: 'b:a';
14548                  attribute-definition {
14549                    node-name: 'xmlns:b';
14550                    node-value: 'http://1.example/';
14551                  }
14552                }
14553              }
14554              element {
14555                prefix: 'b';
14556                local-name: 'a';
14557                namespace-uri: 'http://1.example/';
14558                attribute {
14559                  prefix: 'xmlns';
14560                  local-name: 'b';
14561                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14562                  value: 'http://1.example/';
14563                  specified: false;
14564                }
14565              }
14566            }
14567        @@XMLTest:
14568          @@@QName: xp.names.default.4.test
14569          @@@DEnt:
14570            @@@@test:value:
14571              <!DOCTYPE b:a [
14572              <!ATTLIST b:a
14573              xmlns:b CDATA "http://1.example/">
14574              ]>
14575              <b:a xmlns:b="http://2.example/"/>
14576          @@@test:domTree:
14577            document {
14578              document-type {
14579                element-type-definition {
14580                  node-name: 'b:a';
14581                  attribute-definition {
14582                    node-name: 'xmlns:b';
14583                    node-value: 'http://1.example/';
14584                  }
14585                }
14586              }
14587              element {
14588                prefix: 'b';
14589                local-name: 'a';
14590                namespace-uri: 'http://2.example/';
14591                attribute {
14592                  prefix: 'xmlns';
14593                  local-name: 'b';
14594                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14595                  value: 'http://2.example/';
14596                  specified: true;
14597                }
14598              }
14599            }
14600        @@XMLTest:
14601          @@@QName: xp.names.default.5.test
14602          @@@DEnt:
14603            @@@@test:value:
14604              <!DOCTYPE a [
14605              <!ATTLIST a
14606              xmlns:b CDATA "http://1.example/"
14607              b:c CDATA "http://1.example/">
14608              ]>
14609              <a xmlns:b="http://2.example/"/>
14610          @@@test:domTree:
14611            document {
14612              document-type {
14613                element-type-definition {
14614                  node-name: 'a';
14615                  attribute-definition {
14616                    node-name: 'xmlns:b';
14617                    text-content: 'http://1.example/';
14618                  }
14619                  attribute-definition {
14620                    node-name: 'b:c';
14621                    text-content: 'http://1.example/';
14622                  }
14623                }
14624              }
14625              element {
14626                prefix: null;
14627                local-name: 'a';
14628                namespace-uri: null;
14629                attribute {
14630                  prefix: 'xmlns';
14631                  local-name: 'b';
14632                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14633                  value: 'http://2.example/';
14634                  specified: true;
14635                }
14636                attribute {
14637                  prefix: 'b';
14638                  local-name: 'c';
14639                  namespace-uri: 'http://2.example/';
14640                  specified: false;
14641                }
14642              }
14643            }
14644    
14645        @@XMLTest:
14646          @@@QName: xp.names.unique.1.test
14647          @@@DEnt:
14648            @@@@test:value:
14649              <a
14650              xmlns:b="http://2.example/"
14651              xmlns:c="http://2.example/"
14652              b:d=""
14653              c:d=""
14654              />
14655          @@@c:erred: <[[xp|nswf-unique-att-spec-expanded-name]]> { (1, 1)..(6, 2); }
14656        @@XMLTest:
14657          @@@QName: xp.names.unique.2.test
14658          @@@DEnt:
14659            @@@@test:value:
14660              <!DOCTYPE a [
14661              <!ATTLIST a
14662              c:d CDATA ""
14663              >
14664              ]>
14665              <a
14666              xmlns:b="http://2.example/"
14667              xmlns:c="http://2.example/"
14668              b:d=""
14669              />
14670          @@@c:erred: <[[xp|nswf-unique-att-spec-expanded-name]]> { (6, 1)..(10, 2);}
14671        @@XMLTest:
14672          @@@QName: xp.names.unique.3.test
14673          @@@DEnt:
14674            @@@@test:value:
14675              <!DOCTYPE a [
14676              <!ATTLIST a
14677              c:d CDATA "value1"
14678              >
14679              ]>
14680              <a
14681              xmlns:c="http://2.example/"
14682              c:d="value2"
14683              />
14684          @@@test:domTree:
14685            document {
14686              document-type { }
14687              element {
14688                attribute {
14689                  prefix: 'xmlns';
14690                  local-name: 'c';
14691                  namespace-uri: 'http://www.w3.org/2000/xmlns/';
14692                  specified: true;
14693                }
14694                attribute {
14695                  prefix: 'c';
14696                  local-name: 'd';
14697                  namespace-uri: 'http://2.example/';
14698                  value: 'value2';
14699                  specified: true;
14700                }
14701              }
14702            }
14703    
14704        @@XMLTest:
14705          @@@QName: xp.names.normalize.1.test
14706          @@@DEnt:
14707            @@@@test:value:
14708              <!DOCTYPE a [
14709              <!ATTLIST a
14710              xmlns NMTOKEN #IMPLIED
14711              >
14712              ]>
14713              <a xmlns="  "/>
14714          @@@test:domTree:
14715            document {
14716              document-type { }
14717              element {
14718                namespace-uri: null;
14719                prefix: null;
14720                local-name: 'a';
14721              }
14722            }
14723        @@XMLTest:
14724          @@@QName: xp.names.normalize.2.test
14725          @@@DEnt:
14726            @@@@test:value:
14727              <!DOCTYPE a [
14728              <!ATTLIST a
14729              xmlns NMTOKEN #IMPLIED
14730              >
14731              ]>
14732              <a xmlns="  about:blank  "/>
14733          @@@test:domTree:
14734            document {
14735              document-type { }
14736              element {
14737                namespace-uri: 'about:blank';
14738                prefix: null;
14739                local-name: 'a';
14740              }
14741            }
14742        @@XMLTest:
14743          @@@QName: xp.names.normalize.3.test
14744          @@@DEnt:
14745            @@@@test:value:
14746              <!DOCTYPE a:a [
14747              <!ATTLIST a:a
14748              xmlns:a NMTOKEN #IMPLIED
14749              >
14750              ]>
14751              <a:a xmlns:a=" about:blank  "/>
14752          @@@test:domTree:
14753            document {
14754              document-type { }
14755              element {
14756                namespace-uri: 'about:blank';
14757                prefix: 'a';
14758                local-name: 'a';
14759              }
14760            }
14761    
14762        @@XMLTest:
14763          @@@QName: xp.no.baseuri.test
14764          @@@DEnt:
14765            @@@@test:value:
14766              <p/>
14767          @@@test:domTree:
14768            document {
14769              document-uri: null;
14770              base-uri: null;
14771              element {
14772                node-name: 'p';
14773                base-uri: null;
14774              }
14775            }
14776        @@XMLTest:
14777          @@@QName: xp.docuri.no.baseuri.test
14778          @@@DEnt:
14779            @@@@test:uri:
14780              http://www.example.com/
14781            @@@@test:value:
14782              <p/>
14783          @@@test:domTree:
14784            document {
14785              document-uri: 'http://www.example.com/';
14786              base-uri: 'http://www.example.com/';
14787              element {
14788                node-name: 'p';
14789                base-uri: 'http://www.example.com/';
14790              }
14791            }
14792        @@XMLTest:
14793          @@@QName: xp.docuri.baseuri.test
14794          @@@DEnt:
14795            @@@@test:uri:
14796              http://www.example.com/
14797            @@@@test:baseURI:
14798              ftp://ftp.example.com/
14799            @@@@test:value:
14800              <p/>
14801          @@@test:domTree:
14802            document {
14803              document-uri: 'http://www.example.com/';
14804              base-uri: 'ftp://ftp.example.com/';
14805              element {
14806                node-name: 'p';
14807                base-uri: 'ftp://ftp.example.com/';
14808              }
14809            }
14810        @@XMLTest:
14811          @@@QName: xp.doctype.baseuri.test
14812          @@@DEnt:
14813            @@@@test:uri:
14814              http://www.example.com/
14815            @@@@test:baseURI:
14816              ftp://ftp.example.com/
14817            @@@@test:value:
14818              <!DOCTYPE p SYSTEM "sys">
14819              <p/>
14820          @@@test:domTree:
14821            document {
14822              document-uri: 'http://www.example.com/';
14823              base-uri: 'ftp://ftp.example.com/';
14824              document-type {
14825                system-id: 'sys';
14826                manakai-declaration-base-uri: 'ftp://ftp.example.com/';
14827              }
14828              element {
14829                node-name: 'p';
14830                base-uri: 'ftp://ftp.example.com/';
14831              }
14832            }
14833        @@XMLTest:
14834          @@@QName: xp.entdecl.baseuri.test
14835          @@@DEnt:
14836            @@@@test:uri:
14837              http://www.example.com/
14838            @@@@test:baseURI:
14839              ftp://ftp.example.com/
14840            @@@@test:value:
14841              <!DOCTYPE p [
14842                <!ENTITY ent SYSTEM "ent">
14843              ]>
14844              <p/>
14845          @@@test:domTree:
14846            document {
14847              document-uri: 'http://www.example.com/';
14848              base-uri: 'ftp://ftp.example.com/';
14849              document-type {
14850                general-entity {
14851                  node-name: 'ent';
14852                  manakai-declaration-base-uri: 'ftp://ftp.example.com/';
14853                }
14854              }
14855              element {
14856                node-name: 'p';
14857                base-uri: 'ftp://ftp.example.com/';
14858              }
14859            }
14860        @@XMLTest:
14861          @@@QName: xp.notdecl.baseuri.test
14862          @@@DEnt:
14863            @@@@test:uri:
14864              http://www.example.com/
14865            @@@@test:baseURI:
14866              ftp://ftp.example.com/
14867            @@@@test:value:
14868              <!DOCTYPE p [
14869                <!NOTATION not SYSTEM "not">
14870              ]>
14871              <p/>
14872          @@@test:domTree:
14873            document {
14874              document-uri: 'http://www.example.com/';
14875              base-uri: 'ftp://ftp.example.com/';
14876              document-type {
14877                notation {
14878                  node-name: 'not';
14879                  manakai-declaration-base-uri: 'ftp://ftp.example.com/';
14880                }
14881              }
14882              element {
14883                node-name: 'p';
14884                base-uri: 'ftp://ftp.example.com/';
14885              }
14886            }
14887        @@XMLTest:
14888          @@@QName: xp.doctype.intsubset.pi.baseuri.test
14889          @@@DEnt:
14890            @@@@test:uri:
14891              http://www.example.com/
14892            @@@@test:baseURI:
14893              ftp://ftp.example.com/
14894            @@@@test:value:
14895              <!DOCTYPE p [
14896                <?pi?>
14897              ]>
14898              <p/>
14899          @@@test:domTree:
14900            document {
14901              document-uri: 'http://www.example.com/';
14902              base-uri: 'ftp://ftp.example.com/';
14903              document-type {
14904                pi {
14905                  node-name: 'pi';
14906                  base-uri: 'ftp://ftp.example.com/';
14907                }
14908              }
14909              element {
14910                node-name: 'p';
14911                base-uri: 'ftp://ftp.example.com/';
14912              }
14913            }
14914    
14915        @@XMLTest:
14916          @@@QName: xp.xmlid.attr.test
14917          @@@DEnt:
14918            @@@@test:value:
14919              <p xml:id="idv"/>
14920          @@@test:domTree:
14921            document {
14922              element {
14923                attribute {
14924                  node-name: 'xml:id';
14925                  value: 'idv';
14926                  schema-type-info: TypeInfo ('http://www.w3.org/TR/REC-xml',
14927                                              'ID');
14928                  specified: true;
14929                }
14930              }
14931            }
14932        @@XMLTest:
14933          @@@QName: xp.xmlid.attr.norm.test
14934          @@@DEnt:
14935            @@@@test:value:
14936              <p xml:id=" $u000Aidv  "/>
14937          @@@test:domTree:
14938            document {
14939              element {
14940                attribute {
14941                  node-name: 'xml:id';
14942                  value: 'idv';
14943                  schema-type-info: TypeInfo ('http://www.w3.org/TR/REC-xml',
14944                                              'ID');
14945                  specified: true;
14946                }
14947              }
14948            }
14949        @@XMLTest:
14950          @@@QName: xp.xmlid.attrdef.test
14951          @@@DEnt:
14952            @@@@test:value:
14953              <!DOCTYPE p [
14954                <!ATTLIST p xml:id ID #IMPLIED>
14955              ]>
14956              <p/>
14957          @@@test:domTree:
14958            document {
14959              document-type {
14960                element-type-definition {
14961                  node-name: 'p';
14962                  attribute-definition {
14963                    node-name: 'xml:id';
14964                    declared-type: const (ID_ATTR);
14965                    default-type: const (IMPLIED_DEFAULT);
14966                  }
14967                }
14968              }
14969              element { }
14970            }
14971        @@XMLTest:
14972          @@@QName: xp.xmlid.attrdef.defaultattr.test
14973          @@@DEnt:
14974            @@@@test:value:
14975              <!DOCTYPE p [
14976                <!ATTLIST p xml:id ID "idv"><!-- invalid -->
14977              ]>
14978              <p/>
14979          @@@test:domTree:
14980            document {
14981              document-type {
14982                element-type-definition {
14983                  node-name: 'p';
14984                  attribute-definition {
14985                    node-name: 'xml:id';
14986                    declared-type: const (ID_ATTR);
14987                    default-type: const (EXPLICIT_DEFAULT);
14988                    node-value: 'idv';
14989                  }
14990                }
14991              }
14992              element {
14993                attribute {
14994                  node-name: 'xml:id';
14995                  schema-type-info: TypeInfo ('http://www.w3.org/TR/REC-xml',
14996                                              'ID');
14997                  value: 'idv';
14998                  specified: false;
14999                }
15000              }
15001            }
15002    
15003      @@PerlDef:      @@PerlDef:
15004        my $impl = $Message::DOM::ImplementationRegistry->get_implementation ({        my $impl = $Message::DOM::ImplementationRegistry->get_implementation ({
15005          'Core' => '3.0',          'Core' => '3.0',
# Line 6139  ClsDef: Line 15031  ClsDef:
15031            return true; # continue as far as possible            return true; # continue as far as possible
15032          });          });
15033    
15034            my $input = {string_data => \$doc_ent->{<Q::test:value>},
15035                         system_id => $doc_ent->{<Q::test:uri>},
15036                         base_uri => $doc_ent->{<Q::test:baseURI>}};
15037          if ($test_data->{dom_tree}) { # Successful test          if ($test_data->{dom_tree}) { # Successful test
15038              my $doc;
15039            try {            try {
15040              my $doc = $parser->parse_string ($doc_ent->{<H::test:value>});              $doc = $parser->parse ($input);
15041              $test->assert_dom_tree_equals              $test->assert_dom_tree_equals
15042                       (actual_value => $doc,                       (actual_value => $doc,
15043                        expected_hash => $test_data->{dom_tree});                        expected_hash => $test_data->{dom_tree});
# Line 6154  ClsDef: Line 15050  ClsDef:
15050                }                }
15051              }              }
15052              $not_ok ? $test->not_ok : $test->ok;              $not_ok ? $test->not_ok : $test->ok;
15053                undef $doc;
15054            } catch Message::Util::IF::DTException with {            } catch Message::Util::IF::DTException with {
15055              #              require 'manakai/mndebug.pl';
15056                manakai::mndebug::dump ($doc);
15057            } catch Message::DOM::IF::LSException with {            } catch Message::DOM::IF::LSException with {
15058              # not_ok              # not_ok
15059            } otherwise {            } otherwise {
# Line 6164  ClsDef: Line 15062  ClsDef:
15062              $test->not_ok;              $test->not_ok;
15063            };            };
15064          } else {          } else {
15065              my $doc;
15066            try {            try {
15067              my $doc = $parser->parse_string ($doc_ent->{<H::test:value>});              $doc = $parser->parse ($input);
             $test->assert_never;  
15068            } catch Message::Util::IF::DTException with {            } catch Message::Util::IF::DTException with {
15069              #              require 'manakai/mndebug.pl';
15070                manakai::mndebug::dump ($doc);
15071            } catch Message::DOM::IF::LSException with {            } catch Message::DOM::IF::LSException with {
15072              #              #
15073            } otherwise {            } otherwise {
# Line 6189  ClsDef: Line 15088  ClsDef:
15088        }        }
15089    
15090    @ResourceDef:    @ResourceDef:
15091        @@QName: getEmptyEntityState
15092        @@rdf:type: DISPerl|InlineCode
15093        @@ForCheck: ManakaiDOM|ForClass
15094        @@PerlDef:
15095          {reptxt => \'', line => 1, column => 1, pos => 0,
15096           is_externally_declared => true, name => $name,
15097           fh => do {
15098                   open my $empty, '<', \'';
15099                   $empty;
15100                 },
15101           close_file => sub { }}
15102    
15103      @ResourceDef:
15104      @@QName: getCopyOfEntityState      @@QName: getCopyOfEntityState
15105      @@rdf:type: DISPerl|InlineCode      @@rdf:type: DISPerl|InlineCode
15106      @@ForCheck: ManakaiDOM|ForClass      @@ForCheck: ManakaiDOM|ForClass
15107      @@PerlDef:      @@PerlDef:
15108        {%{$self->{$entity_type}->{$entity_name}},        {%{$self->{$entity_type}->{$entity_name}},
15109         line => 1, column => 1, pos => 0}         line => 1, column => 1, pos => 0,
15110           fh => do {
15111                   require IO::String;
15112                   IO::String->new
15113                                (${$self->{$entity_type}->{$entity_name}->{reptxt}});
15114                   ## TODO: External entities.
15115                 },
15116           close_file => sub { }}
15117  ##ManakaiXMLParser  ##ManakaiXMLParser
15118    
15119  ElementTypeBinding:  ElementTypeBinding:
15120      @Name: Test
15121      @ElementType:
15122        dis:ResourceDef
15123      @ShadowContent:
15124        @@ForCheck: ManakaiDOM|ForClass
15125        @@rdf:type: test|StandaloneTest
15126    
15127    ElementTypeBinding:
15128    @Name: XMLTests    @Name: XMLTests
15129    @ElementType:    @ElementType:
15130      dis:ResourceDef      dis:ResourceDef
# Line 6270  ElementTypeBinding: Line 15197  ElementTypeBinding:
15197      @@lang:en      @@lang:en
15198    
15199  ElementTypeBinding:  ElementTypeBinding:
15200    @Name: ErrDef    @Name: WFErrDef
15201    @ElementType:    @ElementType:
15202      dis:ResourceDef      dis:ResourceDef
15203    @ShadowContent:    @ShadowContent:
15204      @@rdf:type: DOMCore|DOMErrorType      @@rdf:type: DOMCore|DOMErrorType
15205      @@For: ManakaiDOM|DOM3      @@For: ManakaiDOM|DOM3
15206      @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter      @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
15207        @@c:severity: c|SEVERITY_FATAL_ERROR
15208    
15209  ElementTypeBinding:  ElementTypeBinding:
15210    @Name: WFErrDef    @Name: FatalErrDef
15211    @ElementType:    @ElementType:
15212      dis:ResourceDef      dis:ResourceDef
15213    @ShadowContent:    @ShadowContent:
15214      @@rdf:type: DOMCore|DOMErrorType      @@rdf:type: DOMCore|DOMErrorType
15215      @@For: ManakaiDOM|DOM3      @@For: ManakaiDOM|DOM3
15216      @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter      @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
15217        @@c:severity: c|SEVERITY_FATAL_ERROR
15218    
15219    ElementTypeBinding:
15220      @Name: NSFatalErrDef
15221      @ElementType:
15222        dis:ResourceDef
15223      @ShadowContent:
15224        @@rdf:type: c|DOMErrorType
15225        @@For: ManakaiDOM|DOM3
15226        @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
15227        @@c:severity: c|SEVERITY_FATAL_ERROR
15228    
15229    ElementTypeBinding:
15230      @Name: NSCErrDef
15231      @ElementType:
15232        dis:ResourceDef
15233      @ShadowContent:
15234        @@rdf:type: c|DOMErrorType
15235        @@For: ManakaiDOM|DOM3
15236        @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
15237        @@c:severity: c|SEVERITY_FATAL_ERROR
15238    
15239    ElementTypeBinding:
15240      @Name: VCErrDef
15241      @ElementType:
15242        dis:ResourceDef
15243      @ShadowContent:
15244        @@rdf:type: c|DOMErrorType
15245        @@For: ManakaiDOM|DOM3
15246        @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
15247        @@c:severity: c|SEVERITY_ERROR
15248    
15249    ElementTypeBinding:
15250      @Name: ErrDef
15251      @ElementType:
15252        dis:ResourceDef
15253      @ShadowContent:
15254        @@rdf:type: c|DOMErrorType
15255        @@For: ManakaiDOM|DOM3
15256        @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
15257        @@c:severity: c|SEVERITY_ERROR
15258    
15259    ElementTypeBinding:
15260      @Name: WarnDef
15261      @ElementType:
15262        dis:ResourceDef
15263      @ShadowContent:
15264        @@rdf:type: c|DOMErrorType
15265        @@For: ManakaiDOM|DOM3
15266        @@ecore:textFormatter: ManakaiXMLParserExceptionFormatter
15267        @@c:severity: c|SEVERITY_WARNING
15268    
15269  WFErrDef:  WFErrDef:
15270    @QName: xp|wf-syntax-error    @QName: xp|wf-syntax-error
15271    @enDesc:    @enDesc:
15272      The entity does not match to the production rule; it is not      The entity does not match to the production rule; it is not
15273      well-formed.      well-formed.
   @DOMCore:severity: DOMCore|SEVERITY_FATAL_ERROR  
15274    @enMufDef:    @enMufDef:
15275      |%xp-error-token-type;|%xp-error-token-value      |%xp-error-token-type;|%xp-error-token-value
15276      (prefix => { (|}, suffix => {|)}); is not      (prefix => { (|}, suffix => {|)}); is not
# Line 6307  WFErrDef: Line 15285  WFErrDef:
15285    @enDesc:    @enDesc:
15286      A processing instruction has its <CODE::PITarget> of      A processing instruction has its <CODE::PITarget> of
15287      <XML::xml> (in any case) which is not allowed.      <XML::xml> (in any case) which is not allowed.
   @DOMCore:severity: DOMCore|SEVERITY_ERROR  
15288    @enMufDef:    @enMufDef:
15289      Processing instruction target name cannot be |%p      Processing instruction target name cannot be |%p
15290      (name => {<Q::xp|name>});|      (name => {<Q::xp|name>});|
# Line 6324  WFErrDef: Line 15301  WFErrDef:
15301    
15302  WFErrDef:  WFErrDef:
15303    @QName: xp|wf-no-end-tag    @QName: xp|wf-no-end-tag
   @DOMCore:severity: DOMCore|SEVERITY_ERROR  
15304    @enDesc:    @enDesc:
15305      An end-tag is not found.      An end-tag is not found.
15306    @enMufDef:    @enMufDef:
# Line 6341  WFErrDef: Line 15317  WFErrDef:
15317    
15318  WFErrDef:  WFErrDef:
15319    @QName: xp|wf-unsupported-xml-version    @QName: xp|wf-unsupported-xml-version
   @DOMCore:severity: DOMCore|SEVERITY_ERROR  
15320    @enDesc:    @enDesc:
15321      The XML version specified in the version declaration is not supported.      The XML version specified in the version declaration is not supported.
15322    @enMufDef:    @enMufDef:
# Line 6358  WFErrDef: Line 15333  WFErrDef:
15333    
15334  WFErrDef:  WFErrDef:
15335    @QName: xp|wf-malformed-enc-name    @QName: xp|wf-malformed-enc-name
   @DOMCore:severity: DOMCore|SEVERITY_ERROR  
15336    @enDesc:    @enDesc:
15337      An <XA::encoding> pseudo-attribute value does not match      An <XA::encoding> pseudo-attribute value does not match
15338      to the procduction rule <CODE::EncName>.      to the procduction rule <CODE::EncName>.
# Line 6375  WFErrDef: Line 15349  WFErrDef:
15349    
15350  WFErrDef:  WFErrDef:
15351    @QName: xp|wf-malformed-xml-standalone    @QName: xp|wf-malformed-xml-standalone
   @DOMCore:severity: DOMCore|SEVERITY_ERROR  
15352    @enDesc:    @enDesc:
15353      An <XA::standalone> pseudo-attribute value is neither <XML::yes>      An <XA::standalone> pseudo-attribute value is neither <XML::yes>
15354      or <XML::no>.      or <XML::no>.
# Line 6393  WFErrDef: Line 15366  WFErrDef:
15366    
15367  WFErrDef:  WFErrDef:
15368    @QName: xp|wf-legal-literal-character    @QName: xp|wf-legal-literal-character
   @DOMCore:severity: DOMCore|SEVERITY_ERROR  
15369    @enDesc:    @enDesc:
15370      Each character in XML entity must match to the production      Each character in XML entity must match to the production
15371      rule <CODE::Char - RestrictedChar>.      rule <CODE::Char - RestrictedChar>.
# Line 6406  WFErrDef: Line 15378  WFErrDef:
15378        The code position of the character being referred.        The code position of the character being referred.
15379    
15380  WFErrDef:  WFErrDef:
15381      @QName: xp|wf-invalid-character-in-node-name
15382      @c:errorType:
15383        @@@: wf-invalid-character-in-node-name
15384        @@ContentType: DISCore|String
15385      @enDesc:
15386        If a name contains a character that is not a name character
15387        in the XML version in use, or if the first character of a name
15388        is not a name start character in the XML version in use.
15389    
15390          {NOTE::
15391            When an invalid character is encountered in an entity
15392            where a <CODE::Name> is expected, what type of error
15393            is issued is implementation dependent: <Q::xp|wf-syntax-error>,
15394            <Q::xp|wf-pi-target-is-xml> or other error might be reported.
15395          }
15396    
15397          {NOTE::
15398            This error type is defined in DOM Level 3 Core and Load and Save
15399            modules and redefined herein for the purpose of XML parser.
15400          }
15401      @enMufDef:
15402        Character %character-code-point
15403        (v => {<Q::xp|character-number>}); is not allowed in name
15404      @ecore:hasParameter: xp|error-token
15405      @ecore:hasParameter:
15406        @@@: xp|character-number
15407        @@enDesc:
15408          The code position of the character being referred.
15409      @ecore:hasParameter:
15410        @@@: infoset|version
15411        @@enDesc:
15412          The version of XML in use.
15413    
15414    WFErrDef:
15415      @QName: xp|wf-pes-in-internal-subset
15416      @enDesc:
15417        In the internal subset of the DTD, parameter entity references
15418        <kwd:MUST-NOT> occur within markup declarations.
15419      @enMufDef:
15420        Parameter entity reference |%percent;%param (name => {<Q::xp|name>});;|
15421        cannot occur within a markup declaration
15422      @ecore:hasParameter: xp|error-token
15423      @ecore:hasParameter:
15424        @@@: xp|name
15425        @@enDesc:
15426          The name of the parameter entity.
15427    
15428    WFErrDef:
15429    @QName: xp|wf-element-type-match    @QName: xp|wf-element-type-match
   @DOMCore:severity: DOMCore|SEVERITY_FATAL_ERROR  
15430    @enDesc:    @enDesc:
15431      The <CODE::Name> in an element's end-tag must match the element type      The <CODE::Name> in an element's end-tag must match the element type
15432      in the start-tag.      in the start-tag.
# Line 6430  WFErrDef: Line 15449  WFErrDef:
15449    
15450  WFErrDef:  WFErrDef:
15451    @QName: xp|wf-unique-att-spec    @QName: xp|wf-unique-att-spec
   @DOMCore:severity: DOMCore|SEVERITY_ERROR  
15452    @enDesc:    @enDesc:
15453      An attribute name <kwd:MUST-NOT> appear more than once in      An attribute name <kwd:MUST-NOT> appear more than once in
15454      the same start-tag or empty-element tag.      the same start-tag or empty-element tag.
# Line 6444  WFErrDef: Line 15462  WFErrDef:
15462        The name of the attribute.        The name of the attribute.
15463    
15464  WFErrDef:  WFErrDef:
15465      @QName: xp|wf-no-external-entity-references
15466      @enDesc:
15467        Attribute values <kwd:MUST-NOT> contain direct or indirect
15468        entity references to external entities.
15469      @enMufDef:
15470        External entity |%p (name => {<Q::xp|name>});| is referenced
15471        in an attribute value literal
15472      @ecore:hasParameter: xp|error-token
15473      @ecore:hasParameter:
15474        @@@: xp|name
15475        @@enDesc:
15476          The name of the entity.
15477    
15478    WFErrDef:
15479      @QName: xp|wf-no-lt-in-attribute-values
15480      @enDesc:
15481        The replacement text of any entity referred to directly or indirectly
15482        in an attribute value literal <kwd:MUST-NOT> contain a
15483        <CHAR::LESS-THAN SIGN>.
15484      @enMufDef:
15485        Entity replacement text cannot contain a
15486        |LESS-THAN SIGN| since it is referenced from an attribute
15487        value literal
15488      @ecore:hasParameter: xp|error-token
15489    
15490    WarnDef:
15491      @QName: xp|warning-attribute-definition-ignored
15492      @enDesc:
15493        An attribute definition is ignored because the same attribute
15494        is declared before.
15495      @enMufDef:
15496        Attribute definition for |%p (name => {<Q::xp|name>});| is ignored
15497      @ecore:hasParameter: xp|error-token
15498      @ecore:hasParameter:
15499        @@@: xp|name
15500        @@enDesc:
15501          The name of the attribute.
15502    
15503    WFErrDef:
15504    @QName: xp|wf-legal-character    @QName: xp|wf-legal-character
   @DOMCore:severity: DOMCore|SEVERITY_ERROR  
15505    @enDesc:    @enDesc:
15506      Characters referred to using character references <kwd:MUST>      Characters referred to using character references <kwd:MUST>
15507      match the production for <CODE::Char>.      match the production for <CODE::Char>.
# Line 6463  WFErrDef: Line 15519  WFErrDef:
15519        The parent node in which the character reference has        The parent node in which the character reference has
15520        occurred, if available.        occurred, if available.
15521    
15522    WFErrDef:
15523      @QName: xp|wf-entity-declared
15524      @enDesc:
15525        {P:: In a document
15526    
15527           - without any DTD,
15528    
15529           - with only an internal DTD subset that contains no parameter
15530             entity references, or
15531    
15532           - with <XML::standalone="yes">,
15533    
15534        for an entity reference that does not occur within the external
15535        subset or a parameter entity, the <CODE::Name> given in the
15536        entity reference <kwd:MUST> match the <CODE::Name> does not
15537        occur within the external subset or a parameter entity,
15538        except that five predefined character entities need not
15539        be declared.  The declaration of a general entity <kwd:MUST>
15540        precede any reference to it which appears in a default value
15541        in an attribute list declaration.
15542      @enMufDef:
15543        Entity |%p (name => {<Q::xp|name>});| must be declared
15544        in the internal subset
15545      @ecore:hasParameter: xp|error-token
15546      @ecore:hasParameter:
15547        @@@: xp|name
15548        @@enDesc:
15549          The name of the entity.
15550    
15551    WFErrDef:
15552      @QName: xp|wf-parsed-entity
15553      @enDesc:
15554        An entity reference <kwd:MUST-NOT> contain the name of an
15555        unparsed entity.
15556      @enMufDef:
15557        Entity |%p (name => {<Q::xp|name>});| is an unparsed entity
15558      @ecore:hasParameter: xp|error-token
15559      @ecore:hasParameter:
15560        @@@: xp|name
15561        @@enDesc:
15562          The name of the entity.
15563    
15564    WFErrDef:
15565      @QName: xp|wf-no-recursion
15566      @enDesc:
15567        A parsed entity <kwd:MUST-NOT> contain a recursive reference
15568        to itself, either directly or indirectly.
15569      @enMufDef:
15570        Entity |%p (name => {<Q::xp|name>});| is recursively referenced
15571      @ecore:hasParameter: xp|error-token
15572      @ecore:hasParameter:
15573        @@@: xp|name
15574        @@enDesc:
15575          The name of the entity.
15576    
15577    FatalErrDef:
15578      @QName: xp|fatal-xml11-end-of-line-in-xml-declaration
15579      @enDesc:
15580        An end-of-line character <CODE::U+0085> or <CODE::U+2028> is appeared
15581        within an XML declaration or text declaration.
15582      @enMufDef:
15583        End-of-line character %character-code-point
15584        (v => {<Q::xp|character-number>}); cannot be used within the
15585        XML or text declaration
15586      @ecore:hasParameter:
15587        @@@: xp|character-number
15588        @@enDesc:
15589          The code position of the end-of-line character.
15590    
15591    ErrDef:
15592      @QName: xp|error-internal-predefined-entity
15593      @enDesc:
15594        A general entity declaration whose <CODE::Name> equals to one
15595        of predefined entities <kwd:MUST> declare it as an internal entity.
15596      @enMufDef:
15597        Entity |%p (name => {<Q::xp|name>});| must be declared as an
15598        internal entity
15599      @ecore:hasParameter: xp|error-token
15600      @ecore:hasParameter:
15601        @@@: xp|name
15602        @@enDesc:
15603          The name of the entity.
15604    
15605    ErrDef:
15606      @QName: xp|error-malformed-predefined-entity
15607      @enDesc:
15608        A general entity declaration whose <CODE::Name> equals to one
15609        of predefined entities <kwd:MUST> declare it as a data
15610        character for the entity.
15611      @enMufDef:
15612        Entity declaration for |%p (name => {<Q::xp|name>});|
15613        (replacement text |%p (name => {<Q::xp|replacement-text>});|) is malformed
15614      @ecore:hasParameter: xp|error-token
15615      @ecore:hasParameter:
15616        @@@: xp|name
15617        @@enDesc:
15618          The name of the entity.
15619      @ecore:hasParameter:
15620        @@@: xp|replacement-text
15621        @@enDesc:
15622          The replacement text of the entity declaration.
15623    
15624    WarnDef:
15625      @QName: xp|warning-entity-declaration-ignored
15626      @enDesc:
15627        An entity declaration is ignored because the same entity
15628        is declared before.
15629      @enMufDef:
15630        Entity declaration for |%p (name => {<Q::xp|name>});| is ignored
15631      @ecore:hasParameter: xp|error-token
15632      @ecore:hasParameter:
15633        @@@: xp|name
15634        @@enDesc:
15635          The name of the entity.
15636    
15637    VCErrDef:
15638      @QName: xp|vc-unique-notation-name
15639      @enDesc:
15640        A <CODE::Name> <kwd:MUST-NOT> be declared in more than
15641        one notation declaration.
15642      @enMufDef:
15643        Notation |%p (name => {<Q::xp|name>});| is already declared
15644      @ecore:hasParameter: xp|error-token
15645      @ecore:hasParameter:
15646        @@@: xp|name
15647        @@enDesc:
15648          The name of the notation.
15649    
15650    WarnDef:
15651      @QName: xp|warning-entity-declaration-not-processed
15652      @enDesc:
15653        An entity declaration is not processed because there
15654        is a reference to parameter entity before the declaration
15655        and the entity is not read.
15656      @enMufDef:
15657        Entity declaration for |%p (name => {<Q::xp|name>});| is not processed
15658      @ecore:hasParameter: xp|error-token
15659      @ecore:hasParameter:
15660        @@@: xp|name
15661        @@enDesc:
15662          The name of the entity.
15663    
15664    WarnDef:
15665      @QName: xp|warning-attribute-definition-not-processed
15666      @enDesc:
15667        An attribute definition is not processed because there
15668        is a reference to parameter entity before the declaration
15669        and the entity is not read.
15670      @enMufDef:
15671        Attribute definition for |%p (name => {<Q::xp|name>});| is not processed
15672      @ecore:hasParameter: xp|error-token
15673      @ecore:hasParameter:
15674        @@@: xp|name
15675        @@enDesc:
15676          The name of the attribute.
15677    
15678    NSFatalErrDef:
15679      @QName: xp|nswf-legal-ncname
15680      @enDesc:
15681        <CODE::Name>s other than element type names and attribute names
15682        <kwd:MUST> be <CODE::NCName>s.
15683      @enMufDef:
15684        <CODE::Name> |%p (name => {<Q::xp|name>});| is not an <CODE::NCName>
15685      @ecore:hasParameter: xp|error-token
15686      @ecore:hasParameter:
15687        @@@: xp|name
15688        @@enDesc:
15689          The name.
15690      @ecore:hasParameter:
15691        @@@: infoset|version
15692        @@enDesc:
15693          The version of XML in use.
15694    
15695    NSFatalErrDef:
15696      @QName: xp|nswf-legal-qname
15697      @enDesc:
15698        An element type name or an attribute name <kwd:MUST> be a
15699        <CODE::QName>.
15700      @enMufDef:
15701        <CODE::Name> |%p (name => {<Q::xp|name>});| is not a <CODE::QName>
15702      @ecore:hasParameter: xp|error-token
15703      @ecore:hasParameter:
15704        @@@: xp|name
15705        @@enDesc:
15706          The name.
15707      @ecore:hasParameter:
15708        @@@: infoset|version
15709        @@enDesc:
15710          The version of XML in use.
15711    
15712    NSCErrDef:
15713      @QName: xp|nsc-reserved-prefix-xml
15714      @enDesc:
15715        The prefix <XML::xml> <kwd:MUST-NOT> be undeclared or bound
15716        to any namespace name other than <URI::http://www.w3.org/XML/1998/namespace>.
15717      @enMufDef:
15718        Namespace prefix |xml| cannot be bound to namespace
15719        name |%p (name => {<Q::infoset|namespaceName>});|
15720      @ecore:hasParameter: xp|error-token
15721      @ecore:hasParameter:
15722        @@@: infoset|prefix
15723        @@enDesc:
15724          The namespace prefix.
15725      @ecore:hasParameter:
15726        @@@: infoset|namespaceName
15727        @@enDesc:
15728          The namespace name bound to or an empty string for undeclaring.
15729    
15730    NSCErrDef:
15731      @QName: xp|nsc-reserved-namespace-name-xml
15732      @enDesc:
15733        Namespace prefixes other than <XML::xml> <kwd:MUST-NOT> be bound
15734        to the namespace name <URI::http://www.w3.org/XML/1998/namespace>.
15735      @enMufDef:
15736        Namespace prefix |%p (name => {<Q::infoset|prefix>});| cannot be
15737        bound to namespace name |http://www.w3.org/XML/1998/namespace|
15738      @enImplNote:
15739        The XMLNames spec does not prohibit the URI bound to
15740        the default namespace (!)
15741      @ecore:hasParameter: xp|error-token
15742      @ecore:hasParameter:
15743        @@@: infoset|prefix
15744        @@enDesc:
15745          The namespace prefix or <DOM::null> for default namespace.
15746      @ecore:hasParameter:
15747        @@@: infoset|namespaceName
15748        @@enDesc:
15749          The namespace name bound to.
15750    
15751    NSCErrDef:
15752      @QName: xp|nsc-reserved-prefix-xmlns
15753      @enDesc:
15754        The prefix <XML::xmlns> <kwd:MUST-NOT> be declared or undeclared.
15755      @enMufDef:
15756        Namespace prefix |xmlns| cannot be declared or undeclared
15757      @ecore:hasParameter: xp|error-token
15758      @ecore:hasParameter:
15759        @@@: infoset|prefix
15760        @@enDesc:
15761          The namespace prefix.
15762      @ecore:hasParameter:
15763        @@@: infoset|namespaceName
15764        @@enDesc:
15765          The namespace name bound to or an empty string for undeclaring.
15766    
15767    NSCErrDef:
15768      @QName: xp|nsc-reserved-namespace-name-xmlns
15769      @enDesc:
15770        Namespace prefixes <kwd:MUST-NOT> be bound
15771        to the namespace name <URI::http://www.w3.org/2000/xmlns/>.
15772      @enMufDef:
15773        Namespace prefix |%p (name => {<Q::infoset|prefix>});| cannot be
15774        bound to namespace name |http://www.w3.org/2000/xmlns/|
15775      @enImplNote:
15776        The XMLNames spec does not prohibit the URI bound to
15777        the default namespace (!)
15778      @ecore:hasParameter: xp|error-token
15779      @ecore:hasParameter:
15780        @@@: infoset|prefix
15781        @@enDesc:
15782          The namespace prefix or <DOM::null> for default namespace.
15783      @ecore:hasParameter:
15784        @@@: infoset|namespaceName
15785        @@enDesc:
15786          The namespace name bound to.
15787    
15788    NSCErrDef:
15789      @QName: xp|nsc-prefix-declared
15790      @enDesc:
15791        A namespace prefix other than <XML::xml> or <XML::xmlns>
15792        <kwd:MUST> have been declared in a namespace declaration
15793        attribute in either the start or empty element tag of the
15794        element where the prefix is used or in an ancestor
15795        element.  Furthermore, the attribute value in the innermost
15796        such declaration <kwd:MUST-NOT> be an empty string.
15797      @enMufDef:
15798        Namespace prefix |%p (name => {<Q::infoset|prefix>});| in
15799        qualified name |%p (name => {<Q::xp|name>});| is not declared
15800      @ecore:hasParameter: xp|error-token
15801      @ecore:hasParameter:
15802        @@@: infoset|prefix
15803        @@enDesc:
15804          The namespace prefix.
15805      @ecore:hasParameter:
15806        @@@: xp|name
15807        @@enDesc:
15808          The qualified name.
15809    
15810    NSFatalErrDef:
15811      @QName: xp|nswf-empty-namespace-name
15812      @enDesc:
15813        If the XML version of the document is 1.0 and the
15814        normalized value of the prefixed namespace declaration attribute is empty.
15815      @enMufDef:
15816        Namespace |%p (name => {<Q::infoset|prefix>});| cannot be
15817        undeclared in XML 1.0
15818      @ecore:hasParameter: xp|error-token
15819      @ecore:hasParameter:
15820        @@@: infoset|prefix
15821        @@enDesc:
15822          The namespace prefix.
15823      @ecore:hasParameter:
15824        @@@: infoset|namespaceName
15825        @@enDesc:
15826          An empty string.
15827    
15828    NSFatalErrDef:
15829      @QName: xp|nswf-unique-att-spec-expanded-name
15830      @enDesc:
15831        No element may have two attributes that have qualified name
15832        with the same local part and with namespace prefixes
15833        that have been bound to namespace names that are identical.
15834      @enMufDef:
15835        Attribute |%p (name => {<Q::infoset|localName>});| in
15836        namespace |%p (name => {<Q::infoset|namespaceName>});| is
15837        attached to the same element more than once (as
15838        |%p (name => {<Q::xp|name>});| and
15839        |%p (name => {<Q::xp|another-attribute-name>});|)
15840      @enImplNote:
15841        The XMLNames spec doesn't mention default attributes
15842        for this constraint...
15843      @ecore:hasParameter: xp|error-token
15844      @ecore:hasParameter:
15845        @@@: infoset|localName
15846        @@enDesc:
15847          The local part of the attribute.
15848      @ecore:hasParameter:
15849        @@@: infoset|namespaceName
15850        @@enDesc:
15851          The namespace URI of the attribute.
15852      @ecore:hasParameter:
15853        @@@: xp|name
15854        @@enDesc:
15855          The name, i.e. a qualified name consist of <Q::infoset:localName>
15856          and <Q::infoset:namespaceName> parameter values.
15857      @ecore:hasParameter:
15858        @@@: xp|another-attribute-name
15859        @@enDesc:
15860          Another attribute qualified name expanded to the same expanded name
15861          as <Q::xp|name>.
15862    
15863    XWParam:
15864      @QName: xp|another-attribute-name
15865    
15866    XWParam:
15867      @QName: xp|replacement-text
15868      @enDesc:
15869        The replacement text.
15870    
15871  XWParam:  XWParam:
15872    @QName: xp|error-token    @QName: xp|error-token
15873    @enDesc:    @enDesc:
# Line 6520  ResourceDef: Line 15925  ResourceDef:
15925    @AliasFor: DOMCore|DOMImplementation    @AliasFor: DOMCore|DOMImplementation
15926    @For: ManakaiDOM|DOM    @For: ManakaiDOM|DOM
15927    
15928    ResourceDef:
15929      @QName: LSInput
15930      @AliasFor: DOMLS|LSInput
15931      @For: ManakaiDOM|DOM
15932    
15933    ResourceDef:
15934      @QName: LSParser
15935      @AliasFor: DOMLS|LSParser
15936      @For: ManakaiDOM|DOM
15937    
15938  ElementTypeBinding:  ElementTypeBinding:
15939    @Name: Attr    @Name: Attr
15940    @ElementType:    @ElementType:
# Line 6579  ElementTypeBinding: Line 15994  ElementTypeBinding:
15994      @@ContentType: lang|Perl      @@ContentType: lang|Perl
15995    
15996  ElementTypeBinding:  ElementTypeBinding:
15997      @Name: PerlDefC
15998      @ElementType:
15999        dis:Def
16000      @ShadowContent:
16001        @@ContentType: lang|Perl
16002    
16003    ElementTypeBinding:
16004    @Name: PropDef    @Name: PropDef
16005    @ElementType:    @ElementType:
16006      dis:ResourceDef      dis:ResourceDef
# Line 6662  ClsDef: Line 16084  ClsDef:
16084          @@@@PerlDef:          @@@@PerlDef:
16085            my $pos = $o-><AG::DOMCore|DOMError.location>            my $pos = $o-><AG::DOMCore|DOMError.location>
16086                        -><AG::DOMCore|DOMLocator.utf32Offset>;                        -><AG::DOMCore|DOMLocator.utf32Offset>;
16087            if ($pos > -1) {            my $src = $o->{<H::ecore|object>}->{entity}->[-1]->{reptxt};
16088              my $src = $o->{<H::ecore|object>}->{entity}->[-1]->{reptxt};            if (defined $src and $pos > -1) {
16089              my $start = $pos;              my $start = $pos;
16090              $start = rindex ($$src, "\x0A", $start - 1) for 0..2;              $start = rindex ($$src, "\x0A", $start - 1) for 0..2;
16091              $start++;              $start++;
# Line 6701  ClsDef: Line 16123  ClsDef:
16123          @@@@PerlDef:          @@@@PerlDef:
16124            $p->{-result} = sprintf 'U+%04X', $o->{$p->{v}};            $p->{-result} = sprintf 'U+%04X', $o->{$p->{v}};
16125  ##XMLParserExceptionFormatter  ##XMLParserExceptionFormatter
16126    
16127    ElementTypeBinding:
16128      @Name: CParam
16129      @ElementType:
16130        dis:ResourceDef
16131      @ShadowContent:
16132        @@rdf:type:
16133          @@@@: c|DOMConfigurationParameter
16134          @@@For: ManakaiDOM|DOM
16135        @@rdf:type:
16136          @@@@: DISCore|Property
16137          @@@For: =ManakaiDOM|all
16138        @@For: ManakaiDOM|DOM3
16139        @@For: =ManakaiDOM|all
16140    
16141    ElementTypeBinding:
16142      @Name: CParamApp
16143      @ElementType:
16144        dis:ResourceDef
16145      @ShadowContent:
16146        @@rdf:type:
16147          @@@@: c|DOMConfigurationParameterApplication
16148          @@@For: ManakaiDOM|DOM
16149        @@For: ManakaiDOM|DOM3
16150    
16151    CParamApp:
16152      @QName: xml-id
16153      @c:domConfigurationParameter: cfg|xml-id
16154      @c:targetType: xp|ManakaiXMLParser
16155    
16156    CParamApp:
16157      @QName: error-handler
16158      @c:domConfigurationParameter: c|error-handler
16159      @c:targetType: xp|ManakaiXMLParser
16160    
16161    CParam:
16162      @QName: xp|ls-input-to-input-file
16163      @DOMLS:lsKey:
16164        @@@: i2i
16165        @@For: =ManakaiDOM|all
16166      @Type: ManakaiDOMLSInputToInputFile
16167      @c:targetType: xp|ManakaiXMLParser
16168      @IsSupportRequired: 1
16169      @c:isSupported: 1
16170      @enDesc:
16171        An <IF::LSInput> to Perl filehandle converter.
16172    
16173      @Method:
16174        @@rdf:type: c|DOMConfigurationParameterDefaultGetter
16175        @@Param:
16176          @@@Name: name
16177          @@@Type: DOMString
16178          @@@dis:actualType: c|DOMConfigurationParameterName
16179          @@@enDesc: The parameter name.
16180        @@Return:
16181          @@@Type: ManakaiDOMLSInputToInputFile
16182          @@@enDesc:
16183            The default resolver.
16184          @@@PerlDefC:
16185            $r = sub {
16186              my ($self, $input, $errorHandler) = @_;
16187              ## As defined in DOM Level 3 LS |LSInput| interface
16188    
16189              my $r = {};
16190    
16191              __DEEP{
16192    
16193                FH: {
16194                  ## 1. |characterStream|
16195                  my $v = $input-><AG::LSInput.characterStream>;
16196                  if (defined $v) {
16197                    $r->{filehandle} = $v;
16198                    last FH;
16199                  }
16200    
16201                  ## 2. |byteStream|
16202                  $v = $input-><AG::LSInput.byteStream>;
16203                  if (defined $v) {
16204                    ## TODO: Support byte filehandle
16205                      ## |encoding|
16206                      ## TODO: How to guess?
16207                    return null;
16208                  }
16209    
16210                  ## 3. |stringData|
16211                  $v = $input-><AG::LSInput.stringData>;
16212                  if (defined $v) {
16213                    require IO::String;
16214                    $r->{filehandle} = IO::String->new ($v);
16215                    last FH;
16216                  }
16217    
16218                  ## 4. |systemId|
16219                    ## TODO:
16220                      ## resolve relative URI
16221                      ## open
16222                      ## set document_uri
16223                  
16224                  ## 5. |publicId|
16225                  ##   The default resolver does not support only-|publicId| input.
16226    
16227                  return null;
16228                } # FH
16229    
16230                DURI: {
16231                  last DURI if defined $r->{document_uri};
16232                  
16233                  my $v = $input-><AG::LSInput.systemId>;
16234                  if (defined $v) {
16235                    $r->{base_uri} = $input-><AG::LSInput.baseURI>
16236                      unless defined $r->{base_uri};
16237                    if (defined $r->{base_uri}) {
16238                      $r->{document_uri}
16239                        = <ClassM::urigen|ManakaiURIReference.new> (\$v)
16240                            -><M::urigen|URIReference.getAbsoluteReference>
16241                                ($r->{base_uri})
16242                            -><AG::urigen|URIReference.uriReference>;
16243                    } else {
16244                      $r->{document_uri} = $v;
16245                    }
16246                    last DURI;
16247                  }
16248    
16249                  ## TODO: pubid -> pubid URN -> document_uri
16250                } # DURI
16251    
16252                BURI: {
16253                  last BURI if defined $r->{base_uri};
16254    
16255                  my $v = $input-><AG::LSInput.baseURI>;
16256                  if (defined $v) {
16257                    $r->{base_uri} = $v;
16258                    last BURI;
16259                  }
16260    
16261                  if (defined $r->{document_uri}) {
16262                    $r->{base_uri} = $r->{document_uri};
16263                  }
16264                } # BURI
16265    
16266              }__;
16267    
16268              ## ISSUE: Is |certifiedText| required by parsers?
16269    
16270              return $r;
16271            };
16272      @Method:
16273        @@rdf:type: c|DOMConfigurationParameterSetter
16274        @@Param:
16275          @@@Name: name
16276          @@@Type: DOMString
16277          @@@dis:actualType: c|DOMConfigurationParameterName
16278          @@@enDesc: The parameter name.
16279        @@Param:
16280          @@@Name: value
16281          @@@Type: DOMMain|DOMUserData
16282          @@@dis:actualType: ManakaiDOMLSInputToInputFile
16283          @@@enDesc: The new value.
16284        @@Return:
16285          @@@Type: idl|void||ManakaiDOM|all
16286          @@@PerlDefC:
16287            $self->[1]->{<H::xp|ls-input-to-input-file>} = $value;
16288        @@enImplNote:
16289          Implied input processor converts non-blessed code references
16290          into a <Class::ManakaiDOMLSInputToInputFile> object.
16291      @Method:
16292        @@rdf:type: c|DOMConfigurationParameterChecker
16293        @@Param:
16294          @@@Name: name
16295          @@@Type: DOMString
16296          @@@dis:actualType: c|DOMConfigurationParameterName
16297          @@@enDesc: The parameter name.
16298        @@Param:
16299          @@@Name: value
16300          @@@Type: DOMMain|DOMUserData
16301          #@@@dis:actualType: ManakaiDOMLSInputToInputFile
16302          @@@enDesc: The new value.
16303        @@Return:
16304          @@@Type: idl|boolean||ManakaiDOM|all
16305          @@@PerlDefC:
16306            $r = UNIVERSAL::isa ($value, 'CODE') or
16307                 UNIVERSAL::isa ($value, <ClassName::ManakaiDOMLSInputToInputFile>);
16308    
16309        @@Test:
16310          @@@QName: cp.ls-input-to-input-file.test
16311          @@@PerlDefC:
16312            my $xp;
16313            __CODE{createParserForTest:: $xp => $xp}__;
16314            my $cfg = $xp-><AG::LSInput.domConfig>;
16315    
16316            my $cp = <Q::xp|ls-input-to-input-file>;
16317            
16318            $test->id ('default');
16319            my $default = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
16320            $test->assert_isa ($default,
16321                               <ClassName::ManakaiDOMLSInputToInputFile>);
16322    
16323            $test->id ('set');
16324            my $sub1 = sub { };
16325            $cfg-><M::c|DOMConfiguration.setParameter> ($cp => $sub1);
16326            my $sub2 = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
16327            $test->assert_isa ($sub2, <ClassName::ManakaiDOMLSInputToInputFile>);
16328            $test->assert_equals ($sub2, $sub1);
16329    
16330            $test->id ('reset');
16331            $cfg-><M::c|DOMConfiguration.setParameter> ($cp => null);
16332            my $sub3 = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
16333            $test->assert_isa ($sub3, <ClassName::ManakaiDOMLSInputToInputFile>);
16334            $test->assert_equals ($sub3, $default);
16335    
16336        @@Test:
16337          @@@QName: cp.ls-input-to-input-file.default.test
16338          @@@PerlDefC:
16339            my $xp;
16340            __CODE{createParserForTest:: $xp => $xp}__;
16341            my $cfg = $xp-><AG::LSInput.domConfig>;
16342            my $cp = <Q::xp|ls-input-to-input-file>;
16343            my $default = $cfg-><M::c|DOMConfiguration.getParameter> ($cp);
16344    
16345            my $err = sub {}; # dummy error handler
16346    
16347            my $cs = \*STDOUT; # dummy input
16348    
16349            $test->id ('cs.sysid');
16350            my $r1 = $default->resolve_ls_input ({
16351                       character_stream => $cs,
16352                       system_id => q<http://example.com/sysid>,
16353                     }, $err);
16354            $test->assert_equals
16355                     ($r1->document_uri, q<http://example.com/sysid>);
16356            $test->assert_equals
16357                     ($r1->base_uri, q<http://example.com/sysid>);
16358    
16359            $test->id ('cs.baseuri.sysid');
16360            my $r1 = $default->resolve_ls_input ({
16361                       character_stream => $cs,
16362                       system_id => q<sysid>,
16363                       base_uri => q<http://example.com/>,
16364                     }, $err);
16365            $test->assert_equals
16366                     ($r1->document_uri, q<http://example.com/sysid>);
16367            $test->assert_equals
16368                     ($r1->base_uri, q<http://example.com/>);
16369    ##ls-input-to-input-file
16370    
16371    ClsDef:
16372      @ClsQName: ManakaiDOMLSInputToInputFile
16373      @enDesc:
16374        An <Class::ManakaiDOMLSInputToInputFile> object is used to covert
16375        a <IF::LSInput> object into a Perl filehandle.
16376    
16377        {ISSUE::
16378          In which module this class should be placed?
16379    
16380          Better interface name?
16381        }
16382    
16383      @enDesc:
16384        @@ddid: perl
16385        @@ForCheck: ManakaiDOM|ManakaiDOM
16386        @@@:
16387          For Perl binding, any parameter that accepts
16388          a <Class::ManakaiDOMLSInputToInputFile> would also accept a Perl code
16389          reference (subroutine reference).  The code reference
16390          will be blessed as a <Class::ManakaiDOMLSInputToInputFile> whose
16391          <M::ManakaiDOMLSInputToInputFile.resolveLSInput> method invokes the code.
16392    
16393      @ResourceDef:
16394        @@rdf:type: DISLang|InputProcessor
16395        @@rdf:type: DISLang|OutputProcessor
16396        @@PerlDef:
16397          $INPUT = bless $INPUT, <ClassName::ManakaiDOMLSInputToInputFile>
16398            if ref $INPUT eq 'CODE';
16399    
16400      @Method:
16401        @@Name: resolveLSInput
16402        @@enDesc:
16403          Converts a <IF::LSInput> into a Perl filehandle.
16404        @@Param:
16405          @@@Name: input
16406          @@@Type: LSInput
16407          @@@enDesc:
16408            The input.
16409        @@Param:
16410          @@@Name: errorHandler
16411          @@@Type: c|DOMErrorHandler
16412          @@@enDesc:
16413            An error handler.  If the method encounters an error
16414            or warning, it <kwd:MAY> notify it to application
16415            via this handler.
16416        @@Return:
16417          @@@Type: ManakaiDOMInputFile
16418          @@@enDesc:
16419            A <Class::ManakaiDOMInputFile> object created from <P::input>.
16420          @@@nullCase:
16421            @@@@enDesc:
16422              If the method was unable to resolve the <P::input>.
16423    
16424              {ISSUE::
16425                Should we allow the method to throw exceptions?
16426              }
16427          @@@PerlDef:
16428            __DEEP{
16429              $r = $self->($self, $input, $errorHandler);
16430            }__;
16431          @@@enImplNote:
16432            Notet that the input / output processor for <CODE::$input>
16433            and return value might or might not be inserted in
16434            the <Perl::$self> code.
16435    ##LSInputToInputFile
16436    
16437    ClsDef:
16438      @ClsQName: ManakaiDOMInputFile
16439      @enDesc:
16440        A set of information on the input, including filehandle.
16441    
16442      @enDesc:
16443        @@ddid: perl
16444        @@ForCheck: ManakaiDOM|ManakaiDOM
16445        @@@:
16446          For Perl binding, any parameter that accepts
16447          a <Class::ManakaiDOMInputFile> would also accept a Perl hash reference.
16448          If a hash reference is given to parameter that expects
16449          a <Class::ManakaiDOMInputFile> object, then it
16450          bless the hash with the class.
16451    
16452          Each attributes defined
16453          in the class is associated to the hash value with the
16454          key equals to the attribut name.  Each method defined in
16455          the class will invoke the code reference retrieved
16456          from the hash by the key equals to the method name.
16457    
16458          If there is no value in the hash for an attribute,
16459          then its value is <DOM::null>.
16460    
16461      @ResourceDef:
16462        @@rdf:type: DISLang|InputProcessor
16463        @@rdf:type: DISLang|OutputProcessor
16464        @@PerlDef:
16465          $INPUT = bless $INPUT, <ClassName::ManakaiDOMInputFile>
16466            if ref $INPUT eq 'HASH';
16467    
16468      @Attr:
16469        @@Name: filehandle
16470        @@Type: DISPerl|filehandle||ManakaiDOM|all
16471        @@enDesc:
16472          The input filehandle.
16473    
16474          It <kwd:MUST> be an <Perl::open>ed (and not <Perl::close>d)
16475          filehandle.  Note that
16476          it does not have to be associated with an actual file
16477          in the local file system.
16478    
16479          It <kwd:MUST> return a character (rather than byte)
16480          by <Perl::getc>.
16481        @@Get:
16482          @@@PerlDef: $r = $self->{filehandle};
16483        @@Set:
16484          @@@PerlDef: $self->{filehandle} = $given;
16485    
16486      @Attr:
16487        @@Name: baseURI
16488        @@enDesc:
16489          The base URI of the input.
16490    
16491          It <kwd:MUST> be an absolute DOM URI or <DOM::null>.
16492          Otherwise, the result is undefined.
16493        @@Type: DOMString
16494        @@nullCase:
16495          @@@enDesc:
16496            If the base URI is not available.
16497        @@Get:
16498          @@@PerlDef: $r = $self->{base_uri};
16499        @@Set:
16500          @@@PerlDef: $self->{base_uri} = $given;
16501    
16502      @Attr:
16503        @@Name: documentURI
16504        @@enDesc:
16505          The URI of the document.
16506    
16507          It <kwd:MUST> be an absolute DOM URI or <DOM::null>.
16508          Otherwise, the result is undefined.
16509        @@Type: DOMString
16510        @@nullCase:
16511          @@@enDesc:
16512            If the document URI is not available.
16513        @@Get:
16514          @@@PerlDef: $r = $self->{document_uri};
16515        @@Set:
16516          @@@PerlDef: $self->{document_uri} = $given;
16517    
16518      @Method:
16519        @@Name: close
16520        @@enDesc:
16521          Closes the file.
16522    
16523          Since when the Perl's destructor is invoked is unreliable,
16524          this method is explicitly called when the file is no longer
16525          in use.
16526    
16527          If the <Class::ManakaiDOMInputFile> is given as a hash
16528          reference and whose value for <CODE::close> is not defined,
16529          then the statement <Perl::close $filehandle> is done
16530          (where <Perl::$filehandle> is the <A::ManakaiDOMInputFile.filehandle>
16531          value).
16532        @@Return:
16533          @@@PerlDef:
16534            __DEEP{
16535              if ($self->{close}) {
16536                $self->{close}->($self);
16537              } else {
16538                close $self->{filehandle};
16539              }
16540            }__;
16541    ##ManakaiDOMInputFile
16542    
16543    
16544    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.32

[email protected]
ViewVC Help
Powered by ViewVC 1.1.24