/[suikacvs]/messaging/manakai/lib/Message/DOM/Document.pm
Suika

Diff of /messaging/manakai/lib/Message/DOM/Document.pm

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

revision 1.9 by wakaba, Sat Nov 4 17:25:06 2006 UTC revision 1.15 by wakaba, Sat Dec 30 08:27:45 2006 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl  #!/usr/bin/perl
2  ## This file is automatically generated  ## This file is automatically generated
3  ##      at 2006-11-04T12:42:32+00:00,  ##      at 2006-12-30T08:09:39+00:00,
4  ##      from file "Document.dis",  ##      from file "Document.dis",
5  ##      module <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.Document>,  ##      module <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.Document>,
6  ##      for <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOMLatest>.  ##      for <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#all>.
7  ## Don't edit by hand!  ## Don't edit by hand!
8  use strict;  use strict;
9  require Message::DOM::DOMCore;  require Message::DOM::DOMCore;
10  require Message::DOM::TreeCore;  require Message::DOM::TreeCore;
11  require Message::Util::Error::DOMException;  require Message::Util::Error::DOMException;
12  package Message::DOM::Document;  package Message::DOM::Document;
13  our $VERSION = 20061104.1242;  our $VERSION = 20061230.0809;
14  package Message::DOM::IFLatest::Document;  package Message::DOM::Document::ManakaiDOMImplementationDocument;
15  our $VERSION = 20061104.1242;  our $VERSION = 20061230.0809;
16  package Message::DOM::Document::ManakaiDOMDocument;  push @Message::DOM::DOMCore::ManakaiDOMImplementation::ISA, q<Message::DOM::Document::ManakaiDOMImplementationDocument> unless Message::DOM::DOMCore::ManakaiDOMImplementation->isa (q<Message::DOM::Document::ManakaiDOMImplementationDocument>);
17  our $VERSION = 20061104.1242;  sub create_document ($;$$$) {
18  push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode',  my ($self, $namespaceURI, $qualifiedName, $doctype) = @_;
 'Message::DOM::IF::Document',  
 'Message::DOM::IF::Node',  
 'Message::DOM::IFLatest::Document',  
 'Message::DOM::IFLatest::Node',  
 'Message::DOM::IFLevel1::Document',  
 'Message::DOM::IFLevel1::Node',  
 'Message::DOM::IFLevel2::Document',  
 'Message::DOM::IFLevel2::Node',  
 'Message::DOM::IFLevel3::Document',  
 'Message::DOM::IFLevel3::Node';  
 use Char::Class::XML 'InXMLNCNameChar10',  
 'InXMLNCNameChar11',  
 'InXMLNCNameStartChar11',  
 'InXMLNameChar10',  
 'InXMLNameChar11',  
 'InXMLNameStartChar11',  
 'InXML_NCNameStartChar10',  
 'InXML_NameStartChar10';  
 sub ___create_node_stem ($$$$) {  
 my ($self, $bag, $obj, $opt) = @_;  
 my $r = {};  
19    
20  {  {
21    
22    if
23    (CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) {
24      require Message::DOM::DOMMain;
25      
26    report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/main#empty-namespace-uri', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:1167465382:17798:gAilE14884';
27    
28    ;
29    
30  $obj->{    $namespaceURI = undef;
31    }
32    
33    
34    }
35    my $r;
36    
37    {
38    
39    require
40    Scalar::Util;
41    $r = bless \{
42      
43  'child'  'child'
44  } = [];   => [],
45  $obj->{    
46  'do'  'impl'
47  } = {};   => $self,
48  $obj->{    
49  'http://www.w3.org/2001/04/infoset#version'  'http://www.w3.org/2001/04/infoset#version'
50  } = '1.0';   => '1.0',
51      
52    'chk'
53     => 1,
54    },
55    'Message::DOM::Document::ManakaiDOMDocument'
56    ;
57    
58    if (defined $doctype) {
59      
60    
61  {  {
62    
63    local $Error::Depth = $Error::Depth + 1;
64    
65  $obj->{'impl'} = $opt->{'impl'}->{  {
66  'id'  
67  };  
68  $bag->{${$opt->{'impl'}->{  
69  'id'      $r->
70  }}}  append_child
71      ->{'lpmi'}->{${$obj->{   ($doctype);
72  'id'    
 }}}  
   = $obj->{  
 'id'  
 };  
73    
74    
75  }  }
76    
 ;  
 $r = $obj;  
77    
78    ;}
79    
80    ;
81  }  }
82  $r}  
83  sub ___create_node_ref ($$$) {  if (defined $qualifiedName) {
84  my ($self, $obj, $opt) = @_;    
 my $r;  
85    
86  {  {
87    
88    local $Error::Depth = $Error::Depth + 1;
89    
90  $r = bless $obj,  {
91  'Message::DOM::Document::ManakaiDOMDocument'  
92    
93        my
94    $el = $r->
95    create_element_ns
96    
97                       ($namespaceURI, $qualifiedName);
98        $r->
99    append_child
100     ($el);
101        $r = $el->
102    owner_document
103  ;  ;
104               ## Choose the class based on document element type
105      
106    
107    
108    }
109    
110    
111    ;}
112    
113    ;
114    } elsif (defined $namespaceURI) {
115      
116    report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'create_document', 'http://www.w3.org/2001/04/infoset#namespaceURI' => $namespaceURI, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_NULL_QNAME_WITH_NON_NULL_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::Document::ManakaiDOMImplementationDocument', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'namespaceURI';
117    
118    ;
119    }
120    
121    
122  }  }
123  $r}  $r}
124    $Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::Document::ManakaiDOMImplementationDocument>}->{has_feature} = {};
125    $Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMImplementationDocument>} = 0;
126    package Message::DOM::IF::Document;
127    our $VERSION = 20061230.0809;
128    package Message::DOM::Document::ManakaiDOMDocument;
129    our $VERSION = 20061230.0809;
130    push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode',
131    'Message::DOM::IF::Document',
132    'Message::DOM::IF::Node';
133  sub node_type ($;$) {  sub node_type ($;$) {
134  if (@_ == 1) {my ($self) = @_;  if (@_ == 1) {my ($self) = @_;
135  my $r;  my $r;
# Line 339  local $Error::Depth = $Error::Depth - 1; Line 378  local $Error::Depth = $Error::Depth - 1;
378    
379  {  {
380    
381  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
382    
383    
384  }  }
# Line 360  local $Error::Depth = $Error::Depth - 1; Line 399  local $Error::Depth = $Error::Depth - 1;
399    
400  {  {
401    
402  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
403    
404    
405  }  }
# Line 388  local $Error::Depth = $Error::Depth - 1; Line 427  local $Error::Depth = $Error::Depth - 1;
427    
428  {  {
429    
430  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
431    
432    
433  }  }
# Line 411  local $Error::Depth = $Error::Depth - 1; Line 450  local $Error::Depth = $Error::Depth - 1;
450    
451  {  {
452    
453  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1';
454    
455    
456  }  }
# Line 434  local $Error::Depth = $Error::Depth - 1; Line 473  local $Error::Depth = $Error::Depth - 1;
473    
474  {  {
475    
476  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1';
477    
478    
479  }  }
# Line 458  report Message::DOM::DOMCore::ManakaiDOM Line 497  report Message::DOM::DOMCore::ManakaiDOM
497      if ($child_nt ==      if ($child_nt ==
498  11  11
499  ) {  ) {
500                $$newChild->{
501    'child'
502  {  } = [];
   
   
 $newChild->{  
 'b'  
 }->{${$newChild->{  
 'id'  
 }}}  
     ->{'child'} = [];  
   
   
 }  
   
 ;  
503      } else {      } else {
504        my $v;        my $v = $$nc_parent->{
505          'child'
506    };
 {  
   
   
 $v = $nc_parent->{  
 'b'  
 }->{${$nc_parent->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
507        RP: for my $i (0..$#$v) {        RP: for my $i (0..$#$v) {
508          my $nodeid = $v->[$i];          if ($v->[$i] eq $new_child[0]) {
         if (  
 (${$new_child[0]->{'id'}} eq ${$nodeid})  
 ) {  
509            splice @$v, $i, 1, ();            splice @$v, $i, 1, ();
510            last RP;            last RP;
511          }          }
# Line 506  $v = $nc_parent->{ Line 515  $v = $nc_parent->{
515    
516    ## -- Rewrite the |parentNode| properties    ## -- Rewrite the |parentNode| properties
517    for my $nc (@new_child) {    for my $nc (@new_child) {
518            $$nc->{
519    'parent'
520  {  } = $self;
521        Scalar::Util::weaken ($$nc->{
522    'parent'
523  $nc->{  });
 'b'  
 }->{${$nc->{  
 'id'  
 }}}  
     ->{'parent'} = $self->{  
 'id'  
 };  
   
   
 }  
   
 ;  
524    }    }
525    
526    my $children;    my $children = $$self->{
527      'child'
528    };
 {  
   
   
 $children = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
529    
530        
531    
# Line 550  $children = $self->{ Line 533  $children = $self->{
533    
534    
535  ## -- Adds to children list  ## -- Adds to children list
536      push @$children, map {      push @$children, @new_child;
         
 $_->{'id'}  
   
     } @new_child;  
537      $r = $newChild;      $r = $newChild;
538        
539    
# Line 590  if ($child_nt == Line 569  if ($child_nt ==
569  not defined $newChild->  not defined $newChild->
570  owner_document  owner_document
571  ) {  ) {
572    my $bag =    CORE::delete $$newChild->{
573  $self->{'b'}  'impl'
 ;  
     
   
 {  
   
 CORE::delete  
 $bag->{${$bag->{${$newChild->{  
 'id'  
 }}}  
                           ->{'impl'} or \''}}  
                  ->{'lpmi'};  
 $bag->{  
 'm'  
 }++;  
 CORE::delete $bag->{${$newChild->{  
 'id'  
 }}}  
                  ->{'impl'};  
   
   
 }  
   
 ;  
     
   
 {  
   
   
 $bag->{${$newChild->{  
 'id'  
 }}}->{'od'}  
   = $self->{  
 'id'  
 };  
 $bag->{${$self->{  
 'id'  
 }}}  
     ->{'do'}->{${$newChild->{  
 'id'  
 }}}  
   = $newChild->{  
 'id'  
574  };  };
575      $$newChild->{
576    'od'
577  }  } = $self;
578      Scalar::Util::weaken ($$newChild->{
579  ;  'od'
580    });
581  }  }
582    
583    
# Line 970  local $Error::Depth = $Error::Depth - 1; Line 908  local $Error::Depth = $Error::Depth - 1;
908    
909  {  {
910    
911  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
912    
913    
914  }  }
# Line 991  local $Error::Depth = $Error::Depth - 1; Line 929  local $Error::Depth = $Error::Depth - 1;
929    
930  {  {
931    
932  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
933    
934    
935  }  }
# Line 1019  local $Error::Depth = $Error::Depth - 1; Line 957  local $Error::Depth = $Error::Depth - 1;
957    
958  {  {
959    
960  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
961    
962    
963  }  }
# Line 1042  local $Error::Depth = $Error::Depth - 1; Line 980  local $Error::Depth = $Error::Depth - 1;
980    
981  {  {
982    
983  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1';
984    
985    
986  }  }
# Line 1065  local $Error::Depth = $Error::Depth - 1; Line 1003  local $Error::Depth = $Error::Depth - 1;
1003    
1004  {  {
1005    
1006  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1';
1007    
1008    
1009  }  }
# Line 1099  local $Error::Depth = $Error::Depth - 1; Line 1037  local $Error::Depth = $Error::Depth - 1;
1037    
1038  {  {
1039    
1040  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/tree#insert-before-itself', 'rdata' => $refChild, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/tree#insert-before-itself', 'rdata' => $refChild, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1';
1041    
1042    
1043  }  }
# Line 1145  local $Error::Depth = $Error::Depth - 1; Line 1083  local $Error::Depth = $Error::Depth - 1;
1083    
1084  {  {
1085    
1086  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'refChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $refChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'refChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $refChild;
1087    
1088    
1089  }  }
# Line 1181  report Message::DOM::DOMCore::ManakaiDOM Line 1119  report Message::DOM::DOMCore::ManakaiDOM
1119      if ($child_nt ==      if ($child_nt ==
1120  11  11
1121  ) {  ) {
1122                $$newChild->{
1123    'child'
1124  {  } = [];
   
   
 $newChild->{  
 'b'  
 }->{${$newChild->{  
 'id'  
 }}}  
     ->{'child'} = [];  
   
   
 }  
   
 ;  
1125      } else {      } else {
1126        my $v;        my $v = $$nc_parent->{
1127          'child'
1128    };
 {  
   
   
 $v = $nc_parent->{  
 'b'  
 }->{${$nc_parent->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
1129        RP: for my $i (0..$#$v) {        RP: for my $i (0..$#$v) {
1130          my $nodeid = $v->[$i];          if ($v->[$i] eq $new_child[0]) {
         if (  
 (${$new_child[0]->{'id'}} eq ${$nodeid})  
 ) {  
1131            splice @$v, $i, 1, ();            splice @$v, $i, 1, ();
1132            last RP;            last RP;
1133          }          }
# Line 1229  $v = $nc_parent->{ Line 1137  $v = $nc_parent->{
1137    
1138    ## -- Rewrite the |parentNode| properties    ## -- Rewrite the |parentNode| properties
1139    for my $nc (@new_child) {    for my $nc (@new_child) {
1140            $$nc->{
1141    'parent'
1142  {  } = $self;
1143        Scalar::Util::weaken ($$nc->{
1144    'parent'
1145  $nc->{  });
 'b'  
 }->{${$nc->{  
 'id'  
 }}}  
     ->{'parent'} = $self->{  
 'id'  
 };  
   
   
 }  
   
 ;  
1146    }    }
1147    
1148    my $children;    my $children = $$self->{
1149      'child'
1150    };
 {  
   
   
 $children = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
1151    
1152        
1153    
# Line 1278  $children = $self->{ Line 1160  $children = $self->{
1160    
1161  ## -- Adds to children list  ## -- Adds to children list
1162      if ($index == -1) {      if ($index == -1) {
1163        push @$children, map {        push @$children, @new_child;
           
 $_->{'id'}  
   
       } @new_child;  
1164      } else {      } else {
1165        splice @$children, $index, 0, map {        splice @$children, $index, 0, @new_child;
           
 $_->{'id'}  
   
       } @new_child;  
1166      }      }
1167      $r = $newChild;      $r = $newChild;
1168        
# Line 1321  if ($child_nt == Line 1195  if ($child_nt ==
1195  not defined $newChild->  not defined $newChild->
1196  owner_document  owner_document
1197  ) {  ) {
1198    my $bag =    CORE::delete $$newChild->{
1199  $self->{'b'}  'impl'
 ;  
     
   
 {  
   
 CORE::delete  
 $bag->{${$bag->{${$newChild->{  
 'id'  
 }}}  
                           ->{'impl'} or \''}}  
                  ->{'lpmi'};  
 $bag->{  
 'm'  
 }++;  
 CORE::delete $bag->{${$newChild->{  
 'id'  
 }}}  
                  ->{'impl'};  
   
   
 }  
   
 ;  
     
   
 {  
   
   
 $bag->{${$newChild->{  
 'id'  
 }}}->{'od'}  
   = $self->{  
 'id'  
 };  
 $bag->{${$self->{  
 'id'  
 }}}  
     ->{'do'}->{${$newChild->{  
 'id'  
 }}}  
   = $newChild->{  
 'id'  
1200  };  };
1201      $$newChild->{
1202    'od'
1203  }  } = $self;
1204      Scalar::Util::weaken ($$newChild->{
1205  ;  'od'
1206    });
1207  }  }
1208    
1209    
# Line 1699  local $Error::Depth = $Error::Depth - 1; Line 1532  local $Error::Depth = $Error::Depth - 1;
1532    
1533  {  {
1534    
1535  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
1536    
1537    
1538  }  }
# Line 1720  local $Error::Depth = $Error::Depth - 1; Line 1553  local $Error::Depth = $Error::Depth - 1;
1553    
1554  {  {
1555    
1556  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
1557    
1558    
1559  }  }
# Line 1748  local $Error::Depth = $Error::Depth - 1; Line 1581  local $Error::Depth = $Error::Depth - 1;
1581    
1582  {  {
1583    
1584  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
1585    
1586    
1587  }  }
# Line 1771  local $Error::Depth = $Error::Depth - 1; Line 1604  local $Error::Depth = $Error::Depth - 1;
1604    
1605  {  {
1606    
1607  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1';
1608    
1609    
1610  }  }
# Line 1794  local $Error::Depth = $Error::Depth - 1; Line 1627  local $Error::Depth = $Error::Depth - 1;
1627    
1628  {  {
1629    
1630  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1';
1631    
1632    
1633  }  }
# Line 1831  local $Error::Depth = $Error::Depth - 1; Line 1664  local $Error::Depth = $Error::Depth - 1;
1664    
1665  {  {
1666    
1667  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/tree#replace-by-itself', 'rdata' => $oldChild, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/tree#replace-by-itself', 'rdata' => $oldChild, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1';
1668    
1669    
1670  }  }
# Line 1877  local $Error::Depth = $Error::Depth - 1; Line 1710  local $Error::Depth = $Error::Depth - 1;
1710    
1711  {  {
1712    
1713  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;
1714    
1715    
1716  }  }
# Line 1905  local $Error::Depth = $Error::Depth - 1; Line 1738  local $Error::Depth = $Error::Depth - 1;
1738    
1739  {  {
1740    
1741  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;
1742    
1743    
1744  }  }
# Line 1933  report Message::DOM::DOMCore::ManakaiDOM Line 1766  report Message::DOM::DOMCore::ManakaiDOM
1766      if ($child_nt ==      if ($child_nt ==
1767  11  11
1768  ) {  ) {
1769                $$newChild->{
1770    'child'
1771  {  } = [];
   
   
 $newChild->{  
 'b'  
 }->{${$newChild->{  
 'id'  
 }}}  
     ->{'child'} = [];  
   
   
 }  
   
 ;  
1772      } else {      } else {
1773        my $v;        my $v = $$nc_parent->{
1774          'child'
1775    };
 {  
   
   
 $v = $nc_parent->{  
 'b'  
 }->{${$nc_parent->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
1776        RP: for my $i (0..$#$v) {        RP: for my $i (0..$#$v) {
1777          my $nodeid = $v->[$i];          if ($v->[$i] eq $new_child[0]) {
         if (  
 (${$new_child[0]->{'id'}} eq ${$nodeid})  
 ) {  
1778            splice @$v, $i, 1, ();            splice @$v, $i, 1, ();
1779            last RP;            last RP;
1780          }          }
# Line 1981  $v = $nc_parent->{ Line 1784  $v = $nc_parent->{
1784    
1785    ## -- Rewrite the |parentNode| properties    ## -- Rewrite the |parentNode| properties
1786    for my $nc (@new_child) {    for my $nc (@new_child) {
1787            $$nc->{
1788    'parent'
1789  {  } = $self;
1790        Scalar::Util::weaken ($$nc->{
1791    'parent'
1792  $nc->{  });
 'b'  
 }->{${$nc->{  
 'id'  
 }}}  
     ->{'parent'} = $self->{  
 'id'  
 };  
   
   
 }  
   
 ;  
1793    }    }
1794    
1795    my $children;    my $children = $$self->{
1796      'child'
1797    };
 {  
   
   
 $children = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
1798    
1799        
1800    
# Line 2033  $children = $self->{ Line 1810  $children = $self->{
1810    
1811    
1812  ## -- Replaces the node  ## -- Replaces the node
1813      splice @$children, $index, 1, map {      splice @$children, $index, 1, @new_child;
1814              CORE::delete $$oldChild->{
1815  $_->{'id'}  'parent'
1816    };
     } @new_child;  
       
   
 {  
   
 CORE::delete  
 $oldChild->{  
 'b'  
 }->{${$oldChild->{  
 'id'  
 }}}  
                  ->{'parent'};  
   
   
 }  
   
 ;  
1817      $r = $oldChild;      $r = $oldChild;
1818        
1819    
# Line 2081  if ($child_nt == Line 1841  if ($child_nt ==
1841  not defined $newChild->  not defined $newChild->
1842  owner_document  owner_document
1843  ) {  ) {
1844    my $bag =    CORE::delete $$newChild->{
1845  $self->{'b'}  'impl'
 ;  
     
   
 {  
   
 CORE::delete  
 $bag->{${$bag->{${$newChild->{  
 'id'  
 }}}  
                           ->{'impl'} or \''}}  
                  ->{'lpmi'};  
 $bag->{  
 'm'  
 }++;  
 CORE::delete $bag->{${$newChild->{  
 'id'  
 }}}  
                  ->{'impl'};  
   
   
 }  
   
 ;  
     
   
 {  
   
   
 $bag->{${$newChild->{  
 'id'  
 }}}->{'od'}  
   = $self->{  
 'id'  
1846  };  };
1847  $bag->{${$self->{    $$newChild->{
1848  'id'  'od'
1849  }}}  } = $self;
1850      ->{'do'}->{${$newChild->{    Scalar::Util::weaken ($$newChild->{
1851  'id'  'od'
1852  }}}  });
   = $newChild->{  
 'id'  
 };  
   
   
 }  
   
 ;  
1853  }  }
1854    
1855    
# Line 2222  report Message::DOM::DOMCore::ManakaiDOM Line 1941  report Message::DOM::DOMCore::ManakaiDOM
1941  F:  F:
1942  {  {
1943    my $i = -1;    my $i = -1;
1944    for my $cld (@{$self->    my $v = $$self->{
1945  child_nodes  'child'
1946  }) {  };
1947      for my $cld (@$v) {
1948      $i++;      $i++;
1949      if ($cld eq $oldChild) {      if ($cld eq $oldChild) {
       my $v;  
         
   
 {  
   
   
 $v = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
1950        splice @$v, $i, 1, ();        splice @$v, $i, 1, ();
1951                CORE::delete $$oldChild->{
1952    'parent'
1953  {  };
   
 CORE::delete  
 $oldChild->{  
 'b'  
 }->{${$oldChild->{  
 'id'  
 }}}  
                  ->{'parent'};  
   
   
 }  
   
 ;  
1954        $r = $oldChild;        $r = $oldChild;
1955        last F;        last F;
1956      }      }
1957    }    }
1958        
1959  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/removeChildImpl+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/removeChildImpl', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;
1960    
1961  ;  ;
1962  } # F  } # F
# Line 2392  if Line 2082  if
2082  manakai_read_only  manakai_read_only
2083  ) {  ) {
2084        
2085  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError';
2086    
2087  ;  ;
2088  }  }
# Line 2402  report Message::DOM::DOMCore::ManakaiDOM Line 2092  report Message::DOM::DOMCore::ManakaiDOM
2092    
2093  ;  ;
2094    
2095  my @__old_children = @{$self->  for my $__old_child (@{${$self}->{
2096  child_nodes  'child'
2097    }}) {
2098      CORE::delete $$__old_child->{
2099    'parent'
2100  };  };
 for my $__old_child (@__old_children) {  
     
   
 {  
   
 CORE::delete  
 $__old_child->{  
 'b'  
 }->{${$__old_child->{  
 'id'  
 }}}  
                  ->{'parent'};  
   
   
 }  
   
 ;  
2101  }  }
2102    
2103  my @__new_children;  my @__new_children;
# Line 2429  if (defined $given and length $given) { Line 2105  if (defined $given and length $given) {
2105    my $__text = $self->    my $__text = $self->
2106  create_text_node  create_text_node
2107   ($given);   ($given);
2108    push @__new_children,    push @__new_children, $__text;
2109  $__text->{'id'}    $$__text->{
2110  ;  'parent'
2111      } = $self;
2112      Scalar::Util::weaken ($$__text->{
2113  {  'parent'
2114    });
   
 $__text->{  
 'b'  
 }->{${$__text->{  
 'id'  
 }}}  
     ->{'parent'} = $self->{  
 'id'  
 };  
   
   
2115  }  }
2116    
2117  ;  ${$self}->{
2118  }  'child'
2119    } = \@__new_children;
   
   
 {  
   
   
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'child'} = \@__new_children;  
   
   
 }  
   
 ;  
2120    
2121    
2122  }  }
# Line 2504  my $r; Line 2153  my $r;
2153    
2154  $feature =~ s/^\+//;  $feature =~ s/^\+//;
2155    
 ## TODO: Remove this code and implement autoload  
 if ($feature eq  
 'http://suika.fam.cx/www/2006/feature/xdoctype'  
 ) {  
   require Message::DOM::XDoctype;  
 }  
   
   
2156    
2157  {  {
2158    
2159  if  if
2160  ($Message::DOM::DOMFeature::ClassInfo->{ref $self}  ($Message::Util::AutoLoad::Registry::Feature->{$feature}->{$version}) {
       ->{has_feature}->{$feature}->{$version} or  
     $Message::Util::AutoLoad::Registry::Feature  
         ->{$feature}->{$version}) {  
2161    $r = $self;    $r = $self;
 } else {  
   CLASS: for my $__class (sort {  
     $Message::DOM::ClassPoint{$b} <=> $Message::DOM::ClassPoint{$a}  
   } grep {  
     $Message::DOM::DOMFeature::ClassInfo->{'Message::DOM::Document::ManakaiDOMDocument'}  
         ->{compat_class}->{$_}  
   } keys %{$Message::DOM::DOMFeature::ClassInfo->{'Message::DOM::Document::ManakaiDOMDocument'}  
                ->{compat_class} or {}}) {  
     if ($Message::DOM::DOMFeature::ClassInfo->{$__class}  
             ->{has_feature}->{$feature}->{$version} or  
         $Message::Util::AutoLoad::Registry::Feature  
             ->{$feature}->{$version}) {  
         
   
 {  
   
   
 $r = ${($self->{'b'})->{${($self->{'id'})}}->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => ($self->{'id'}),  
     
 'b'  
  => ($self->{'b'}),  
 }, {  
           'nrcls' => \$__class,  
         });  
 ($self->{'b'})->{${($self->{'id'})}}->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
       last CLASS;  
     }  
   } # CLASS  
2162  }  }
2163    
2164    
# Line 2600  my $r = ''; Line 2198  my $r = '';
2198  {  {
2199    
2200    
2201  {  $r = $$self->{
2202    'buri'
2203    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'buri'};  
   
   
 }  
   
 ;  
2204  unless (defined $r) {  unless (defined $r) {
2205        $r = $$self->{
2206    'duri'
2207  {  };
   
   
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'duri'};  
   
   
 }  
   
 ;  
2208  }  }
2209    
2210    
# Line 2640  $r; Line 2214  $r;
2214  report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::Document::ManakaiDOMDocument', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'base_uri';  report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'get', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/Util/Error/DOMException#READ_ONLY_ATTRIBUTE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::Document::ManakaiDOMDocument', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'base_uri';
2215  }  }
2216  }  }
 sub create_element ($$) {  
 my ($self, $tagName) = @_;  
 my $r;  
   
 {  
   
 my  
 $strict = $self->  
 strict_error_checking  
 ;  
 if ($strict) {  
   my $version = $self->  
 xml_version  
 ;  
     
   
 {  
   
 if  
 (defined $tagName) {  
     
   
 {  
   
 if  
 (((not defined $version or $version eq '1.0') and  
          not  
 ($tagName =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/)  
 ) or  
         (defined $version and $version eq '1.1' and  
          not  
 ($tagName =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/)  
 )) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INVALID_CHARACTER_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_BAD_NAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $tagName, 'http://www.w3.org/2001/04/infoset#version' => $version, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_PARAM_NAME';  
   
 ;  
     }  
     
   
   
 }  
   
 ;  
     
   
 ;  
 }  
   
   
 }  
   
 ;  
 }  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $self->  
 strict_error_checking  
  (  
 0  
 );  
   $r = $self->  
 create_element_ns  
  (  
 undef  
 , [  
 undef  
 , $tagName]);  
   $self->  
 strict_error_checking  
  ($strict);  
   
   
   
 }  
   
   
 ;}  
   
 ;  
   
   
 }  
 $r}  
 sub create_element_ns ($$$) {  
 my ($self, $namespaceURI, $qualifiedName) = @_;  
   
 {  
   
 if  
 (CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) {  
     
 report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/main#empty-namespace-uri', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:tag:suika.fam.cx,2005-09:1162643135:13819:2PFx921643+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   
     
   
 {  
   
   
 $namespaceURI = undef;  
     
   
   
 }  
   
 ;  
 }  
   
   
 }  
 my $r;  
   
 {  
   
 require  
 Message::DOM::Element;  
   
 my ($prefix, $lname) = ref $qualifiedName eq 'ARRAY'  
                          ? @$qualifiedName  
                          : split /:/, $qualifiedName, 2;  
 ($prefix, $lname) = (  
 undef  
 , $prefix) unless defined $lname;  
 $qualifiedName = defined $prefix ? $prefix.':'.$lname : $lname;  
   
 if ($self->  
 strict_error_checking  
 ) {  
   my $version = $self->  
 xml_version  
 ;  
     
   
 {  
   
 if  
 (defined $version and $version eq '1.1') {  
     unless (  
 ($qualifiedName =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/)  
 ) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INVALID_CHARACTER_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_BAD_NAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $qualifiedName, 'http://www.w3.org/2001/04/infoset#version' => '1.1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_NAME';  
   
 ;  
     }  
     unless (  
 ($qualifiedName =~ /\A\p{InXMLNCNameStartChar11}\p{InXMLNCNameChar11}*(?::\p{InXMLNCNameStartChar11}\p{InXMLNCNameChar11}*)?\z/)  
 ) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_MALFORMED_QNAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $qualifiedName, 'http://www.w3.org/2001/04/infoset#version' => '1.1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_NAME';  
   
 ;  
     }  
   } else {  
     unless (  
 ($qualifiedName =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/)  
 ) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INVALID_CHARACTER_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_BAD_NAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $qualifiedName, 'http://www.w3.org/2001/04/infoset#version' => $version, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_NAME';  
   
 ;  
     }  
     unless (  
 ($qualifiedName =~ /\A\p{InXML_NCNameStartChar10}\p{InXMLNCNameChar10}*(?::\p{InXML_NCNameStartChar10}\p{InXMLNCNameChar10}*)?\z/)  
 ) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_MALFORMED_QNAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $qualifiedName, 'http://www.w3.org/2001/04/infoset#version' => $version, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_NAME';  
   
 ;  
     }  
   }  
   
   
 }  
   
 ;  
     
   
 {  
   
 if  
 (defined $prefix) {  
   if (not defined $namespaceURI) {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#prefix' => $prefix, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_PREFIX_WITH_NULL_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   } elsif ($prefix eq 'xml' and $namespaceURI ne  
 'http://www.w3.org/XML/1998/namespace'  
 ) {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#namespaceName' => $namespaceURI, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_XML_WITH_OTHER_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   } elsif ($prefix eq 'xmlns' and $namespaceURI ne  
 'http://www.w3.org/2000/xmlns/'  
 ) {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#namespaceName' => $namespaceURI, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_XMLNS_WITH_OTHER_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   } elsif ($namespaceURI eq  
 'http://www.w3.org/XML/1998/namespace' and  
 $prefix ne 'xml') {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#prefix' => $prefix, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_OTHER_WITH_XML_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   } elsif ($namespaceURI eq  
 'http://www.w3.org/2000/xmlns/' and  
 $prefix ne 'xmlns') {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#prefix' => $prefix, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_OTHER_WITH_XMLNS_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   }  
 } else { ## No prefix  
   if (not defined $namespaceURI) {  
     #  
   } elsif ($namespaceURI eq  
 'http://www.w3.org/2000/xmlns/' and  
 $lname ne 'xmlns') {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#prefix' => undef, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_OTHER_WITH_XMLNS_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   }  
 }  
   
   
 }  
   
 ;  
   if (defined $namespaceURI and $namespaceURI eq  
 'http://www.w3.org/2000/xmlns/' and  
         
 ($qualifiedName eq 'xmlns' or  
        (defined $prefix and $prefix eq 'xmlns'))) {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'create_element_ns', 'http://www.w3.org/2001/04/infoset#prefix' => $prefix, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::Document::ManakaiDOMDocument', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'qualifiedName', 'http://www.w3.org/2001/04/infoset#localName' => $lname, 'http://www.w3.org/2001/04/infoset#namespaceName' => $namespaceURI, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_OTHER_WITH_XMLNS_URI';  
   
 ;  
   }  
 }  
   
 my $bag =  
 $self->{'b'}  
 ;  
 my $stem;  
   
   
 {  
   
   
 $stem = 'Message::DOM::Element::ManakaiDOMElement'->___create_node_stem ($bag, {  
     
 'rc'  
  => 0,  
     
 'id'  
  => \  
 (  
   'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' .  
   (++$Message::Util::ManakaiNode::UniqueIDN)  
 )  
 ,  
 }, {  
     'od' => $self,  
     'ns' => \$namespaceURI,  
     'pfx' => \$prefix,  
     'ln' => \$lname,  
   });  
   
   
 {  
   
 if  
 (defined 'Message::DOM::Element::ManakaiDOMElement') {  
   if (ref 'Message::DOM::Element::ManakaiDOMElement' eq 'SCALAR') {  
     $stem->{'cls'} = 'Message::DOM::Element::ManakaiDOMElement';  
   } elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::Element::ManakaiDOMElement'}) {  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::Element::ManakaiDOMElement'};  
   } else {  
     require Scalar::Util;  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::Element::ManakaiDOMElement'} = \('Message::DOM::Element::ManakaiDOMElement');  
     Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::Element::ManakaiDOMElement'});  
   }  
 } else {  
   CORE::delete $stem->{'cls'};  
 }  
   
   
 }  
   
 ;  
 $bag->{${$stem->{  
 'id'  
 }}} = $stem;  
   
   
 }  
   
 ;  
   
   
 {  
   
   
 $r = ${$stem->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $stem->{  
 'id'  
 },  
     
 'b'  
  => $bag,  
 }, {  
   });  
 $stem->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
   
 ## Default attributes  
   
   
 {  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   XDA:  
 {  
     my $__cfg = $self->  
 dom_config  
 ;  
     last XDA unless $__cfg->  
 get_parameter  
   
                               (  
 'http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute'  
 );  
     my $__doctype = $self->  
 doctype  
 ;  
     last XDA unless defined $__doctype;  
     $__doctype = $__doctype->  
 get_feature  
   
                              (  
 'http://suika.fam.cx/www/2006/feature/XDoctype'  
  => '3.0');  
     last XDA unless defined $__doctype;  
     my $__et = $__doctype->  
 get_element_type_definition_node  
   
                              ($qualifiedName);  
     if ($__et) {  
       my $__orig_strict = $self->  
 strict_error_checking  
 ;  
       $self->  
 strict_error_checking  
  (  
 0  
 );  
       my %__gattr;  
       my %__has_attr;  
       my %__pfx_to_uri;  
       my $__copy_asis = $__cfg->  
 get_parameter  
   
                                (  
 'http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree'  
 );  
       $__cfg->  
 set_parameter  
   
                     (  
 'http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree'  
  =>  
 1  
 );  
       for my $__at (@{$__et->  
 attribute_definitions  
 }) {  
         my $__at_default = $__at->  
 default_type  
 ;  
         if ($__at_default ==  
 4 or  
               
 $__at_default ==  
 1  
 ) {  
           my ($__nn1, $__nn2) = split /:/, $__at->  
 node_name  
 ;  
           if (defined $__nn2) { # prefixed  
             if ($__nn1 eq 'xmlns') {  
               ## TODO: NCName check, prefix check and NSURI check  
               my $__attr = $self->  
 create_attribute_ns  
   
                                         (  
 'http://www.w3.org/2000/xmlns/'  
 , [$__nn1, $__nn2]);  
               for my $__at_child (@{$__at->  
 child_nodes  
 }) {  
                 $__attr->  
 append_child  
   
                            ($__at_child->  
 clone_node  
  (  
 1  
 ));  
               }  
               $__attr->  
 manakai_attribute_type  
   
                          ($__at->  
 declared_type  
 );  
               my $__nsuri = $__attr->  
 value  
 ;  
               ## TODO: Namespace well-formedness check (NSURI), v1.1 chk  
               $__pfx_to_uri{$__nn2} = $__nsuri;  
               $r->  
 set_attribute_node_ns  
  ($__attr);  
                        ## This method changes |specified| flag  
               $__attr->  
 specified  
  (  
 0  
 );  
               $__has_attr{  
 'http://www.w3.org/2000/xmlns/'  
 }->{$__nn2} =  
 1  
 ;  
             } else {  
               ## TODO: NCName check  
               $__gattr{$__nn1}->{$__nn2} = $__at;  
             }  
           } else {            # no prefixed  
             my $__attr;  
             if ($__nn1 eq 'xmlns') {  
               $__attr = $self->  
 create_attribute_ns  
   
                                         (  
 'http://www.w3.org/2000/xmlns/'  
 , 'xmlns');  
               $__has_attr{  
 'http://www.w3.org/2000/xmlns/'  
 }->{xmlns} =  
 1  
 ;  
             } else {  
               $__attr = $self->  
 create_attribute_ns  
   
                                         (  
 undef  
 , $__nn1);  
               ## TODO: NCName check  
             }  
             for my $__at_child (@{$__at->  
 child_nodes  
 }) {  
               $__attr->  
 append_child  
   
                          ($__at_child->  
 clone_node  
  (  
 1  
 ));  
             }  
             $__attr->  
 manakai_attribute_type  
   
                        ($__at->  
 declared_type  
 );  
             ## TODO: Namespace well-formedness check (NSURI)  
             $r->  
 set_attribute_node_ns  
  ($__attr);  
                        ## This method changes |specified| flag  
             $__attr->  
 specified  
  (  
 0  
 );  
           }  
         }  
       } # attrdefs  
       for my $__pfx (keys %__gattr) {  
         my $__nsuri = $__pfx_to_uri{$__pfx};  
         unless (defined $__nsuri) {  
           ## TODO: Namespace well-formedness error  
         }  
         LN: for my $__ln (keys %{$__gattr{$__pfx}}) {  
           if ($__has_attr{defined $__nsuri ? $__nsuri : ''}->{$__ln}) {  
             ## TODO: Namespace well-formedness error  
             next LN;  
           }  
           ## TODO: NCName check, prefix check and NSURI check  
           my $__at = $__gattr{$__pfx}->{$__ln};  
           my $__attr = $self->  
 create_attribute_ns  
   
                                     ($__nsuri, [$__pfx, $__ln]);  
           for my $__at_child (@{$__at->  
 child_nodes  
 }) {  
             $__attr->  
 append_child  
   
                        ($__at_child->  
 clone_node  
  (  
 1  
 ));  
           }  
           $__attr->  
 manakai_attribute_type  
   
                      ($__at->  
 declared_type  
 );  
           $r->  
 set_attribute_node_ns  
  ($__attr);  
                        ## This method changes |specified| flag  
           $__attr->  
 specified  
  (  
 0  
 );  
           $__has_attr{defined $__nsuri ? $__nsuri : ''}->{$__ln} =  
 1  
 ;  
         } # LN  
       } # pfx  
       $__cfg->  
 set_parameter  
   
               (  
 'http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree'  
  => $__copy_asis);  
       $self->  
 strict_error_checking  
  ($__orig_strict);  
     }  
   } # XDA  
   
   
   
 }  
   
   
 ;}  
   
 ;  
   
   
 }  
   
 ;  
   
   
 }  
 $r}  
 sub create_attribute ($$) {  
 my ($self, $name) = @_;  
 my $r;  
   
 {  
   
 my  
 $strict = $self->  
 strict_error_checking  
 ;  
 if ($strict) {  
   my $version = $self->  
 xml_version  
 ;  
     
   
 {  
   
 if  
 (defined $name) {  
     
   
 {  
   
 if  
 (((not defined $version or $version eq '1.0') and  
          not  
 ($name =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/)  
 ) or  
         (defined $version and $version eq '1.1' and  
          not  
 ($name =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/)  
 )) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INVALID_CHARACTER_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_BAD_NAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $name, 'http://www.w3.org/2001/04/infoset#version' => $version, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_PARAM_NAME';  
   
 ;  
     }  
     
   
   
 }  
   
 ;  
     
   
 ;  
 }  
   
   
 }  
   
 ;  
 }  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   
   $self->  
 strict_error_checking  
  (  
 0  
 );  
   $r = $self->  
 create_attribute_ns  
  (  
 undef  
 , [  
 undef  
 , $name]);  
   $self->  
 strict_error_checking  
  ($strict);  
   
   
   
 }  
   
   
 ;}  
   
 ;  
   
   
 }  
 $r}  
 sub create_attribute_ns ($$$) {  
 my ($self, $namespaceURI, $qualifiedName) = @_;  
   
 {  
   
 if  
 (CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) {  
     
 report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/main#empty-namespace-uri', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:tag:suika.fam.cx,2005-09:1162643135:13819:2PFx921643+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   
     
   
 {  
   
   
 $namespaceURI = undef;  
     
   
   
 }  
   
 ;  
 }  
   
   
 }  
 my $r;  
   
 {  
   
 require  
 Message::DOM::Element;  
   
 my ($prefix, $lname) = ref $qualifiedName eq 'ARRAY'  
                          ? @$qualifiedName  
                          : split /:/, $qualifiedName, 2;  
 ($prefix, $lname) = (  
 undef  
 , $prefix) unless defined $lname;  
   
 ## TODO: autoload  
 if ((defined $namespaceURI and $namespaceURI eq  
 'http://www.w3.org/XML/1998/namespace'  
 ) or  
     ($lname =~ /^xml:/)) {  
   require Message::DOM::XML;  
 }  
   
 if ($self->  
 strict_error_checking  
 ) {  
   my $version = $self->  
 xml_version  
 ;  
   $qualifiedName = defined $prefix ? $prefix.':'.$lname  
                                    : $lname;  
     
   
 {  
   
 if  
 (defined $version and $version eq '1.1') {  
     unless (  
 ($qualifiedName =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/)  
 ) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INVALID_CHARACTER_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_BAD_NAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $qualifiedName, 'http://www.w3.org/2001/04/infoset#version' => '1.1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_NAME';  
   
 ;  
     }  
     unless (  
 ($qualifiedName =~ /\A\p{InXMLNCNameStartChar11}\p{InXMLNCNameChar11}*(?::\p{InXMLNCNameStartChar11}\p{InXMLNCNameChar11}*)?\z/)  
 ) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_MALFORMED_QNAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $qualifiedName, 'http://www.w3.org/2001/04/infoset#version' => '1.1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_NAME';  
   
 ;  
     }  
   } else {  
     unless (  
 ($qualifiedName =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/)  
 ) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INVALID_CHARACTER_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_BAD_NAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $qualifiedName, 'http://www.w3.org/2001/04/infoset#version' => $version, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_NAME';  
   
 ;  
     }  
     unless (  
 ($qualifiedName =~ /\A\p{InXML_NCNameStartChar10}\p{InXMLNCNameChar10}*(?::\p{InXML_NCNameStartChar10}\p{InXMLNCNameChar10}*)?\z/)  
 ) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_MALFORMED_QNAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $qualifiedName, 'http://www.w3.org/2001/04/infoset#version' => $version, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_NAME';  
   
 ;  
     }  
   }  
   
   
 }  
   
 ;  
     
   
 {  
   
 if  
 (defined $prefix) {  
   if (not defined $namespaceURI) {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#prefix' => $prefix, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_PREFIX_WITH_NULL_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   } elsif ($prefix eq 'xml' and $namespaceURI ne  
 'http://www.w3.org/XML/1998/namespace'  
 ) {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#namespaceName' => $namespaceURI, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_XML_WITH_OTHER_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   } elsif ($prefix eq 'xmlns' and $namespaceURI ne  
 'http://www.w3.org/2000/xmlns/'  
 ) {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#namespaceName' => $namespaceURI, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_XMLNS_WITH_OTHER_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   } elsif ($namespaceURI eq  
 'http://www.w3.org/XML/1998/namespace' and  
 $prefix ne 'xml') {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#prefix' => $prefix, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_OTHER_WITH_XML_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   } elsif ($namespaceURI eq  
 'http://www.w3.org/2000/xmlns/' and  
 $prefix ne 'xmlns') {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#prefix' => $prefix, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_OTHER_WITH_XMLNS_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   }  
 } else { ## No prefix  
   if (not defined $namespaceURI) {  
     #  
   } elsif ($namespaceURI eq  
 'http://www.w3.org/2000/xmlns/' and  
 $lname ne 'xmlns') {  
       
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NAMESPACE_ERR', 'http://www.w3.org/2001/04/infoset#prefix' => undef, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_NS_OTHER_WITH_XMLNS_URI', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23checkXMLNamesQName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  
   
 ;  
   }  
 }  
   
   
 }  
   
 ;  
 }  
   
 my $bag =  
 $self->{'b'}  
 ;  
 my $stem;  
   
   
 {  
   
   
 $stem = 'Message::DOM::Element::ManakaiDOMAttr'->___create_node_stem ($bag, {  
     
 'rc'  
  => 0,  
     
 'id'  
  => \  
 (  
   'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' .  
   (++$Message::Util::ManakaiNode::UniqueIDN)  
 )  
 ,  
 }, {  
     'od' => $self,  
     'ns' => \$namespaceURI,  
     'pfx' => \$prefix,  
     'ln' => \$lname,  
     'specified' => 1,  
   });  
   
   
 {  
   
 if  
 (defined 'Message::DOM::Element::ManakaiDOMAttr') {  
   if (ref 'Message::DOM::Element::ManakaiDOMAttr' eq 'SCALAR') {  
     $stem->{'cls'} = 'Message::DOM::Element::ManakaiDOMAttr';  
   } elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::Element::ManakaiDOMAttr'}) {  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::Element::ManakaiDOMAttr'};  
   } else {  
     require Scalar::Util;  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::Element::ManakaiDOMAttr'} = \('Message::DOM::Element::ManakaiDOMAttr');  
     Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::Element::ManakaiDOMAttr'});  
   }  
 } else {  
   CORE::delete $stem->{'cls'};  
 }  
   
   
 }  
   
 ;  
 $bag->{${$stem->{  
 'id'  
 }}} = $stem;  
   
   
 }  
   
 ;  
   
   
 {  
   
   
 $r = ${$stem->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $stem->{  
 'id'  
 },  
     
 'b'  
  => $bag,  
 }, {  
   });  
 $stem->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
   
 ## Attribute type information  
 if ((defined $namespaceURI and $namespaceURI eq  
 'http://www.w3.org/XML/1998/namespace' and  
       
 $lname eq 'id') or  
     (not defined $namespaceURI and $lname eq 'xml:id')) {  
     
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
     if  
 ($self->  
 dom_config  
   
              ->  
 get_parameter  
   
                  (  
 'http://suika.fam.cx/www/2006/dom-config/xml-id'  
 )) {  
       $r->  
 manakai_attribute_type  
  (  
 2  
 );  
     }  
     
   
   
 }  
   
   
 ;}  
   
 ;  
 }  
   
   
 }  
 $r}  
 sub create_text_node ($$) {  
 my ($self, $data) = @_;  
 my $r;  
   
 {  
   
 require  
 Message::DOM::CharacterData;  
 my $bag =  
 $self->{'b'}  
 ;  
 my $stem;  
   
   
 {  
   
   
 $stem = 'Message::DOM::CharacterData::ManakaiDOMText'->___create_node_stem ($bag, {  
     
 'rc'  
  => 0,  
     
 'id'  
  => \  
 (  
   'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' .  
   (++$Message::Util::ManakaiNode::UniqueIDN)  
 )  
 ,  
 }, {  
     'od' => $self,  
     'con' => \$data,  
   });  
   
   
 {  
   
 if  
 (defined 'Message::DOM::CharacterData::ManakaiDOMText') {  
   if (ref 'Message::DOM::CharacterData::ManakaiDOMText' eq 'SCALAR') {  
     $stem->{'cls'} = 'Message::DOM::CharacterData::ManakaiDOMText';  
   } elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::CharacterData::ManakaiDOMText'}) {  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::CharacterData::ManakaiDOMText'};  
   } else {  
     require Scalar::Util;  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::CharacterData::ManakaiDOMText'} = \('Message::DOM::CharacterData::ManakaiDOMText');  
     Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::CharacterData::ManakaiDOMText'});  
   }  
 } else {  
   CORE::delete $stem->{'cls'};  
 }  
   
   
 }  
   
 ;  
 $bag->{${$stem->{  
 'id'  
 }}} = $stem;  
   
   
 }  
   
 ;  
   
   
 {  
   
   
 $r = ${$stem->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $stem->{  
 'id'  
 },  
     
 'b'  
  => $bag,  
 }, {  
   });  
 $stem->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
   
   
 }  
 $r}  
 sub create_cdata_section ($$) {  
 my ($self, $data) = @_;  
 my $r;  
   
 {  
   
 require  
 Message::DOM::XML;  
 my $bag =  
 $self->{'b'}  
 ;  
 my $stem;  
   
   
 {  
   
   
 $stem = 'Message::DOM::XML::ManakaiDOMCDATASection'->___create_node_stem ($bag, {  
     
 'rc'  
  => 0,  
     
 'id'  
  => \  
 (  
   'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' .  
   (++$Message::Util::ManakaiNode::UniqueIDN)  
 )  
 ,  
 }, {  
     'od' => $self,  
     'con' => \$data,  
   });  
   
   
 {  
   
 if  
 (defined 'Message::DOM::XML::ManakaiDOMCDATASection') {  
   if (ref 'Message::DOM::XML::ManakaiDOMCDATASection' eq 'SCALAR') {  
     $stem->{'cls'} = 'Message::DOM::XML::ManakaiDOMCDATASection';  
   } elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMCDATASection'}) {  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMCDATASection'};  
   } else {  
     require Scalar::Util;  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMCDATASection'} = \('Message::DOM::XML::ManakaiDOMCDATASection');  
     Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMCDATASection'});  
   }  
 } else {  
   CORE::delete $stem->{'cls'};  
 }  
   
   
 }  
   
 ;  
 $bag->{${$stem->{  
 'id'  
 }}} = $stem;  
   
   
 }  
   
 ;  
   
   
 {  
   
   
 $r = ${$stem->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $stem->{  
 'id'  
 },  
     
 'b'  
  => $bag,  
 }, {  
   });  
 $stem->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
   
   
 }  
 $r}  
 sub create_comment ($$) {  
 my ($self, $data) = @_;  
 my $r;  
   
 {  
   
 require  
 Message::DOM::CharacterData;  
 my $bag =  
 $self->{'b'}  
 ;  
 my $stem;  
   
   
 {  
   
   
 $stem = 'Message::DOM::CharacterData::ManakaiDOMComment'->___create_node_stem ($bag, {  
     
 'rc'  
  => 0,  
     
 'id'  
  => \  
 (  
   'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' .  
   (++$Message::Util::ManakaiNode::UniqueIDN)  
 )  
 ,  
 }, {  
     'od' => $self,  
     'con' => \$data,  
   });  
   
   
 {  
   
 if  
 (defined 'Message::DOM::CharacterData::ManakaiDOMComment') {  
   if (ref 'Message::DOM::CharacterData::ManakaiDOMComment' eq 'SCALAR') {  
     $stem->{'cls'} = 'Message::DOM::CharacterData::ManakaiDOMComment';  
   } elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::CharacterData::ManakaiDOMComment'}) {  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::CharacterData::ManakaiDOMComment'};  
   } else {  
     require Scalar::Util;  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::CharacterData::ManakaiDOMComment'} = \('Message::DOM::CharacterData::ManakaiDOMComment');  
     Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::CharacterData::ManakaiDOMComment'});  
   }  
 } else {  
   CORE::delete $stem->{'cls'};  
 }  
   
   
 }  
   
 ;  
 $bag->{${$stem->{  
 'id'  
 }}} = $stem;  
   
   
 }  
   
 ;  
   
   
 {  
   
   
 $r = ${$stem->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $stem->{  
 'id'  
 },  
     
 'b'  
  => $bag,  
 }, {  
   });  
 $stem->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
   
   
 }  
 $r}  
2217  sub create_document_fragment ($) {  sub create_document_fragment ($) {
2218  my ($self) = @_;  my ($self) = @_;
2219  my $r;  my $r;
2220    
2221  {  {
2222    
 my  
 $bag =  
 $self->{'b'}  
 ;  
 my $stem;  
   
   
 {  
   
   
 $stem = 'Message::DOM::Document::ManakaiDOMDocumentFragment'->___create_node_stem ($bag, {  
     
 'rc'  
  => 0,  
     
 'id'  
  => \  
 (  
   'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' .  
   (++$Message::Util::ManakaiNode::UniqueIDN)  
 )  
 ,  
 }, {  
     'od' => $self,  
   });  
   
   
 {  
   
 if  
 (defined 'Message::DOM::Document::ManakaiDOMDocumentFragment') {  
   if (ref 'Message::DOM::Document::ManakaiDOMDocumentFragment' eq 'SCALAR') {  
     $stem->{'cls'} = 'Message::DOM::Document::ManakaiDOMDocumentFragment';  
   } elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::Document::ManakaiDOMDocumentFragment'}) {  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::Document::ManakaiDOMDocumentFragment'};  
   } else {  
     require Scalar::Util;  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::Document::ManakaiDOMDocumentFragment'} = \('Message::DOM::Document::ManakaiDOMDocumentFragment');  
     Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::Document::ManakaiDOMDocumentFragment'});  
   }  
 } else {  
   CORE::delete $stem->{'cls'};  
 }  
   
   
 }  
   
 ;  
 $bag->{${$stem->{  
 'id'  
 }}} = $stem;  
   
   
 }  
   
 ;  
   
   
 {  
   
   
 $r = ${$stem->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $stem->{  
 'id'  
 },  
     
 'b'  
  => $bag,  
 }, {  
   });  
 $stem->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
   
   
 }  
 $r}  
 sub create_entity_reference ($$) {  
 my ($self, $name) = @_;  
 my $r;  
   
 {  
   
 require  
 Message::DOM::XML;  
 our $CreateEntityReference_OpenEntity;  
   ## NOTE: Multithread unsafe  
2223    
2224  my $orig_strict = $self->  $r = bless \{
 strict_error_checking  
 ;  
 if ($orig_strict) {  
   my $version = $self->  
 xml_version  
 ;  
2225        
2226    'od'
2227  {   => $self,
   
 if  
 (defined $name) {  
     
   
 {  
   
 if  
 (((not defined $version or $version eq '1.0') and  
          not  
 ($name =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/)  
 ) or  
         (defined $version and $version eq '1.1' and  
          not  
 ($name =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/)  
 )) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INVALID_CHARACTER_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_BAD_NAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $name, 'http://www.w3.org/2001/04/infoset#version' => $version, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_PARAM_NAME';  
   
 ;  
     }  
     
   
   
 }  
   
 ;  
2228        
2229    'child'
2230  ;   => [],
2231  }  },
2232    'Message::DOM::Document::ManakaiDOMDocumentFragment'
2233    ;
2234  }  Scalar::Util::weaken ($$r->{
2235    'od'
2236  ;  });
 }  
   
 my $bag =  
 $self->{'b'}  
 ;  
 my $stem;  
   
   
 {  
   
   
 $stem = 'Message::DOM::XML::ManakaiDOMEntityReference'->___create_node_stem ($bag, {  
     
 'rc'  
  => 0,  
     
 'id'  
  => \  
 (  
   'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' .  
   (++$Message::Util::ManakaiNode::UniqueIDN)  
 )  
 ,  
 }, {  
     'xname' => \$name,  
     'od' => $self,  
   });  
   
   
 {  
   
 if  
 (defined 'Message::DOM::XML::ManakaiDOMEntityReference') {  
   if (ref 'Message::DOM::XML::ManakaiDOMEntityReference' eq 'SCALAR') {  
     $stem->{'cls'} = 'Message::DOM::XML::ManakaiDOMEntityReference';  
   } elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMEntityReference'}) {  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMEntityReference'};  
   } else {  
     require Scalar::Util;  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMEntityReference'} = \('Message::DOM::XML::ManakaiDOMEntityReference');  
     Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMEntityReference'});  
   }  
 } else {  
   CORE::delete $stem->{'cls'};  
 }  
   
   
 }  
   
 ;  
 $bag->{${$stem->{  
 'id'  
 }}} = $stem;  
   
   
 }  
   
 ;  
   
   
 {  
   
   
 $r = ${$stem->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $stem->{  
 'id'  
 },  
     
 'b'  
  => $bag,  
 }, {  
   });  
 $stem->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
   
 ## Expansion  
   
   
 {  
   
 local $Error::Depth = $Error::Depth + 1;  
   
 {  
   
   
   unless  
 ($CreateEntityReference_OpenEntity->{$name}) {  
     local $CreateEntityReference_OpenEntity->{$name} =  
 1  
 ;  
     my $__doctype = $self->  
 doctype  
 ;  
     $__doctype = $__doctype->  
 get_feature  
   
                              (  
 'http://suika.fam.cx/www/2006/feature/XDoctype'  
  => '3.0')  
       if $__doctype;  
     if ($__doctype) {  
       my $__et = $__doctype->  
 get_general_entity_node  
  ($name);  
       if ($__et) {  
         $self->  
 strict_error_checking  
  (  
 0  
 );  
         my @node;  
         for my $c (@{$__et->  
 child_nodes  
 }) {  
           my $clone = $c->  
 clone_node  
  (  
 1  
 );  
           $r->  
 append_child  
  ($clone);  
           push @node, $clone;  
         }  
         $r->  
 manakai_expanded  
   
               ($__et->  
 has_replacement_tree  
 );  
         $self->  
 strict_error_checking  
  ($orig_strict);  
       } # entity  
     } # doctype  
   }  
   $r->  
 manakai_set_read_only  
  (  
 1  
 ,  
 1  
 );  
   
   
   
 }  
   
   
 ;}  
   
 ;  
   
   
 }  
 $r}  
 sub create_processing_instruction ($$$) {  
 my ($self, $target, $data) = @_;  
 my $r;  
   
 {  
   
 require  
 Message::DOM::XML;  
   
 if ($self->  
 strict_error_checking  
 ) {  
   my $version = $self->  
 xml_version  
 ;  
     
   
 {  
   
 if  
 (defined $target) {  
     
   
 {  
   
 if  
 (((not defined $version or $version eq '1.0') and  
          not  
 ($target =~ /\A\p{InXML_NameStartChar10}\p{InXMLNameChar10}*\z/)  
 ) or  
         (defined $version and $version eq '1.1' and  
          not  
 ($target =~ /\A\p{InXMLNameStartChar11}\p{InXMLNameChar11}*\z/)  
 )) {  
         
 report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INVALID_CHARACTER_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_BAD_NAME', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#name' => $target, 'http://www.w3.org/2001/04/infoset#version' => $version, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2004/dom/main%23ensureXMLName+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => '$INPUT_PARAM_NAME';  
   
 ;  
     }  
     
   
   
 }  
   
 ;  
     
   
 ;  
 }  
   
   
 }  
   
 ;  
 }  
   
 my $bag =  
 $self->{'b'}  
 ;  
 $data = '' unless defined $data;  
 my $stem;  
   
   
 {  
   
   
 $stem = 'Message::DOM::XML::ManakaiDOMProcessingInstruction'->___create_node_stem ($bag, {  
     
 'rc'  
  => 0,  
     
 'id'  
  => \  
 (  
   'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' .  
   (++$Message::Util::ManakaiNode::UniqueIDN)  
 )  
 ,  
 }, {  
     'target' => \$target,  
     'con' => \$data,  
     'od' => $self,  
   });  
   
   
 {  
   
 if  
 (defined 'Message::DOM::XML::ManakaiDOMProcessingInstruction') {  
   if (ref 'Message::DOM::XML::ManakaiDOMProcessingInstruction' eq 'SCALAR') {  
     $stem->{'cls'} = 'Message::DOM::XML::ManakaiDOMProcessingInstruction';  
   } elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMProcessingInstruction'}) {  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMProcessingInstruction'};  
   } else {  
     require Scalar::Util;  
     $stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMProcessingInstruction'} = \('Message::DOM::XML::ManakaiDOMProcessingInstruction');  
     Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::XML::ManakaiDOMProcessingInstruction'});  
   }  
 } else {  
   CORE::delete $stem->{'cls'};  
 }  
   
   
 }  
   
 ;  
 $bag->{${$stem->{  
 'id'  
 }}} = $stem;  
   
   
 }  
   
 ;  
   
   
 {  
   
   
 $r = ${$stem->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $stem->{  
 'id'  
 },  
     
 'b'  
  => $bag,  
 }, {  
   });  
 $stem->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
2237    
2238    
2239  }  }
# Line 4374  my $r = 0; Line 2245  my $r = 0;
2245  {  {
2246    
2247    
2248  {  $r = $$self->{
2249    'chk'
2250    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'chk'};  
   
   
 }  
   
 ;  
 $r =  
 1 unless  
 defined $r;  
2251    
2252    
2253  }  }
# Line 4400  $r; Line 2257  $r;
2257  {  {
2258    
2259    
2260  {  $$self->{
2261    'chk'
2262    } = $given;
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'chk'} = $given ? 1 : 0;  
   
   
 }  
   
 ;  
2263    
2264    
2265  }  }
# Line 4429  my $r; Line 2275  my $r;
2275  {  {
2276    
2277    
2278  $r = bless [$self, ($self->{'b'}->{${$self->{'id'}}}), 'Message::DOM::IFLatest::Document'],  $r = bless [$self, $$self, 'Message::DOM::IF::Document'],
2279                                    
2280  'Message::DOM::DOMCore::ManakaiDOMConfiguration'  'Message::DOM::DOMCore::ManakaiDOMConfiguration'
2281  ;  ;
# Line 4497  my $r; Line 2343  my $r;
2343  {  {
2344    
2345    
2346  {  $r = $$self->{
2347    'impl'
2348  my  };
 $__v = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
               ->{'impl'};  
 if (defined $__v) {  
     
   
 {  
   
   
 $r = ${$self->{'b'}->{${$__v}}->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => $__v,  
     
 'b'  
  => $self->{'b'},  
 }, {  
     'nrifs' => ['Message::DOM::IFLatest::DOMImplementation'],  
   });  
 $self->{'b'}->{${$__v}}->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
 }  
   
   
 }  
   
 ;  
2349    
2350    
2351  }  }
# Line 4553  my $r = ''; Line 2361  my $r = '';
2361  {  {
2362    
2363    
2364  {  $r = $$self->{
2365    'http://www.w3.org/2001/04/infoset#version'
2366    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'http://www.w3.org/2001/04/infoset#version'};  
   
   
 }  
   
 ;  
 $r = '1.0' unless defined $r;  
2367    
2368    
2369  }  }
# Line 4584  if Line 2380  if
2380  manakai_read_only  manakai_read_only
2381  ) {  ) {
2382        
2383  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError';
2384    
2385  ;  ;
2386  }  }
# Line 4598  if (defined $given and Line 2394  if (defined $given and
2394       not $self->       not $self->
2395  strict_error_checking  strict_error_checking
2396  )) {  )) {
2397        $$self->{
2398    'http://www.w3.org/2001/04/infoset#version'
2399  {  } = $given;
   
   
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'http://www.w3.org/2001/04/infoset#version'} = $given;  
   
   
 }  
   
 ;  
2400  } else {  } else {
2401        
2402  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_SUPPORTED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'set', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_IMPL_NOSUPPORT_XMLVER', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::Document::ManakaiDOMDocument', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'xml_version', 'http://www.w3.org/2001/04/infoset#version' => $given;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_SUPPORTED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#on' => 'set', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#MDOM_IMPL_NOSUPPORT_XMLVER', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::Document::ManakaiDOMDocument', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'xml_version', 'http://www.w3.org/2001/04/infoset#version' => $given;
# Line 4681  my $r = ''; Line 2464  my $r = '';
2464  {  {
2465    
2466    
2467  {  $r = $$self->{
2468    'duri'
2469    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'duri'};  
   
   
 }  
   
 ;  
2470    
2471    
2472  }  }
# Line 4711  if Line 2483  if
2483  manakai_read_only  manakai_read_only
2484  ) {  ) {
2485        
2486  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError';
2487    
2488  ;  ;
2489  }  }
# Line 4720  report Message::DOM::DOMCore::ManakaiDOM Line 2492  report Message::DOM::DOMCore::ManakaiDOM
2492  }  }
2493    
2494  ;  ;
2495    $$self->{
2496    'duri'
2497  {  } = $given;
   
   
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'duri'} = $given;  
   
   
 }  
   
 ;  
2498    
2499    
2500  }  }
# Line 4748  my $r = ''; Line 2507  my $r = '';
2507  {  {
2508    
2509    
2510  {  $r = $$self->{
2511    'ces'
2512    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'ces'};  
   
   
 }  
   
 ;  
2513    
2514    
2515  }  }
# Line 4778  if Line 2526  if
2526  manakai_read_only  manakai_read_only
2527  ) {  ) {
2528        
2529  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError';
2530    
2531  ;  ;
2532  }  }
# Line 4787  report Message::DOM::DOMCore::ManakaiDOM Line 2535  report Message::DOM::DOMCore::ManakaiDOM
2535  }  }
2536    
2537  ;  ;
2538    $$self->{
2539    'ces'
2540  {  } = $given;
   
   
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'ces'} = $given;  
   
   
 }  
   
 ;  
2541    
2542    
2543  }  }
# Line 4815  my $r = ''; Line 2550  my $r = '';
2550  {  {
2551    
2552    
2553  {  $r = $$self->{
2554    'xcs'
2555    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'xcs'};  
   
   
 }  
   
 ;  
2556    
2557    
2558  }  }
# Line 4845  if Line 2569  if
2569  manakai_read_only  manakai_read_only
2570  ) {  ) {
2571        
2572  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError';
2573    
2574  ;  ;
2575  }  }
# Line 4854  report Message::DOM::DOMCore::ManakaiDOM Line 2578  report Message::DOM::DOMCore::ManakaiDOM
2578  }  }
2579    
2580  ;  ;
2581    $$self->{
2582    'xcs'
2583  {  } = $given;
   
   
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'xcs'} = $given;  
   
   
 }  
   
 ;  
2584    
2585    
2586  }  }
# Line 4882  my $r = 0; Line 2593  my $r = 0;
2593  {  {
2594    
2595    
2596  {  $r = $$self->{
2597    'http://www.w3.org/2001/04/infoset#standalone'
2598    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'http://www.w3.org/2001/04/infoset#standalone'};  
   
   
 }  
   
 ;  
2599    
2600    
2601  }  }
# Line 4912  if Line 2612  if
2612  manakai_read_only  manakai_read_only
2613  ) {  ) {
2614        
2615  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError';
2616    
2617  ;  ;
2618  }  }
# Line 4921  report Message::DOM::DOMCore::ManakaiDOM Line 2621  report Message::DOM::DOMCore::ManakaiDOM
2621  }  }
2622    
2623  ;  ;
2624    $$self->{
2625    'http://www.w3.org/2001/04/infoset#standalone'
2626  {  } = $given;
   
   
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'http://www.w3.org/2001/04/infoset#standalone'} = $given;  
   
   
 }  
   
 ;  
2627    
2628    
2629  }  }
# Line 4953  ADOPT: Line 2640  ADOPT:
2640    last ADOPT    last ADOPT
2641      unless $source->isa (      unless $source->isa (
2642  'Message::DOM::TreeCore::ManakaiDOMNode'  'Message::DOM::TreeCore::ManakaiDOMNode'
2643  ) and  );
             
 $self->{'b'}  
                eq  
   
 $source->{'b'}  
 ;  
2644    
2645    my $strict = $self->    my $strict = $self->
2646  strict_error_checking  strict_error_checking
# Line 5126  owner_document Line 2807  owner_document
2807      last ADOPT;      last ADOPT;
2808    }    }
2809    
   my $old_od_list;  
     
   
 {  
   
   
 $old_od_list = $old_od->{  
 'b'  
 }->{${$old_od->{  
 'id'  
 }}}  
          ->{'do'};  
   
   
 }  
   
 ;  
   my $new_od_list;  
     
   
 {  
   
   
 $new_od_list = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'do'};  
   
   
 }  
   
 ;  
2810    for my $n (@change_od) {    for my $n (@change_od) {
2811            $$n->{
2812    'od'
2813  {  } = $self;
2814        Scalar::Util::weaken ($$n->{
2815    'od'
2816  $n->{  });
 'b'  
 }->{${$n->{  
 'id'  
 }}}  
     ->{'od'} = $self->{  
 'id'  
 };  
   
   
 }  
   
 ;  
     my $nid =  
 $n->{'id'}  
 ;  
     CORE::delete $old_od_list->{$$nid};  
     $new_od_list->{$$nid} = $nid;  
2817    }    }
2818    
2819    for my $src (@change_od) {    for my $src (@change_od) {
2820      my $src_ud;      my $src_ud = $$src->{
2821        'ud'
2822    };
 {  
   
   
 $src_ud = $src->{  
 'b'  
 }->{${$src->{  
 'id'  
 }}}  
          ->{'ud'};  
   
   
 }  
   
 ;  
2823      for my $key (keys %{$src_ud or {}}) {      for my $key (keys %{$src_ud or {}}) {
2824        my $dh = $src_ud->{$key}->[1];        my $dh = $src_ud->{$key}->[1];
2825        if ($dh) {        if ($dh) {
# Line 5325  my ($self, $namespaceURI, $localName) = Line 2941  my ($self, $namespaceURI, $localName) =
2941    
2942  if  if
2943  (CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) {  (CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) {
2944      require Message::DOM::DOMMain;
2945        
2946  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/main#empty-namespace-uri', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:tag:suika.fam.cx,2005-09:1162643135:13819:2PFx921643+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/main#empty-namespace-uri', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:1167465382:17798:gAilE14884';
2947    
2948  ;  ;
2949    
2950        $namespaceURI = undef;
   
 {  
   
   
 $namespaceURI = undef;  
     
   
   
 }  
   
 ;  
2951  }  }
2952    
2953    
# Line 5441  my ($self, $n, $namespaceURI, $qualified Line 3047  my ($self, $n, $namespaceURI, $qualified
3047    
3048  if  if
3049  (CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) {  (CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) {
3050      require Message::DOM::DOMMain;
3051        
3052  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/main#empty-namespace-uri', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:tag:suika.fam.cx,2005-09:1162643135:13819:2PFx921643+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/main#empty-namespace-uri', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:1167465382:17798:gAilE14884';
3053    
3054  ;  ;
3055    
3056        $namespaceURI = undef;
   
 {  
   
   
 $namespaceURI = undef;  
     
   
   
 }  
   
 ;  
3057  }  }
3058    
3059    
# Line 5472  my $r = ''; Line 3068  my $r = '';
3068  {  {
3069    
3070    
3071  {  $r = $$self->{
3072    'buri'
3073    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'buri'};  
   
   
 }  
   
 ;  
3074  unless (defined $r) {  unless (defined $r) {
3075        $r = $$self->{
3076    'duri'
3077  {  };
   
   
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'duri'};  
   
   
 }  
   
 ;  
3078  }  }
3079    
3080    
# Line 5520  if Line 3092  if
3092  manakai_read_only  manakai_read_only
3093  ) {  ) {
3094        
3095  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError';
3096    
3097  ;  ;
3098  }  }
# Line 5529  report Message::DOM::DOMCore::ManakaiDOM Line 3101  report Message::DOM::DOMCore::ManakaiDOM
3101  }  }
3102    
3103  ;  ;
3104    $$self->{
3105    'buri'
3106  {  } = $given;
   
   
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'buri'} = $given;  
   
   
 }  
   
 ;  
3107    
3108    
3109  }  }
# Line 5557  my $r = 0; Line 3116  my $r = 0;
3116  {  {
3117    
3118    
3119  {  $r = $$self->{
3120    'http://www.w3.org/2001/04/infoset#allDeclarationsProcessed'
3121    };
 $r = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'http://www.w3.org/2001/04/infoset#allDeclarationsProcessed'};  
   
   
 }  
   
 ;  
3122    
3123    
3124  }  }
# Line 5587  if Line 3135  if
3135  manakai_read_only  manakai_read_only
3136  ) {  ) {
3137        
3138  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/NodeReadOnlyError';
3139    
3140  ;  ;
3141  }  }
# Line 5596  report Message::DOM::DOMCore::ManakaiDOM Line 3144  report Message::DOM::DOMCore::ManakaiDOM
3144  }  }
3145    
3146  ;  ;
3147    $$self->{
3148    'http://www.w3.org/2001/04/infoset#allDeclarationsProcessed'
3149  {  } = $given;
   
   
 $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
     ->{'http://www.w3.org/2001/04/infoset#allDeclarationsProcessed'} = $given;  
   
   
 }  
   
 ;  
3150    
3151    
3152  }  }
# Line 5643  $Message::DOM::DOMFeature::ClassInfo->{q Line 3178  $Message::DOM::DOMFeature::ClassInfo->{q
3178  '1.1',  '1.1',
3179  '1'}};  '1'}};
3180  $Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMDocument>} = 14.1;  $Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMDocument>} = 14.1;
3181  $Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::Document::ManakaiDOMDocument>}->{compat_class}->{q<Message::DOM::Document::ManakaiDOMDocument>} = 1;  package Message::DOM::IF::DocumentFragment;
3182  $Message::Util::Grove::ClassProp{q<Message::DOM::Document::ManakaiDOMDocument>} = {'s1a',  our $VERSION = 20061230.0809;
 ['child'],  
 'v1h',  
 ['do'],  
 'w0',  
 ['impl']};  
 package Message::DOM::IFLatest::DocumentFragment;  
 our $VERSION = 20061104.1242;  
3183  package Message::DOM::Document::ManakaiDOMDocumentFragment;  package Message::DOM::Document::ManakaiDOMDocumentFragment;
3184  our $VERSION = 20061104.1242;  our $VERSION = 20061230.0809;
3185  push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode',  push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode',
3186  'Message::DOM::IF::DocumentFragment',  'Message::DOM::IF::DocumentFragment',
3187  'Message::DOM::IF::Node',  'Message::DOM::IF::Node';
 'Message::DOM::IFLatest::DocumentFragment',  
 'Message::DOM::IFLatest::Node',  
 'Message::DOM::IFLevel1::DocumentFragment',  
 'Message::DOM::IFLevel1::Node',  
 'Message::DOM::IFLevel2::DocumentFragment',  
 'Message::DOM::IFLevel2::Node',  
 'Message::DOM::IFLevel3::DocumentFragment',  
 'Message::DOM::IFLevel3::Node';  
 sub ___create_node_stem ($$$$) {  
 my ($self, $bag, $obj, $opt) = @_;  
 my $r = {};  
   
 {  
   
   
 $obj->{  
 'child'  
 } = [];  
   
   
 {  
   
   
 $obj->{'od'} = $opt->{'od'}->{  
 'id'  
 };  
 $bag->{${$opt->{'od'}->{  
 'id'  
 }}}  
     ->{'do'}->{${$obj->{  
 'id'  
 }}}  
   = $obj->{  
 'id'  
 };  
   
   
 }  
   
 ;  
 $r = $obj;  
   
   
 }  
 $r}  
3188  sub node_type ($;$) {  sub node_type ($;$) {
3189  if (@_ == 1) {my ($self) = @_;  if (@_ == 1) {my ($self) = @_;
3190  my $r;  my $r;
# Line 5785  local $Error::Depth = $Error::Depth - 1; Line 3268  local $Error::Depth = $Error::Depth - 1;
3268    
3269  {  {
3270    
3271  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3272    
3273    
3274  }  }
# Line 5806  local $Error::Depth = $Error::Depth - 1; Line 3289  local $Error::Depth = $Error::Depth - 1;
3289    
3290  {  {
3291    
3292  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3293    
3294    
3295  }  }
# Line 5834  local $Error::Depth = $Error::Depth - 1; Line 3317  local $Error::Depth = $Error::Depth - 1;
3317    
3318  {  {
3319    
3320  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3321    
3322    
3323  }  }
# Line 5857  local $Error::Depth = $Error::Depth - 1; Line 3340  local $Error::Depth = $Error::Depth - 1;
3340    
3341  {  {
3342    
3343  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1';
3344    
3345    
3346  }  }
# Line 5880  local $Error::Depth = $Error::Depth - 1; Line 3363  local $Error::Depth = $Error::Depth - 1;
3363    
3364  {  {
3365    
3366  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/appendChildImpl1';
3367    
3368    
3369  }  }
# Line 5904  report Message::DOM::DOMCore::ManakaiDOM Line 3387  report Message::DOM::DOMCore::ManakaiDOM
3387      if ($child_nt ==      if ($child_nt ==
3388  11  11
3389  ) {  ) {
3390                $$newChild->{
3391    'child'
3392  {  } = [];
   
   
 $newChild->{  
 'b'  
 }->{${$newChild->{  
 'id'  
 }}}  
     ->{'child'} = [];  
   
   
 }  
   
 ;  
3393      } else {      } else {
3394        my $v;        my $v = $$nc_parent->{
3395          'child'
3396    };
 {  
   
   
 $v = $nc_parent->{  
 'b'  
 }->{${$nc_parent->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
3397        RP: for my $i (0..$#$v) {        RP: for my $i (0..$#$v) {
3398          my $nodeid = $v->[$i];          if ($v->[$i] eq $new_child[0]) {
         if (  
 (${$new_child[0]->{'id'}} eq ${$nodeid})  
 ) {  
3399            splice @$v, $i, 1, ();            splice @$v, $i, 1, ();
3400            last RP;            last RP;
3401          }          }
# Line 5952  $v = $nc_parent->{ Line 3405  $v = $nc_parent->{
3405    
3406    ## -- Rewrite the |parentNode| properties    ## -- Rewrite the |parentNode| properties
3407    for my $nc (@new_child) {    for my $nc (@new_child) {
3408            $$nc->{
3409    'parent'
3410  {  } = $self;
3411        Scalar::Util::weaken ($$nc->{
3412    'parent'
3413  $nc->{  });
 'b'  
 }->{${$nc->{  
 'id'  
 }}}  
     ->{'parent'} = $self->{  
 'id'  
 };  
   
   
 }  
   
 ;  
3414    }    }
3415    
3416    my $children;    my $children = $$self->{
3417      'child'
3418    };
 {  
   
   
 $children = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
3419    
3420        
3421    
# Line 5996  $children = $self->{ Line 3423  $children = $self->{
3423    
3424    
3425  ## -- Adds to children list  ## -- Adds to children list
3426      push @$children, map {      push @$children, @new_child;
         
 $_->{'id'}  
   
     } @new_child;  
3427      $r = $newChild;      $r = $newChild;
3428        
3429    
# Line 6108  local $Error::Depth = $Error::Depth - 1; Line 3531  local $Error::Depth = $Error::Depth - 1;
3531    
3532  {  {
3533    
3534  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3535    
3536    
3537  }  }
# Line 6129  local $Error::Depth = $Error::Depth - 1; Line 3552  local $Error::Depth = $Error::Depth - 1;
3552    
3553  {  {
3554    
3555  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3556    
3557    
3558  }  }
# Line 6157  local $Error::Depth = $Error::Depth - 1; Line 3580  local $Error::Depth = $Error::Depth - 1;
3580    
3581  {  {
3582    
3583  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3584    
3585    
3586  }  }
# Line 6180  local $Error::Depth = $Error::Depth - 1; Line 3603  local $Error::Depth = $Error::Depth - 1;
3603    
3604  {  {
3605    
3606  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1';
3607    
3608    
3609  }  }
# Line 6203  local $Error::Depth = $Error::Depth - 1; Line 3626  local $Error::Depth = $Error::Depth - 1;
3626    
3627  {  {
3628    
3629  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1';
3630    
3631    
3632  }  }
# Line 6237  local $Error::Depth = $Error::Depth - 1; Line 3660  local $Error::Depth = $Error::Depth - 1;
3660    
3661  {  {
3662    
3663  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/tree#insert-before-itself', 'rdata' => $refChild, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/tree#insert-before-itself', 'rdata' => $refChild, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1';
3664    
3665    
3666  }  }
# Line 6283  local $Error::Depth = $Error::Depth - 1; Line 3706  local $Error::Depth = $Error::Depth - 1;
3706    
3707  {  {
3708    
3709  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'refChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $refChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/insertBeforeImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'refChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $refChild;
3710    
3711    
3712  }  }
# Line 6319  report Message::DOM::DOMCore::ManakaiDOM Line 3742  report Message::DOM::DOMCore::ManakaiDOM
3742      if ($child_nt ==      if ($child_nt ==
3743  11  11
3744  ) {  ) {
3745                $$newChild->{
3746    'child'
3747  {  } = [];
   
   
 $newChild->{  
 'b'  
 }->{${$newChild->{  
 'id'  
 }}}  
     ->{'child'} = [];  
   
   
 }  
   
 ;  
3748      } else {      } else {
3749        my $v;        my $v = $$nc_parent->{
3750          'child'
3751    };
 {  
   
   
 $v = $nc_parent->{  
 'b'  
 }->{${$nc_parent->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
3752        RP: for my $i (0..$#$v) {        RP: for my $i (0..$#$v) {
3753          my $nodeid = $v->[$i];          if ($v->[$i] eq $new_child[0]) {
         if (  
 (${$new_child[0]->{'id'}} eq ${$nodeid})  
 ) {  
3754            splice @$v, $i, 1, ();            splice @$v, $i, 1, ();
3755            last RP;            last RP;
3756          }          }
# Line 6367  $v = $nc_parent->{ Line 3760  $v = $nc_parent->{
3760    
3761    ## -- Rewrite the |parentNode| properties    ## -- Rewrite the |parentNode| properties
3762    for my $nc (@new_child) {    for my $nc (@new_child) {
3763            $$nc->{
3764    'parent'
3765  {  } = $self;
3766        Scalar::Util::weaken ($$nc->{
3767    'parent'
3768  $nc->{  });
 'b'  
 }->{${$nc->{  
 'id'  
 }}}  
     ->{'parent'} = $self->{  
 'id'  
 };  
   
   
 }  
   
 ;  
3769    }    }
3770    
3771    my $children;    my $children = $$self->{
3772      'child'
3773    };
 {  
   
   
 $children = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
3774    
3775        
3776    
# Line 6416  $children = $self->{ Line 3783  $children = $self->{
3783    
3784  ## -- Adds to children list  ## -- Adds to children list
3785      if ($index == -1) {      if ($index == -1) {
3786        push @$children, map {        push @$children, @new_child;
           
 $_->{'id'}  
   
       } @new_child;  
3787      } else {      } else {
3788        splice @$children, $index, 0, map {        splice @$children, $index, 0, @new_child;
           
 $_->{'id'}  
   
       } @new_child;  
3789      }      }
3790      $r = $newChild;      $r = $newChild;
3791        
# Line 6531  local $Error::Depth = $Error::Depth - 1; Line 3890  local $Error::Depth = $Error::Depth - 1;
3890    
3891  {  {
3892    
3893  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3894    
3895    
3896  }  }
# Line 6552  local $Error::Depth = $Error::Depth - 1; Line 3911  local $Error::Depth = $Error::Depth - 1;
3911    
3912  {  {
3913    
3914  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#HIERARCHY_BAD_TYPE', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3915    
3916    
3917  }  }
# Line 6580  local $Error::Depth = $Error::Depth - 1; Line 3939  local $Error::Depth = $Error::Depth - 1;
3939    
3940  {  {
3941    
3942  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'WRONG_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#DIFFERENT_DOCUMENT_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'newChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $newChild;
3943    
3944    
3945  }  }
# Line 6603  local $Error::Depth = $Error::Depth - 1; Line 3962  local $Error::Depth = $Error::Depth - 1;
3962    
3963  {  {
3964    
3965  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_THIS', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1';
3966    
3967    
3968  }  }
# Line 6626  local $Error::Depth = $Error::Depth - 1; Line 3985  local $Error::Depth = $Error::Depth - 1;
3985    
3986  {  {
3987    
3988  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#NOMOD_SRC_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1';
3989    
3990    
3991  }  }
# Line 6663  local $Error::Depth = $Error::Depth - 1; Line 4022  local $Error::Depth = $Error::Depth - 1;
4022    
4023  {  {
4024    
4025  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/tree#replace-by-itself', 'rdata' => $oldChild, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest';  report Message::DOM::DOMCore::ManakaiDOMError -object => $self, '-type' => 'http://suika.fam.cx/~wakaba/archive/2004/dom/tree#replace-by-itself', 'rdata' => $oldChild, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1';
4026    
4027    
4028  }  }
# Line 6709  local $Error::Depth = $Error::Depth - 1; Line 4068  local $Error::Depth = $Error::Depth - 1;
4068    
4069  {  {
4070    
4071  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;
4072    
4073    
4074  }  }
# Line 6737  local $Error::Depth = $Error::Depth - 1; Line 4096  local $Error::Depth = $Error::Depth - 1;
4096    
4097  {  {
4098    
4099  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'tag:suika.fam.cx,2005-09:http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;  report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NOT_FOUND_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NOT_CHILD_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#resourceURI' => 'http://suika.fam.cx/~wakaba/archive/2005/manakai/DOM/TreeCore/replaceChildImpl1', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'oldChild', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#node' => $oldChild;
4100    
4101    
4102  }  }
# Line 6765  report Message::DOM::DOMCore::ManakaiDOM Line 4124  report Message::DOM::DOMCore::ManakaiDOM
4124      if ($child_nt ==      if ($child_nt ==
4125  11  11
4126  ) {  ) {
4127                $$newChild->{
4128    'child'
4129  {  } = [];
   
   
 $newChild->{  
 'b'  
 }->{${$newChild->{  
 'id'  
 }}}  
     ->{'child'} = [];  
   
   
 }  
   
 ;  
4130      } else {      } else {
4131        my $v;        my $v = $$nc_parent->{
4132          'child'
4133    };
 {  
   
   
 $v = $nc_parent->{  
 'b'  
 }->{${$nc_parent->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
4134        RP: for my $i (0..$#$v) {        RP: for my $i (0..$#$v) {
4135          my $nodeid = $v->[$i];          if ($v->[$i] eq $new_child[0]) {
         if (  
 (${$new_child[0]->{'id'}} eq ${$nodeid})  
 ) {  
4136            splice @$v, $i, 1, ();            splice @$v, $i, 1, ();
4137            last RP;            last RP;
4138          }          }
# Line 6813  $v = $nc_parent->{ Line 4142  $v = $nc_parent->{
4142    
4143    ## -- Rewrite the |parentNode| properties    ## -- Rewrite the |parentNode| properties
4144    for my $nc (@new_child) {    for my $nc (@new_child) {
4145            $$nc->{
4146    'parent'
4147  {  } = $self;
4148        Scalar::Util::weaken ($$nc->{
4149    'parent'
4150  $nc->{  });
 'b'  
 }->{${$nc->{  
 'id'  
 }}}  
     ->{'parent'} = $self->{  
 'id'  
 };  
   
   
 }  
   
 ;  
4151    }    }
4152    
4153    my $children;    my $children = $$self->{
4154      'child'
4155    };
 {  
   
   
 $children = $self->{  
 'b'  
 }->{${$self->{  
 'id'  
 }}}  
          ->{'child'};  
   
   
 }  
   
 ;  
4156    
4157        
4158    
# Line 6865  $children = $self->{ Line 4168  $children = $self->{
4168    
4169    
4170  ## -- Replaces the node  ## -- Replaces the node
4171      splice @$children, $index, 1, map {      splice @$children, $index, 1, @new_child;
4172              CORE::delete $$oldChild->{
4173  $_->{'id'}  'parent'
4174    };
     } @new_child;  
       
   
 {  
   
 CORE::delete  
 $oldChild->{  
 'b'  
 }->{${$oldChild->{  
 'id'  
 }}}  
                  ->{'parent'};  
   
   
 }  
   
 ;  
4175      $r = $oldChild;      $r = $oldChild;
4176        
4177    
# Line 7003  $feature =~ s/^\+//; Line 4289  $feature =~ s/^\+//;
4289  {  {
4290    
4291  if  if
4292  ($Message::DOM::DOMFeature::ClassInfo->{ref $self}  ($Message::Util::AutoLoad::Registry::Feature->{$feature}->{$version}) {
       ->{has_feature}->{$feature}->{$version} or  
     $Message::Util::AutoLoad::Registry::Feature  
         ->{$feature}->{$version}) {  
4293    $r = $self;    $r = $self;
 } else {  
   CLASS: for my $__class (sort {  
     $Message::DOM::ClassPoint{$b} <=> $Message::DOM::ClassPoint{$a}  
   } grep {  
     $Message::DOM::DOMFeature::ClassInfo->{'Message::DOM::Document::ManakaiDOMDocumentFragment'}  
         ->{compat_class}->{$_}  
   } keys %{$Message::DOM::DOMFeature::ClassInfo->{'Message::DOM::Document::ManakaiDOMDocumentFragment'}  
                ->{compat_class} or {}}) {  
     if ($Message::DOM::DOMFeature::ClassInfo->{$__class}  
             ->{has_feature}->{$feature}->{$version} or  
         $Message::Util::AutoLoad::Registry::Feature  
             ->{$feature}->{$version}) {  
         
   
 {  
   
   
 $r = ${($self->{'b'})->{${($self->{'id'})}}->{  
 'cls'  
 }}->___create_node_ref ({  
     
 'id'  
  => ($self->{'id'}),  
     
 'b'  
  => ($self->{'b'}),  
 }, {  
           'nrcls' => \$__class,  
         });  
 ($self->{'b'})->{${($self->{'id'})}}->{  
 'rc'  
 }++;  
   
   
 }  
   
 ;  
       last CLASS;  
     }  
   } # CLASS  
4294  }  }
4295    
4296    
# Line 7143  $Message::DOM::DOMFeature::ClassInfo->{q Line 4386  $Message::DOM::DOMFeature::ClassInfo->{q
4386  '1.1',  '1.1',
4387  '1'}};  '1'}};
4388  $Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMDocumentFragment>} = 14.1;  $Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMDocumentFragment>} = 14.1;
4389  $Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::Document::ManakaiDOMDocumentFragment>}->{compat_class}->{q<Message::DOM::Document::ManakaiDOMDocumentFragment>} = 1;  for ($Message::DOM::IF::Node::){}
 $Message::Util::Grove::ClassProp{q<Message::DOM::Document::ManakaiDOMDocumentFragment>} = {'s1a',  
 ['child'],  
 'w0',  
 ['od']};  
 for ($Message::DOM::IF::Document::, $Message::DOM::IF::DocumentFragment::, $Message::DOM::IF::Node::, $Message::DOM::IFLatest::Node::, $Message::DOM::IFLevel1::Document::, $Message::DOM::IFLevel1::DocumentFragment::, $Message::DOM::IFLevel1::Node::, $Message::DOM::IFLevel2::Document::, $Message::DOM::IFLevel2::DocumentFragment::, $Message::DOM::IFLevel2::Node::, $Message::DOM::IFLevel3::Document::, $Message::DOM::IFLevel3::DocumentFragment::, $Message::DOM::IFLevel3::Node::){}  
4390  ## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL>  ## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL>
4391  1;  1;

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24