1 |
#!/usr/bin/perl |
#!/usr/bin/perl |
2 |
## This file is automatically generated |
## This file is automatically generated |
3 |
## at 2006-11-05T08:27:03+00:00, |
## at 2006-12-30T04:24:35+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#ManakaiDOMLatest>. |
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 = 20061105.0827; |
our $VERSION = 20061230.0424; |
14 |
package Message::DOM::Document::ManakaiDOMImplementationDocument; |
package Message::DOM::Document::ManakaiDOMImplementationDocument; |
15 |
our $VERSION = 20061105.0827; |
our $VERSION = 20061230.0424; |
16 |
push @Message::DOM::DOMCore::ManakaiDOMImplementation::ISA, q<Message::DOM::Document::ManakaiDOMImplementationDocument> unless Message::DOM::DOMCore::ManakaiDOMImplementation->isa (q<Message::DOM::Document::ManakaiDOMImplementationDocument>); |
push @Message::DOM::DOMCore::ManakaiDOMImplementation::ISA, q<Message::DOM::Document::ManakaiDOMImplementationDocument> unless Message::DOM::DOMCore::ManakaiDOMImplementation->isa (q<Message::DOM::Document::ManakaiDOMImplementationDocument>); |
17 |
sub create_document ($;$$$) { |
sub create_document ($;$$$) { |
18 |
my ($self, $namespaceURI, $qualifiedName, $doctype) = @_; |
my ($self, $namespaceURI, $qualifiedName, $doctype) = @_; |
23 |
(CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) { |
(CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) { |
24 |
require Message::DOM::DOMMain; |
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:tag:suika.fam.cx,2005-09:1162711890:16031:uDMne5008+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:tag:suika.fam.cx,2005-09:1167450139:7187:cCkYT15288+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest'; |
27 |
|
|
28 |
; |
; |
29 |
|
|
47 |
|
|
48 |
{ |
{ |
49 |
|
|
50 |
my |
require |
51 |
$bag = |
Scalar::Util; |
52 |
$self->{'b'} |
$r = bless \{ |
|
; |
|
|
my $stem; |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
$stem = 'Message::DOM::Document::ManakaiDOMDocument'->___create_node_stem ($bag, { |
|
53 |
|
|
54 |
'rc' |
'child' |
55 |
=> 0, |
=> [], |
56 |
|
|
57 |
'id' |
'impl' |
58 |
=> \ |
=> $self, |
|
( |
|
|
'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' . |
|
|
(++$Message::Util::ManakaiNode::UniqueIDN) |
|
|
) |
|
|
, |
|
|
}, { |
|
|
'impl' => $self, |
|
|
}); |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
if |
|
|
(defined 'Message::DOM::Document::ManakaiDOMDocument') { |
|
|
if (ref 'Message::DOM::Document::ManakaiDOMDocument' eq 'SCALAR') { |
|
|
$stem->{'cls'} = 'Message::DOM::Document::ManakaiDOMDocument'; |
|
|
} elsif (defined $Message::Util::ManakaiStringRef::Value{'Message::DOM::Document::ManakaiDOMDocument'}) { |
|
|
$stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::Document::ManakaiDOMDocument'}; |
|
|
} else { |
|
|
require Scalar::Util; |
|
|
$stem->{'cls'} = $Message::Util::ManakaiStringRef::Value{'Message::DOM::Document::ManakaiDOMDocument'} = \('Message::DOM::Document::ManakaiDOMDocument'); |
|
|
Scalar::Util::weaken ($Message::Util::ManakaiStringRef::Value{'Message::DOM::Document::ManakaiDOMDocument'}); |
|
|
} |
|
|
} else { |
|
|
CORE::delete $stem->{'cls'}; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
|
$bag->{${$stem->{ |
|
|
'id' |
|
|
}}} = $stem; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
$r = ${$stem->{ |
|
|
'cls' |
|
|
}}->___create_node_ref ({ |
|
59 |
|
|
60 |
'id' |
'http://www.w3.org/2001/04/infoset#version' |
61 |
=> $stem->{ |
=> '1.0', |
|
'id' |
|
|
}, |
|
62 |
|
|
63 |
'b' |
'chk' |
64 |
=> $bag, |
=> 1, |
65 |
}, { |
}, |
66 |
}); |
'Message::DOM::Document::ManakaiDOMDocument' |
|
$stem->{ |
|
|
'rc' |
|
|
}++; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
67 |
; |
; |
68 |
|
|
69 |
if (defined $doctype) { |
if (defined $doctype) { |
135 |
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::Document::ManakaiDOMImplementationDocument>}->{has_feature} = {}; |
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::Document::ManakaiDOMImplementationDocument>}->{has_feature} = {}; |
136 |
$Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMImplementationDocument>} = 0; |
$Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMImplementationDocument>} = 0; |
137 |
package Message::DOM::IFLatest::Document; |
package Message::DOM::IFLatest::Document; |
138 |
our $VERSION = 20061105.0827; |
our $VERSION = 20061230.0424; |
139 |
package Message::DOM::Document::ManakaiDOMDocument; |
package Message::DOM::Document::ManakaiDOMDocument; |
140 |
our $VERSION = 20061105.0827; |
our $VERSION = 20061230.0424; |
141 |
push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode', |
push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode', |
|
'Message::DOM::IF::Document', |
|
|
'Message::DOM::IF::Node', |
|
142 |
'Message::DOM::IFLatest::Document', |
'Message::DOM::IFLatest::Document', |
143 |
'Message::DOM::IFLatest::Node', |
'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'; |
|
|
sub ___create_node_stem ($$$$) { |
|
|
my ($self, $bag, $obj, $opt) = @_; |
|
|
my $r = {}; |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
$obj->{ |
|
|
'child' |
|
|
} = []; |
|
|
$obj->{ |
|
|
'do' |
|
|
} = {}; |
|
|
$obj->{ |
|
|
'http://www.w3.org/2001/04/infoset#version' |
|
|
} = '1.0'; |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
$obj->{'impl'} = $opt->{'impl'}->{ |
|
|
'id' |
|
|
}; |
|
|
$bag->{${$opt->{'impl'}->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'lpmi'}->{${$obj->{ |
|
|
'id' |
|
|
}}} |
|
|
= $obj->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
|
$r = $obj; |
|
|
|
|
|
|
|
|
} |
|
|
$r} |
|
144 |
sub node_type ($;$) { |
sub node_type ($;$) { |
145 |
if (@_ == 1) {my ($self) = @_; |
if (@_ == 1) {my ($self) = @_; |
146 |
my $r; |
my $r; |
508 |
if ($child_nt == |
if ($child_nt == |
509 |
11 |
11 |
510 |
) { |
) { |
511 |
|
$$newChild->{ |
512 |
|
'child' |
513 |
{ |
} = []; |
|
|
|
|
|
|
|
$newChild->{ |
|
|
'b' |
|
|
}->{${$newChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'} = []; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
514 |
} else { |
} else { |
515 |
my $v; |
my $v = $$nc_parent->{ |
516 |
|
'child' |
517 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$v = $nc_parent->{ |
|
|
'b' |
|
|
}->{${$nc_parent->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
518 |
RP: for my $i (0..$#$v) { |
RP: for my $i (0..$#$v) { |
519 |
my $nodeid = $v->[$i]; |
if ($v->[$i] eq $new_child[0]) { |
|
if ( |
|
|
(${$new_child[0]->{'id'}} eq ${$nodeid}) |
|
|
) { |
|
520 |
splice @$v, $i, 1, (); |
splice @$v, $i, 1, (); |
521 |
last RP; |
last RP; |
522 |
} |
} |
526 |
|
|
527 |
## -- Rewrite the |parentNode| properties |
## -- Rewrite the |parentNode| properties |
528 |
for my $nc (@new_child) { |
for my $nc (@new_child) { |
529 |
|
$$nc->{ |
530 |
|
'parent' |
531 |
{ |
} = $self; |
532 |
|
Scalar::Util::weaken ($$nc->{ |
533 |
|
'parent' |
534 |
$nc->{ |
}); |
|
'b' |
|
|
}->{${$nc->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'} = $self->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
535 |
} |
} |
536 |
|
|
537 |
my $children; |
my $children = $$self->{ |
538 |
|
'child' |
539 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$children = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
540 |
|
|
541 |
|
|
542 |
|
|
544 |
|
|
545 |
|
|
546 |
## -- Adds to children list |
## -- Adds to children list |
547 |
push @$children, map { |
push @$children, @new_child; |
|
|
|
|
$_->{'id'} |
|
|
|
|
|
} @new_child; |
|
548 |
$r = $newChild; |
$r = $newChild; |
549 |
|
|
550 |
|
|
580 |
not defined $newChild-> |
not defined $newChild-> |
581 |
owner_document |
owner_document |
582 |
) { |
) { |
583 |
my $bag = |
CORE::delete $$newChild->{ |
584 |
$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' |
|
585 |
}; |
}; |
586 |
$bag->{${$self->{ |
$$newChild->{ |
587 |
'id' |
'od' |
588 |
}}} |
} = $self; |
589 |
->{'do'}->{${$newChild->{ |
Scalar::Util::weaken ($$newChild->{ |
590 |
'id' |
'od' |
591 |
}}} |
}); |
|
= $newChild->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
592 |
} |
} |
593 |
|
|
594 |
|
|
1130 |
if ($child_nt == |
if ($child_nt == |
1131 |
11 |
11 |
1132 |
) { |
) { |
1133 |
|
$$newChild->{ |
1134 |
|
'child' |
1135 |
{ |
} = []; |
|
|
|
|
|
|
|
$newChild->{ |
|
|
'b' |
|
|
}->{${$newChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'} = []; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1136 |
} else { |
} else { |
1137 |
my $v; |
my $v = $$nc_parent->{ |
1138 |
|
'child' |
1139 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$v = $nc_parent->{ |
|
|
'b' |
|
|
}->{${$nc_parent->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1140 |
RP: for my $i (0..$#$v) { |
RP: for my $i (0..$#$v) { |
1141 |
my $nodeid = $v->[$i]; |
if ($v->[$i] eq $new_child[0]) { |
|
if ( |
|
|
(${$new_child[0]->{'id'}} eq ${$nodeid}) |
|
|
) { |
|
1142 |
splice @$v, $i, 1, (); |
splice @$v, $i, 1, (); |
1143 |
last RP; |
last RP; |
1144 |
} |
} |
1148 |
|
|
1149 |
## -- Rewrite the |parentNode| properties |
## -- Rewrite the |parentNode| properties |
1150 |
for my $nc (@new_child) { |
for my $nc (@new_child) { |
1151 |
|
$$nc->{ |
1152 |
|
'parent' |
1153 |
{ |
} = $self; |
1154 |
|
Scalar::Util::weaken ($$nc->{ |
1155 |
|
'parent' |
1156 |
$nc->{ |
}); |
|
'b' |
|
|
}->{${$nc->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'} = $self->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1157 |
} |
} |
1158 |
|
|
1159 |
my $children; |
my $children = $$self->{ |
1160 |
|
'child' |
1161 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$children = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1162 |
|
|
1163 |
|
|
1164 |
|
|
1171 |
|
|
1172 |
## -- Adds to children list |
## -- Adds to children list |
1173 |
if ($index == -1) { |
if ($index == -1) { |
1174 |
push @$children, map { |
push @$children, @new_child; |
|
|
|
|
$_->{'id'} |
|
|
|
|
|
} @new_child; |
|
1175 |
} else { |
} else { |
1176 |
splice @$children, $index, 0, map { |
splice @$children, $index, 0, @new_child; |
|
|
|
|
$_->{'id'} |
|
|
|
|
|
} @new_child; |
|
1177 |
} |
} |
1178 |
$r = $newChild; |
$r = $newChild; |
1179 |
|
|
1206 |
not defined $newChild-> |
not defined $newChild-> |
1207 |
owner_document |
owner_document |
1208 |
) { |
) { |
1209 |
my $bag = |
CORE::delete $$newChild->{ |
1210 |
$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' |
|
1211 |
}; |
}; |
1212 |
|
$$newChild->{ |
1213 |
|
'od' |
1214 |
} |
} = $self; |
1215 |
|
Scalar::Util::weaken ($$newChild->{ |
1216 |
; |
'od' |
1217 |
|
}); |
1218 |
} |
} |
1219 |
|
|
1220 |
|
|
1777 |
if ($child_nt == |
if ($child_nt == |
1778 |
11 |
11 |
1779 |
) { |
) { |
1780 |
|
$$newChild->{ |
1781 |
|
'child' |
1782 |
{ |
} = []; |
|
|
|
|
|
|
|
$newChild->{ |
|
|
'b' |
|
|
}->{${$newChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'} = []; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1783 |
} else { |
} else { |
1784 |
my $v; |
my $v = $$nc_parent->{ |
1785 |
|
'child' |
1786 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$v = $nc_parent->{ |
|
|
'b' |
|
|
}->{${$nc_parent->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1787 |
RP: for my $i (0..$#$v) { |
RP: for my $i (0..$#$v) { |
1788 |
my $nodeid = $v->[$i]; |
if ($v->[$i] eq $new_child[0]) { |
|
if ( |
|
|
(${$new_child[0]->{'id'}} eq ${$nodeid}) |
|
|
) { |
|
1789 |
splice @$v, $i, 1, (); |
splice @$v, $i, 1, (); |
1790 |
last RP; |
last RP; |
1791 |
} |
} |
1795 |
|
|
1796 |
## -- Rewrite the |parentNode| properties |
## -- Rewrite the |parentNode| properties |
1797 |
for my $nc (@new_child) { |
for my $nc (@new_child) { |
1798 |
|
$$nc->{ |
1799 |
|
'parent' |
1800 |
{ |
} = $self; |
1801 |
|
Scalar::Util::weaken ($$nc->{ |
1802 |
|
'parent' |
1803 |
$nc->{ |
}); |
|
'b' |
|
|
}->{${$nc->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'} = $self->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1804 |
} |
} |
1805 |
|
|
1806 |
my $children; |
my $children = $$self->{ |
1807 |
|
'child' |
1808 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$children = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1809 |
|
|
1810 |
|
|
1811 |
|
|
1821 |
|
|
1822 |
|
|
1823 |
## -- Replaces the node |
## -- Replaces the node |
1824 |
splice @$children, $index, 1, map { |
splice @$children, $index, 1, @new_child; |
1825 |
|
CORE::delete $$oldChild->{ |
1826 |
$_->{'id'} |
'parent' |
1827 |
|
}; |
|
} @new_child; |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
CORE::delete |
|
|
$oldChild->{ |
|
|
'b' |
|
|
}->{${$oldChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1828 |
$r = $oldChild; |
$r = $oldChild; |
1829 |
|
|
1830 |
|
|
1852 |
not defined $newChild-> |
not defined $newChild-> |
1853 |
owner_document |
owner_document |
1854 |
) { |
) { |
1855 |
my $bag = |
CORE::delete $$newChild->{ |
1856 |
$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' |
|
1857 |
}; |
}; |
1858 |
|
$$newChild->{ |
1859 |
|
'od' |
1860 |
} |
} = $self; |
1861 |
|
Scalar::Util::weaken ($$newChild->{ |
1862 |
; |
'od' |
1863 |
|
}); |
1864 |
} |
} |
1865 |
|
|
1866 |
|
|
1952 |
F: |
F: |
1953 |
{ |
{ |
1954 |
my $i = -1; |
my $i = -1; |
1955 |
for my $cld (@{$self-> |
my $v = $$self->{ |
1956 |
child_nodes |
'child' |
1957 |
}) { |
}; |
1958 |
|
for my $cld (@$v) { |
1959 |
$i++; |
$i++; |
1960 |
if ($cld eq $oldChild) { |
if ($cld eq $oldChild) { |
|
my $v; |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
$v = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1961 |
splice @$v, $i, 1, (); |
splice @$v, $i, 1, (); |
1962 |
|
CORE::delete $$oldChild->{ |
1963 |
|
'parent' |
1964 |
{ |
}; |
|
|
|
|
CORE::delete |
|
|
$oldChild->{ |
|
|
'b' |
|
|
}->{${$oldChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
1965 |
$r = $oldChild; |
$r = $oldChild; |
1966 |
last F; |
last F; |
1967 |
} |
} |
2103 |
|
|
2104 |
; |
; |
2105 |
|
|
2106 |
my @__old_children = @{$self-> |
for my $__old_child (@{${$self}->{ |
2107 |
child_nodes |
'child' |
2108 |
|
}}) { |
2109 |
|
CORE::delete $$__old_child->{ |
2110 |
|
'parent' |
2111 |
}; |
}; |
|
for my $__old_child (@__old_children) { |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
CORE::delete |
|
|
$__old_child->{ |
|
|
'b' |
|
|
}->{${$__old_child->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2112 |
} |
} |
2113 |
|
|
2114 |
my @__new_children; |
my @__new_children; |
2116 |
my $__text = $self-> |
my $__text = $self-> |
2117 |
create_text_node |
create_text_node |
2118 |
($given); |
($given); |
2119 |
push @__new_children, |
push @__new_children, $__text; |
2120 |
$__text->{'id'} |
$$__text->{ |
2121 |
; |
'parent' |
2122 |
|
} = $self; |
2123 |
|
Scalar::Util::weaken ($$__text->{ |
2124 |
{ |
'parent' |
2125 |
|
}); |
|
|
|
|
$__text->{ |
|
|
'b' |
|
|
}->{${$__text->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'} = $self->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'} = \@__new_children; |
|
|
|
|
|
|
|
2126 |
} |
} |
2127 |
|
|
2128 |
; |
${$self}->{ |
2129 |
|
'child' |
2130 |
|
} = \@__new_children; |
2131 |
|
|
2132 |
|
|
2133 |
} |
} |
2164 |
|
|
2165 |
$feature =~ s/^\+//; |
$feature =~ s/^\+//; |
2166 |
|
|
|
## TODO: Remove this code and implement autoload |
|
|
if ($feature eq |
|
|
'http://suika.fam.cx/www/2006/feature/xdoctype' |
|
|
) { |
|
|
require Message::DOM::XDoctype; |
|
|
} |
|
|
|
|
|
|
|
2167 |
|
|
2168 |
{ |
{ |
2169 |
|
|
2209 |
{ |
{ |
2210 |
|
|
2211 |
|
|
2212 |
{ |
$r = $$self->{ |
2213 |
|
'buri' |
2214 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'buri'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2215 |
unless (defined $r) { |
unless (defined $r) { |
2216 |
|
$r = $$self->{ |
2217 |
|
'duri' |
2218 |
{ |
}; |
|
|
|
|
|
|
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'duri'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2219 |
} |
} |
2220 |
|
|
2221 |
|
|
2231 |
|
|
2232 |
{ |
{ |
2233 |
|
|
|
my |
|
|
$bag = |
|
|
$self->{'b'} |
|
|
; |
|
|
my $stem; |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
2234 |
|
|
2235 |
$stem = 'Message::DOM::Document::ManakaiDOMDocumentFragment'->___create_node_stem ($bag, { |
$r = bless \{ |
2236 |
|
|
2237 |
'rc' |
'od' |
2238 |
=> 0, |
=> $self, |
2239 |
|
|
2240 |
'id' |
'child' |
2241 |
=> \ |
=> [], |
2242 |
( |
}, |
2243 |
'tag:suika.fam.cx,2005-09:' . time . ':' . $$ . ':' . |
'Message::DOM::Document::ManakaiDOMDocumentFragment' |
2244 |
(++$Message::Util::ManakaiNode::UniqueIDN) |
; |
2245 |
) |
Scalar::Util::weaken ($$r->{ |
2246 |
, |
'od' |
2247 |
}, { |
}); |
|
'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' |
|
|
}++; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2248 |
|
|
2249 |
|
|
2250 |
} |
} |
2256 |
{ |
{ |
2257 |
|
|
2258 |
|
|
2259 |
{ |
$r = $$self->{ |
2260 |
|
'chk' |
2261 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'chk'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
|
$r = |
|
|
1 unless |
|
|
defined $r; |
|
2262 |
|
|
2263 |
|
|
2264 |
} |
} |
2268 |
{ |
{ |
2269 |
|
|
2270 |
|
|
2271 |
{ |
$$self->{ |
2272 |
|
'chk' |
2273 |
|
} = $given; |
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'chk'} = $given ? 1 : 0; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2274 |
|
|
2275 |
|
|
2276 |
} |
} |
2286 |
{ |
{ |
2287 |
|
|
2288 |
|
|
2289 |
$r = bless [$self, ($self->{'b'}->{${$self->{'id'}}}), 'Message::DOM::IFLatest::Document'], |
$r = bless [$self, $$self, 'Message::DOM::IFLatest::Document'], |
2290 |
|
|
2291 |
'Message::DOM::DOMCore::ManakaiDOMConfiguration' |
'Message::DOM::DOMCore::ManakaiDOMConfiguration' |
2292 |
; |
; |
2354 |
{ |
{ |
2355 |
|
|
2356 |
|
|
2357 |
{ |
$r = $$self->{ |
2358 |
|
'impl' |
2359 |
my |
}; |
|
$__v = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'impl'}; |
|
|
if (defined $__v) { |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
$r = ${$self->{'b'}->{${$__v}}->{ |
|
|
'cls' |
|
|
}}->___create_node_ref ({ |
|
|
|
|
|
'id' |
|
|
=> $__v, |
|
|
|
|
|
'b' |
|
|
=> $self->{'b'}, |
|
|
}, {}); |
|
|
$self->{'b'}->{${$__v}}->{ |
|
|
'rc' |
|
|
}++; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2360 |
|
|
2361 |
|
|
2362 |
} |
} |
2372 |
{ |
{ |
2373 |
|
|
2374 |
|
|
2375 |
{ |
$r = $$self->{ |
2376 |
|
'http://www.w3.org/2001/04/infoset#version' |
2377 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'http://www.w3.org/2001/04/infoset#version'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
|
$r = '1.0' unless defined $r; |
|
2378 |
|
|
2379 |
|
|
2380 |
} |
} |
2405 |
not $self-> |
not $self-> |
2406 |
strict_error_checking |
strict_error_checking |
2407 |
)) { |
)) { |
2408 |
|
$$self->{ |
2409 |
|
'http://www.w3.org/2001/04/infoset#version' |
2410 |
{ |
} = $given; |
|
|
|
|
|
|
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'http://www.w3.org/2001/04/infoset#version'} = $given; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2411 |
} else { |
} else { |
2412 |
|
|
2413 |
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; |
2475 |
{ |
{ |
2476 |
|
|
2477 |
|
|
2478 |
{ |
$r = $$self->{ |
2479 |
|
'duri' |
2480 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'duri'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2481 |
|
|
2482 |
|
|
2483 |
} |
} |
2503 |
} |
} |
2504 |
|
|
2505 |
; |
; |
2506 |
|
$$self->{ |
2507 |
|
'duri' |
2508 |
{ |
} = $given; |
|
|
|
|
|
|
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'duri'} = $given; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2509 |
|
|
2510 |
|
|
2511 |
} |
} |
2518 |
{ |
{ |
2519 |
|
|
2520 |
|
|
2521 |
{ |
$r = $$self->{ |
2522 |
|
'ces' |
2523 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'ces'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2524 |
|
|
2525 |
|
|
2526 |
} |
} |
2546 |
} |
} |
2547 |
|
|
2548 |
; |
; |
2549 |
|
$$self->{ |
2550 |
|
'ces' |
2551 |
{ |
} = $given; |
|
|
|
|
|
|
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'ces'} = $given; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2552 |
|
|
2553 |
|
|
2554 |
} |
} |
2561 |
{ |
{ |
2562 |
|
|
2563 |
|
|
2564 |
{ |
$r = $$self->{ |
2565 |
|
'xcs' |
2566 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'xcs'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2567 |
|
|
2568 |
|
|
2569 |
} |
} |
2589 |
} |
} |
2590 |
|
|
2591 |
; |
; |
2592 |
|
$$self->{ |
2593 |
|
'xcs' |
2594 |
{ |
} = $given; |
|
|
|
|
|
|
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'xcs'} = $given; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2595 |
|
|
2596 |
|
|
2597 |
} |
} |
2604 |
{ |
{ |
2605 |
|
|
2606 |
|
|
2607 |
{ |
$r = $$self->{ |
2608 |
|
'http://www.w3.org/2001/04/infoset#standalone' |
2609 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'http://www.w3.org/2001/04/infoset#standalone'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2610 |
|
|
2611 |
|
|
2612 |
} |
} |
2632 |
} |
} |
2633 |
|
|
2634 |
; |
; |
2635 |
|
$$self->{ |
2636 |
|
'http://www.w3.org/2001/04/infoset#standalone' |
2637 |
{ |
} = $given; |
|
|
|
|
|
|
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'http://www.w3.org/2001/04/infoset#standalone'} = $given; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2638 |
|
|
2639 |
|
|
2640 |
} |
} |
2651 |
last ADOPT |
last ADOPT |
2652 |
unless $source->isa ( |
unless $source->isa ( |
2653 |
'Message::DOM::TreeCore::ManakaiDOMNode' |
'Message::DOM::TreeCore::ManakaiDOMNode' |
2654 |
) and |
); |
|
|
|
|
$self->{'b'} |
|
|
eq |
|
|
|
|
|
$source->{'b'} |
|
|
; |
|
2655 |
|
|
2656 |
my $strict = $self-> |
my $strict = $self-> |
2657 |
strict_error_checking |
strict_error_checking |
2818 |
last ADOPT; |
last ADOPT; |
2819 |
} |
} |
2820 |
|
|
|
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'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2821 |
for my $n (@change_od) { |
for my $n (@change_od) { |
2822 |
|
$$n->{ |
2823 |
|
'od' |
2824 |
{ |
} = $self; |
2825 |
|
Scalar::Util::weaken ($$n->{ |
2826 |
|
'od' |
2827 |
$n->{ |
}); |
|
'b' |
|
|
}->{${$n->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'od'} = $self->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
|
my $nid = |
|
|
$n->{'id'} |
|
|
; |
|
|
CORE::delete $old_od_list->{$$nid}; |
|
|
$new_od_list->{$$nid} = $nid; |
|
2828 |
} |
} |
2829 |
|
|
2830 |
for my $src (@change_od) { |
for my $src (@change_od) { |
2831 |
my $src_ud; |
my $src_ud = $$src->{ |
2832 |
|
'ud' |
2833 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$src_ud = $src->{ |
|
|
'b' |
|
|
}->{${$src->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'ud'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
2834 |
for my $key (keys %{$src_ud or {}}) { |
for my $key (keys %{$src_ud or {}}) { |
2835 |
my $dh = $src_ud->{$key}->[1]; |
my $dh = $src_ud->{$key}->[1]; |
2836 |
if ($dh) { |
if ($dh) { |
2954 |
(CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) { |
(CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) { |
2955 |
require Message::DOM::DOMMain; |
require Message::DOM::DOMMain; |
2956 |
|
|
2957 |
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:1162711890:16031:uDMne5008+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:tag:suika.fam.cx,2005-09:1167450139:7187:cCkYT15288+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest'; |
2958 |
|
|
2959 |
; |
; |
2960 |
|
|
3071 |
(CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) { |
(CORE::defined $namespaceURI and CORE::length $namespaceURI == 0) { |
3072 |
require Message::DOM::DOMMain; |
require Message::DOM::DOMMain; |
3073 |
|
|
3074 |
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:1162711890:16031:uDMne5008+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:tag:suika.fam.cx,2005-09:1167450139:7187:cCkYT15288+http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom%23ManakaiDOMLatest'; |
3075 |
|
|
3076 |
; |
; |
3077 |
|
|
3101 |
{ |
{ |
3102 |
|
|
3103 |
|
|
3104 |
{ |
$r = $$self->{ |
3105 |
|
'buri' |
3106 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'buri'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3107 |
unless (defined $r) { |
unless (defined $r) { |
3108 |
|
$r = $$self->{ |
3109 |
|
'duri' |
3110 |
{ |
}; |
|
|
|
|
|
|
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'duri'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3111 |
} |
} |
3112 |
|
|
3113 |
|
|
3134 |
} |
} |
3135 |
|
|
3136 |
; |
; |
3137 |
|
$$self->{ |
3138 |
|
'buri' |
3139 |
{ |
} = $given; |
|
|
|
|
|
|
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'buri'} = $given; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3140 |
|
|
3141 |
|
|
3142 |
} |
} |
3149 |
{ |
{ |
3150 |
|
|
3151 |
|
|
3152 |
{ |
$r = $$self->{ |
3153 |
|
'http://www.w3.org/2001/04/infoset#allDeclarationsProcessed' |
3154 |
|
}; |
|
$r = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'http://www.w3.org/2001/04/infoset#allDeclarationsProcessed'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3155 |
|
|
3156 |
|
|
3157 |
} |
} |
3177 |
} |
} |
3178 |
|
|
3179 |
; |
; |
3180 |
|
$$self->{ |
3181 |
|
'http://www.w3.org/2001/04/infoset#allDeclarationsProcessed' |
3182 |
{ |
} = $given; |
|
|
|
|
|
|
|
$self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'http://www.w3.org/2001/04/infoset#allDeclarationsProcessed'} = $given; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3183 |
|
|
3184 |
|
|
3185 |
} |
} |
3211 |
'1.1', |
'1.1', |
3212 |
'1'}}; |
'1'}}; |
3213 |
$Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMDocument>} = 14.1; |
$Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMDocument>} = 14.1; |
|
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::Document::ManakaiDOMDocument>}->{compat_class}->{q<Message::DOM::Document::ManakaiDOMDocument>} = 1; |
|
|
$Message::Util::Grove::ClassProp{q<Message::DOM::Document::ManakaiDOMDocument>} = {'s1a', |
|
|
['child'], |
|
|
'v1h', |
|
|
['do'], |
|
|
'w0', |
|
|
['impl']}; |
|
3214 |
package Message::DOM::IFLatest::DocumentFragment; |
package Message::DOM::IFLatest::DocumentFragment; |
3215 |
our $VERSION = 20061105.0827; |
our $VERSION = 20061230.0424; |
3216 |
package Message::DOM::Document::ManakaiDOMDocumentFragment; |
package Message::DOM::Document::ManakaiDOMDocumentFragment; |
3217 |
our $VERSION = 20061105.0827; |
our $VERSION = 20061230.0424; |
3218 |
push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode', |
push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode', |
|
'Message::DOM::IF::DocumentFragment', |
|
|
'Message::DOM::IF::Node', |
|
3219 |
'Message::DOM::IFLatest::DocumentFragment', |
'Message::DOM::IFLatest::DocumentFragment', |
3220 |
'Message::DOM::IFLatest::Node', |
'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} |
|
3221 |
sub node_type ($;$) { |
sub node_type ($;$) { |
3222 |
if (@_ == 1) {my ($self) = @_; |
if (@_ == 1) {my ($self) = @_; |
3223 |
my $r; |
my $r; |
3420 |
if ($child_nt == |
if ($child_nt == |
3421 |
11 |
11 |
3422 |
) { |
) { |
3423 |
|
$$newChild->{ |
3424 |
|
'child' |
3425 |
{ |
} = []; |
|
|
|
|
|
|
|
$newChild->{ |
|
|
'b' |
|
|
}->{${$newChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'} = []; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3426 |
} else { |
} else { |
3427 |
my $v; |
my $v = $$nc_parent->{ |
3428 |
|
'child' |
3429 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$v = $nc_parent->{ |
|
|
'b' |
|
|
}->{${$nc_parent->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3430 |
RP: for my $i (0..$#$v) { |
RP: for my $i (0..$#$v) { |
3431 |
my $nodeid = $v->[$i]; |
if ($v->[$i] eq $new_child[0]) { |
|
if ( |
|
|
(${$new_child[0]->{'id'}} eq ${$nodeid}) |
|
|
) { |
|
3432 |
splice @$v, $i, 1, (); |
splice @$v, $i, 1, (); |
3433 |
last RP; |
last RP; |
3434 |
} |
} |
3438 |
|
|
3439 |
## -- Rewrite the |parentNode| properties |
## -- Rewrite the |parentNode| properties |
3440 |
for my $nc (@new_child) { |
for my $nc (@new_child) { |
3441 |
|
$$nc->{ |
3442 |
|
'parent' |
3443 |
{ |
} = $self; |
3444 |
|
Scalar::Util::weaken ($$nc->{ |
3445 |
|
'parent' |
3446 |
$nc->{ |
}); |
|
'b' |
|
|
}->{${$nc->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'} = $self->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3447 |
} |
} |
3448 |
|
|
3449 |
my $children; |
my $children = $$self->{ |
3450 |
|
'child' |
3451 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$children = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3452 |
|
|
3453 |
|
|
3454 |
|
|
3456 |
|
|
3457 |
|
|
3458 |
## -- Adds to children list |
## -- Adds to children list |
3459 |
push @$children, map { |
push @$children, @new_child; |
|
|
|
|
$_->{'id'} |
|
|
|
|
|
} @new_child; |
|
3460 |
$r = $newChild; |
$r = $newChild; |
3461 |
|
|
3462 |
|
|
3775 |
if ($child_nt == |
if ($child_nt == |
3776 |
11 |
11 |
3777 |
) { |
) { |
3778 |
|
$$newChild->{ |
3779 |
|
'child' |
3780 |
{ |
} = []; |
|
|
|
|
|
|
|
$newChild->{ |
|
|
'b' |
|
|
}->{${$newChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'} = []; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3781 |
} else { |
} else { |
3782 |
my $v; |
my $v = $$nc_parent->{ |
3783 |
|
'child' |
3784 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$v = $nc_parent->{ |
|
|
'b' |
|
|
}->{${$nc_parent->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3785 |
RP: for my $i (0..$#$v) { |
RP: for my $i (0..$#$v) { |
3786 |
my $nodeid = $v->[$i]; |
if ($v->[$i] eq $new_child[0]) { |
|
if ( |
|
|
(${$new_child[0]->{'id'}} eq ${$nodeid}) |
|
|
) { |
|
3787 |
splice @$v, $i, 1, (); |
splice @$v, $i, 1, (); |
3788 |
last RP; |
last RP; |
3789 |
} |
} |
3793 |
|
|
3794 |
## -- Rewrite the |parentNode| properties |
## -- Rewrite the |parentNode| properties |
3795 |
for my $nc (@new_child) { |
for my $nc (@new_child) { |
3796 |
|
$$nc->{ |
3797 |
|
'parent' |
3798 |
{ |
} = $self; |
3799 |
|
Scalar::Util::weaken ($$nc->{ |
3800 |
|
'parent' |
3801 |
$nc->{ |
}); |
|
'b' |
|
|
}->{${$nc->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'} = $self->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3802 |
} |
} |
3803 |
|
|
3804 |
my $children; |
my $children = $$self->{ |
3805 |
|
'child' |
3806 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$children = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
3807 |
|
|
3808 |
|
|
3809 |
|
|
3816 |
|
|
3817 |
## -- Adds to children list |
## -- Adds to children list |
3818 |
if ($index == -1) { |
if ($index == -1) { |
3819 |
push @$children, map { |
push @$children, @new_child; |
|
|
|
|
$_->{'id'} |
|
|
|
|
|
} @new_child; |
|
3820 |
} else { |
} else { |
3821 |
splice @$children, $index, 0, map { |
splice @$children, $index, 0, @new_child; |
|
|
|
|
$_->{'id'} |
|
|
|
|
|
} @new_child; |
|
3822 |
} |
} |
3823 |
$r = $newChild; |
$r = $newChild; |
3824 |
|
|
4157 |
if ($child_nt == |
if ($child_nt == |
4158 |
11 |
11 |
4159 |
) { |
) { |
4160 |
|
$$newChild->{ |
4161 |
|
'child' |
4162 |
{ |
} = []; |
|
|
|
|
|
|
|
$newChild->{ |
|
|
'b' |
|
|
}->{${$newChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'} = []; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
4163 |
} else { |
} else { |
4164 |
my $v; |
my $v = $$nc_parent->{ |
4165 |
|
'child' |
4166 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$v = $nc_parent->{ |
|
|
'b' |
|
|
}->{${$nc_parent->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
4167 |
RP: for my $i (0..$#$v) { |
RP: for my $i (0..$#$v) { |
4168 |
my $nodeid = $v->[$i]; |
if ($v->[$i] eq $new_child[0]) { |
|
if ( |
|
|
(${$new_child[0]->{'id'}} eq ${$nodeid}) |
|
|
) { |
|
4169 |
splice @$v, $i, 1, (); |
splice @$v, $i, 1, (); |
4170 |
last RP; |
last RP; |
4171 |
} |
} |
4175 |
|
|
4176 |
## -- Rewrite the |parentNode| properties |
## -- Rewrite the |parentNode| properties |
4177 |
for my $nc (@new_child) { |
for my $nc (@new_child) { |
4178 |
|
$$nc->{ |
4179 |
|
'parent' |
4180 |
{ |
} = $self; |
4181 |
|
Scalar::Util::weaken ($$nc->{ |
4182 |
|
'parent' |
4183 |
$nc->{ |
}); |
|
'b' |
|
|
}->{${$nc->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'} = $self->{ |
|
|
'id' |
|
|
}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
4184 |
} |
} |
4185 |
|
|
4186 |
my $children; |
my $children = $$self->{ |
4187 |
|
'child' |
4188 |
|
}; |
|
{ |
|
|
|
|
|
|
|
|
$children = $self->{ |
|
|
'b' |
|
|
}->{${$self->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'child'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
4189 |
|
|
4190 |
|
|
4191 |
|
|
4201 |
|
|
4202 |
|
|
4203 |
## -- Replaces the node |
## -- Replaces the node |
4204 |
splice @$children, $index, 1, map { |
splice @$children, $index, 1, @new_child; |
4205 |
|
CORE::delete $$oldChild->{ |
4206 |
$_->{'id'} |
'parent' |
4207 |
|
}; |
|
} @new_child; |
|
|
|
|
|
|
|
|
{ |
|
|
|
|
|
CORE::delete |
|
|
$oldChild->{ |
|
|
'b' |
|
|
}->{${$oldChild->{ |
|
|
'id' |
|
|
}}} |
|
|
->{'parent'}; |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
; |
|
4208 |
$r = $oldChild; |
$r = $oldChild; |
4209 |
|
|
4210 |
|
|
4419 |
'1.1', |
'1.1', |
4420 |
'1'}}; |
'1'}}; |
4421 |
$Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMDocumentFragment>} = 14.1; |
$Message::DOM::ClassPoint{q<Message::DOM::Document::ManakaiDOMDocumentFragment>} = 14.1; |
4422 |
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::Document::ManakaiDOMDocumentFragment>}->{compat_class}->{q<Message::DOM::Document::ManakaiDOMDocumentFragment>} = 1; |
for ($Message::DOM::IFLatest::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::){} |
|
4423 |
## 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> |
4424 |
1; |
1; |