1 |
wakaba |
1.1 |
#!/usr/bin/perl |
2 |
|
|
## This file is automatically generated |
3 |
wakaba |
1.6 |
## at 2006-11-04T12:50:46+00:00, |
4 |
wakaba |
1.5 |
## from file "../DOM/CharacterData.dis", |
5 |
wakaba |
1.1 |
## module <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOM.CharacterData>, |
6 |
|
|
## for <http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#ManakaiDOMLatest>. |
7 |
|
|
## Don't edit by hand! |
8 |
|
|
use strict; |
9 |
|
|
require Message::DOM::DOMCore; |
10 |
|
|
require Message::DOM::TreeCore; |
11 |
|
|
require Message::Util::Error::DOMException; |
12 |
|
|
package Message::DOM::CharacterData; |
13 |
wakaba |
1.6 |
our $VERSION = 20061104.1250; |
14 |
wakaba |
1.1 |
package Message::DOM::IFLatest::CharacterData; |
15 |
wakaba |
1.6 |
our $VERSION = 20061104.1250; |
16 |
wakaba |
1.1 |
package Message::DOM::CharacterData::ManakaiDOMCharacterData; |
17 |
wakaba |
1.6 |
our $VERSION = 20061104.1250; |
18 |
wakaba |
1.1 |
push our @ISA, 'Message::DOM::TreeCore::ManakaiDOMNode', |
19 |
|
|
'Message::DOM::IF::CharacterData', |
20 |
|
|
'Message::DOM::IF::Node', |
21 |
|
|
'Message::DOM::IFLatest::CharacterData', |
22 |
|
|
'Message::DOM::IFLatest::Node', |
23 |
|
|
'Message::DOM::IFLatest::StringExtended', |
24 |
|
|
'Message::DOM::IFLevel1::CharacterData', |
25 |
|
|
'Message::DOM::IFLevel1::Node', |
26 |
|
|
'Message::DOM::IFLevel2::CharacterData', |
27 |
|
|
'Message::DOM::IFLevel2::Node', |
28 |
|
|
'Message::DOM::IFLevel3::CharacterData', |
29 |
|
|
'Message::DOM::IFLevel3::Node'; |
30 |
wakaba |
1.2 |
use Message::Util::Error; |
31 |
wakaba |
1.1 |
sub ___create_node_stem ($$$$) { |
32 |
|
|
my ($self, $bag, $obj, $opt) = @_; |
33 |
|
|
my $r = {}; |
34 |
|
|
|
35 |
|
|
{ |
36 |
|
|
|
37 |
|
|
|
38 |
|
|
$obj->{ |
39 |
|
|
'con' |
40 |
|
|
} = $opt->{ |
41 |
|
|
'con' |
42 |
|
|
}; |
43 |
|
|
|
44 |
|
|
|
45 |
|
|
{ |
46 |
|
|
|
47 |
|
|
|
48 |
|
|
$obj->{'od'} = $opt->{'od'}->{ |
49 |
|
|
'id' |
50 |
|
|
}; |
51 |
|
|
$bag->{${$opt->{'od'}->{ |
52 |
|
|
'id' |
53 |
|
|
}}} |
54 |
|
|
->{'do'}->{${$obj->{ |
55 |
|
|
'id' |
56 |
|
|
}}} |
57 |
|
|
= $obj->{ |
58 |
|
|
'id' |
59 |
|
|
}; |
60 |
|
|
|
61 |
|
|
|
62 |
|
|
} |
63 |
|
|
|
64 |
|
|
; |
65 |
|
|
$r = $obj; |
66 |
|
|
|
67 |
|
|
|
68 |
|
|
} |
69 |
|
|
$r} |
70 |
|
|
sub child_nodes ($;$) { |
71 |
|
|
if (@_ == 1) {my ($self) = @_; |
72 |
|
|
my $r; |
73 |
|
|
|
74 |
|
|
{ |
75 |
|
|
|
76 |
|
|
|
77 |
|
|
{ |
78 |
|
|
|
79 |
|
|
|
80 |
|
|
$r = bless [], |
81 |
|
|
'Message::DOM::TreeCore::ManakaiDOMEmptyNodeList' |
82 |
|
|
; |
83 |
|
|
|
84 |
|
|
|
85 |
|
|
} |
86 |
|
|
|
87 |
|
|
; |
88 |
|
|
|
89 |
|
|
|
90 |
|
|
} |
91 |
|
|
$r; |
92 |
|
|
} else {my ($self) = @_; |
93 |
|
|
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::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'child_nodes'; |
94 |
|
|
} |
95 |
|
|
} |
96 |
|
|
sub append_child ($$) { |
97 |
|
|
my ($self, $newChild) = @_; |
98 |
|
|
my $r; |
99 |
|
|
|
100 |
|
|
{ |
101 |
|
|
|
102 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'append_child', '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#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', '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; |
103 |
|
|
|
104 |
|
|
; |
105 |
|
|
|
106 |
|
|
|
107 |
|
|
} |
108 |
|
|
$r} |
109 |
|
|
sub insert_before ($$;$) { |
110 |
|
|
my ($self, $newChild, $refChild) = @_; |
111 |
|
|
my $r; |
112 |
|
|
|
113 |
|
|
{ |
114 |
|
|
|
115 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'insert_before', '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#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', '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; |
116 |
|
|
|
117 |
|
|
; |
118 |
|
|
|
119 |
|
|
|
120 |
|
|
} |
121 |
|
|
$r} |
122 |
|
|
sub replace_child ($$$) { |
123 |
|
|
my ($self, $newChild, $oldChild) = @_; |
124 |
|
|
my $r; |
125 |
|
|
|
126 |
|
|
{ |
127 |
|
|
|
128 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'HIERARCHY_REQUEST_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'replace_child', '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#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', '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; |
129 |
|
|
|
130 |
|
|
; |
131 |
|
|
|
132 |
|
|
|
133 |
|
|
} |
134 |
|
|
$r} |
135 |
|
|
sub manakai_append_text ($$) { |
136 |
|
|
my ($self, $string) = @_; |
137 |
|
|
my $r; |
138 |
|
|
|
139 |
|
|
{ |
140 |
|
|
|
141 |
|
|
|
142 |
|
|
{ |
143 |
|
|
|
144 |
|
|
local $Error::Depth = $Error::Depth + 1; |
145 |
|
|
|
146 |
|
|
{ |
147 |
|
|
|
148 |
|
|
|
149 |
|
|
if |
150 |
|
|
($self-> |
151 |
|
|
owner_document |
152 |
|
|
|
153 |
|
|
-> |
154 |
|
|
strict_error_checking and |
155 |
|
|
|
156 |
|
|
$self-> |
157 |
|
|
manakai_read_only |
158 |
|
|
) { |
159 |
|
|
|
160 |
|
|
|
161 |
|
|
{ |
162 |
|
|
|
163 |
|
|
local $Error::Depth = $Error::Depth - 1; |
164 |
|
|
|
165 |
|
|
{ |
166 |
|
|
|
167 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'manakai_append_text', '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#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData'; |
168 |
|
|
|
169 |
|
|
|
170 |
|
|
} |
171 |
|
|
|
172 |
|
|
|
173 |
|
|
;} |
174 |
|
|
|
175 |
|
|
; |
176 |
|
|
} |
177 |
|
|
my $v; |
178 |
|
|
|
179 |
|
|
|
180 |
|
|
{ |
181 |
|
|
|
182 |
|
|
|
183 |
|
|
$v = $self->{ |
184 |
|
|
'b' |
185 |
|
|
}->{${$self->{ |
186 |
|
|
'id' |
187 |
|
|
}}} |
188 |
|
|
->{'con'}; |
189 |
|
|
|
190 |
|
|
|
191 |
|
|
} |
192 |
|
|
|
193 |
|
|
; |
194 |
|
|
$$v .= ref $string eq 'SCALAR' ? $$string : $string; |
195 |
|
|
$r = $self; |
196 |
|
|
|
197 |
|
|
|
198 |
|
|
|
199 |
|
|
} |
200 |
|
|
|
201 |
|
|
|
202 |
|
|
;} |
203 |
|
|
|
204 |
|
|
; |
205 |
|
|
|
206 |
|
|
|
207 |
|
|
} |
208 |
|
|
$r} |
209 |
|
|
sub node_value ($;$) { |
210 |
|
|
if (@_ == 1) {my ($self) = @_; |
211 |
|
|
my $r = ''; |
212 |
|
|
|
213 |
|
|
{ |
214 |
|
|
|
215 |
|
|
my |
216 |
|
|
$v; |
217 |
|
|
|
218 |
|
|
|
219 |
|
|
{ |
220 |
|
|
|
221 |
|
|
|
222 |
|
|
$v = $self->{ |
223 |
|
|
'b' |
224 |
|
|
}->{${$self->{ |
225 |
|
|
'id' |
226 |
|
|
}}} |
227 |
|
|
->{'con'}; |
228 |
|
|
|
229 |
|
|
|
230 |
|
|
} |
231 |
|
|
|
232 |
|
|
; |
233 |
|
|
$r = $$v; |
234 |
|
|
|
235 |
|
|
|
236 |
|
|
} |
237 |
|
|
$r; |
238 |
|
|
} else {my ($self, $given) = @_; |
239 |
|
|
|
240 |
|
|
{ |
241 |
|
|
|
242 |
|
|
|
243 |
|
|
{ |
244 |
|
|
|
245 |
|
|
if |
246 |
|
|
($self-> |
247 |
|
|
manakai_read_only |
248 |
|
|
) { |
249 |
|
|
|
250 |
|
|
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'; |
251 |
|
|
|
252 |
|
|
; |
253 |
|
|
} |
254 |
|
|
|
255 |
|
|
|
256 |
|
|
} |
257 |
|
|
|
258 |
|
|
; |
259 |
|
|
my $v; |
260 |
|
|
|
261 |
|
|
|
262 |
|
|
{ |
263 |
|
|
|
264 |
|
|
|
265 |
|
|
$v = $self->{ |
266 |
|
|
'b' |
267 |
|
|
}->{${$self->{ |
268 |
|
|
'id' |
269 |
|
|
}}} |
270 |
|
|
->{'con'}; |
271 |
|
|
|
272 |
|
|
|
273 |
|
|
} |
274 |
|
|
|
275 |
|
|
; |
276 |
|
|
$$v = defined $given ? $given : ''; |
277 |
|
|
## NOTE: Setting NULL is supported for |
278 |
|
|
## compatibility with |textContent|. |
279 |
|
|
|
280 |
|
|
|
281 |
|
|
} |
282 |
|
|
} |
283 |
|
|
} |
284 |
|
|
sub text_content ($;$) { |
285 |
|
|
if (@_ == 1) {my ($self) = @_; |
286 |
|
|
my $r = ''; |
287 |
|
|
|
288 |
|
|
{ |
289 |
|
|
|
290 |
|
|
my |
291 |
|
|
$v; |
292 |
|
|
|
293 |
|
|
|
294 |
|
|
{ |
295 |
|
|
|
296 |
|
|
|
297 |
|
|
$v = $self->{ |
298 |
|
|
'b' |
299 |
|
|
}->{${$self->{ |
300 |
|
|
'id' |
301 |
|
|
}}} |
302 |
|
|
->{'con'}; |
303 |
|
|
|
304 |
|
|
|
305 |
|
|
} |
306 |
|
|
|
307 |
|
|
; |
308 |
|
|
$r = $$v; |
309 |
|
|
|
310 |
|
|
|
311 |
|
|
} |
312 |
|
|
$r; |
313 |
|
|
} else {my ($self, $given) = @_; |
314 |
|
|
|
315 |
|
|
{ |
316 |
|
|
|
317 |
|
|
|
318 |
|
|
{ |
319 |
|
|
|
320 |
|
|
if |
321 |
|
|
($self-> |
322 |
|
|
manakai_read_only |
323 |
|
|
) { |
324 |
|
|
|
325 |
|
|
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'; |
326 |
|
|
|
327 |
|
|
; |
328 |
|
|
} |
329 |
|
|
|
330 |
|
|
|
331 |
|
|
} |
332 |
|
|
|
333 |
|
|
; |
334 |
|
|
my $v; |
335 |
|
|
|
336 |
|
|
|
337 |
|
|
{ |
338 |
|
|
|
339 |
|
|
|
340 |
|
|
$v = $self->{ |
341 |
|
|
'b' |
342 |
|
|
}->{${$self->{ |
343 |
|
|
'id' |
344 |
|
|
}}} |
345 |
|
|
->{'con'}; |
346 |
|
|
|
347 |
|
|
|
348 |
|
|
} |
349 |
|
|
|
350 |
|
|
; |
351 |
|
|
$$v = defined $given ? $given : ''; |
352 |
|
|
## NOTE: Setting NULL is supported for |
353 |
|
|
## compatibility with |textContent|. |
354 |
|
|
|
355 |
|
|
|
356 |
|
|
} |
357 |
|
|
} |
358 |
|
|
} |
359 |
|
|
sub base_uri ($;$) { |
360 |
|
|
if (@_ == 1) {my ($self) = @_; |
361 |
|
|
my $r = ''; |
362 |
|
|
|
363 |
|
|
{ |
364 |
|
|
|
365 |
|
|
|
366 |
|
|
{ |
367 |
|
|
|
368 |
|
|
local $Error::Depth = $Error::Depth + 1; |
369 |
|
|
|
370 |
|
|
{ |
371 |
|
|
|
372 |
|
|
|
373 |
|
|
my |
374 |
|
|
$pe = $self-> |
375 |
|
|
parent_node |
376 |
|
|
; |
377 |
|
|
W: { |
378 |
|
|
while (defined $pe) { |
379 |
|
|
my $nt = $pe-> |
380 |
|
|
node_type |
381 |
|
|
; |
382 |
|
|
if ($nt == |
383 |
wakaba |
1.5 |
1 or |
384 |
wakaba |
1.1 |
|
385 |
|
|
$nt == |
386 |
wakaba |
1.5 |
2 or |
387 |
wakaba |
1.1 |
|
388 |
|
|
$nt == |
389 |
wakaba |
1.5 |
9 or |
390 |
wakaba |
1.1 |
|
391 |
|
|
$nt == |
392 |
wakaba |
1.5 |
11 or |
393 |
wakaba |
1.1 |
|
394 |
|
|
$nt == |
395 |
wakaba |
1.5 |
6 |
396 |
wakaba |
1.1 |
) { |
397 |
|
|
$r = $pe-> |
398 |
|
|
base_uri |
399 |
|
|
; |
400 |
|
|
last W; |
401 |
|
|
} elsif ($nt == |
402 |
wakaba |
1.5 |
5 |
403 |
wakaba |
1.1 |
) { |
404 |
|
|
if ($pe-> |
405 |
|
|
manakai_external |
406 |
|
|
) { |
407 |
|
|
$r = $pe-> |
408 |
|
|
manakai_entity_base_uri |
409 |
|
|
; |
410 |
|
|
last W; |
411 |
|
|
} |
412 |
|
|
} |
413 |
|
|
$pe = $pe-> |
414 |
|
|
parent_node |
415 |
|
|
; |
416 |
|
|
} |
417 |
|
|
if ($pe) { |
418 |
|
|
$r = $pe-> |
419 |
|
|
base_uri |
420 |
|
|
; |
421 |
|
|
} else { |
422 |
|
|
$r = $self-> |
423 |
|
|
owner_document |
424 |
|
|
-> |
425 |
|
|
base_uri |
426 |
|
|
; |
427 |
|
|
} |
428 |
|
|
} # W |
429 |
|
|
|
430 |
|
|
|
431 |
|
|
|
432 |
|
|
} |
433 |
|
|
|
434 |
|
|
|
435 |
|
|
;} |
436 |
|
|
|
437 |
|
|
; |
438 |
|
|
|
439 |
|
|
|
440 |
|
|
} |
441 |
|
|
$r; |
442 |
|
|
} else {my ($self) = @_; |
443 |
|
|
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::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'base_uri'; |
444 |
|
|
} |
445 |
|
|
} |
446 |
|
|
sub find_offset16 ($$) { |
447 |
|
|
my ($self, $offset32) = @_; |
448 |
|
|
my $r = 0; |
449 |
|
|
|
450 |
|
|
{ |
451 |
|
|
|
452 |
|
|
my |
453 |
|
|
$v; |
454 |
|
|
|
455 |
|
|
|
456 |
|
|
{ |
457 |
|
|
|
458 |
|
|
|
459 |
|
|
$v = $self->{ |
460 |
|
|
'b' |
461 |
|
|
}->{${$self->{ |
462 |
|
|
'id' |
463 |
|
|
}}} |
464 |
|
|
->{'con'}; |
465 |
|
|
|
466 |
|
|
|
467 |
|
|
} |
468 |
|
|
|
469 |
|
|
; |
470 |
|
|
|
471 |
|
|
if (not defined $offset32 or $offset32 < 0 or |
472 |
|
|
CORE::length ($$v) < $offset32) { |
473 |
|
|
|
474 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#index' => $offset32, '-type' => 'INDEX_SIZE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'find_offset16', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#StringIndexOutOfBoundsException', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'offset32'; |
475 |
|
|
|
476 |
|
|
; |
477 |
|
|
} |
478 |
|
|
|
479 |
|
|
my $ss = substr $$v, 0, $offset32; |
480 |
|
|
$r = $offset32; |
481 |
|
|
if ($ss =~ /[\x{10000}-\x{10FFFF}]/) { |
482 |
|
|
while ($ss =~ /[\x{10000}-\x{10FFFF}]+/g) { |
483 |
|
|
$r += $+[0] - $-[0]; |
484 |
|
|
} |
485 |
|
|
} |
486 |
|
|
|
487 |
|
|
|
488 |
|
|
} |
489 |
|
|
$r} |
490 |
|
|
sub find_offset32 ($$) { |
491 |
|
|
my ($self, $offset16) = @_; |
492 |
|
|
my $r = 0; |
493 |
|
|
|
494 |
|
|
{ |
495 |
|
|
|
496 |
|
|
my |
497 |
|
|
$v; |
498 |
|
|
|
499 |
|
|
|
500 |
|
|
{ |
501 |
|
|
|
502 |
|
|
|
503 |
|
|
$v = $self->{ |
504 |
|
|
'b' |
505 |
|
|
}->{${$self->{ |
506 |
|
|
'id' |
507 |
|
|
}}} |
508 |
|
|
->{'con'}; |
509 |
|
|
|
510 |
|
|
|
511 |
|
|
} |
512 |
|
|
|
513 |
|
|
; |
514 |
|
|
|
515 |
|
|
if (not defined $offset16 or $offset16 < 0) { |
516 |
|
|
|
517 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#index' => $offset16, '-type' => 'INDEX_SIZE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'find_offset32', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#StringIndexOutOfBoundsException', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'offset16'; |
518 |
|
|
|
519 |
|
|
; |
520 |
|
|
} |
521 |
|
|
|
522 |
|
|
my $o = $offset16; |
523 |
|
|
while ($o > 0) { |
524 |
|
|
my $c = substr ($$v, $r, 1); |
525 |
|
|
if (length $c) { |
526 |
|
|
if ($c =~ /[\x{10000}-\x{10FFFF}]/) { |
527 |
|
|
$o -= 2; |
528 |
|
|
} else { |
529 |
|
|
$o--; |
530 |
|
|
} |
531 |
|
|
$r++; |
532 |
|
|
} else { |
533 |
|
|
|
534 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#index' => $offset16, '-type' => 'INDEX_SIZE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'find_offset32', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#StringIndexOutOfBoundsException', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'offset16'; |
535 |
|
|
|
536 |
|
|
; |
537 |
|
|
} |
538 |
|
|
} |
539 |
|
|
|
540 |
|
|
|
541 |
|
|
} |
542 |
|
|
$r} |
543 |
|
|
sub data ($;$) { |
544 |
|
|
if (@_ == 1) {my ($self) = @_; |
545 |
|
|
my $r = ''; |
546 |
|
|
|
547 |
|
|
{ |
548 |
|
|
|
549 |
|
|
my |
550 |
|
|
$v; |
551 |
|
|
|
552 |
|
|
|
553 |
|
|
{ |
554 |
|
|
|
555 |
|
|
|
556 |
|
|
$v = $self->{ |
557 |
|
|
'b' |
558 |
|
|
}->{${$self->{ |
559 |
|
|
'id' |
560 |
|
|
}}} |
561 |
|
|
->{'con'}; |
562 |
|
|
|
563 |
|
|
|
564 |
|
|
} |
565 |
|
|
|
566 |
|
|
; |
567 |
|
|
$r = $$v; |
568 |
|
|
|
569 |
|
|
|
570 |
|
|
} |
571 |
|
|
$r; |
572 |
|
|
} else {my ($self, $given) = @_; |
573 |
|
|
|
574 |
|
|
{ |
575 |
|
|
|
576 |
|
|
|
577 |
|
|
{ |
578 |
|
|
|
579 |
|
|
if |
580 |
|
|
($self-> |
581 |
|
|
manakai_read_only |
582 |
|
|
) { |
583 |
|
|
|
584 |
|
|
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'; |
585 |
|
|
|
586 |
|
|
; |
587 |
|
|
} |
588 |
|
|
|
589 |
|
|
|
590 |
|
|
} |
591 |
|
|
|
592 |
|
|
; |
593 |
|
|
my $v; |
594 |
|
|
|
595 |
|
|
|
596 |
|
|
{ |
597 |
|
|
|
598 |
|
|
|
599 |
|
|
$v = $self->{ |
600 |
|
|
'b' |
601 |
|
|
}->{${$self->{ |
602 |
|
|
'id' |
603 |
|
|
}}} |
604 |
|
|
->{'con'}; |
605 |
|
|
|
606 |
|
|
|
607 |
|
|
} |
608 |
|
|
|
609 |
|
|
; |
610 |
|
|
$$v = defined $given ? $given : ''; |
611 |
|
|
## NOTE: Setting NULL is supported for |
612 |
|
|
## compatibility with |textContent|. |
613 |
|
|
|
614 |
|
|
|
615 |
|
|
} |
616 |
|
|
} |
617 |
|
|
} |
618 |
|
|
sub length ($;$) { |
619 |
|
|
if (@_ == 1) {my ($self) = @_; |
620 |
|
|
my $r = 0; |
621 |
|
|
|
622 |
|
|
{ |
623 |
|
|
|
624 |
|
|
my |
625 |
wakaba |
1.2 |
$v; |
626 |
|
|
|
627 |
|
|
|
628 |
|
|
{ |
629 |
|
|
|
630 |
|
|
|
631 |
|
|
$v = $self->{ |
632 |
|
|
'b' |
633 |
|
|
}->{${$self->{ |
634 |
|
|
'id' |
635 |
|
|
}}} |
636 |
|
|
->{'con'}; |
637 |
|
|
|
638 |
|
|
|
639 |
|
|
} |
640 |
|
|
|
641 |
wakaba |
1.1 |
; |
642 |
wakaba |
1.2 |
$r = CORE::length $$v; |
643 |
|
|
$r++ while $$v =~ /[\x{10000}-\x{10FFFF}]/g; |
644 |
wakaba |
1.1 |
|
645 |
|
|
|
646 |
|
|
} |
647 |
|
|
$r; |
648 |
|
|
} else {my ($self) = @_; |
649 |
|
|
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::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'length'; |
650 |
|
|
} |
651 |
|
|
} |
652 |
|
|
sub substring_data ($$$) { |
653 |
|
|
my ($self, $offset, $count) = @_; |
654 |
|
|
my $r = ''; |
655 |
wakaba |
1.2 |
|
656 |
|
|
{ |
657 |
|
|
|
658 |
|
|
|
659 |
|
|
{ |
660 |
|
|
|
661 |
|
|
if |
662 |
|
|
($self-> |
663 |
|
|
manakai_read_only |
664 |
|
|
) { |
665 |
|
|
|
666 |
|
|
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'; |
667 |
|
|
|
668 |
|
|
; |
669 |
|
|
} |
670 |
|
|
|
671 |
|
|
|
672 |
|
|
} |
673 |
|
|
|
674 |
|
|
; |
675 |
|
|
if ($count < 0) { |
676 |
|
|
|
677 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INDEX_SIZE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'substring_data', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#length' => $count, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NEGATIVE_LENGTH_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'count'; |
678 |
|
|
|
679 |
|
|
; |
680 |
|
|
} |
681 |
|
|
my $eoffset32; |
682 |
|
|
|
683 |
|
|
|
684 |
|
|
try {local $Error::Depth = $Error::Depth + 3; |
685 |
|
|
|
686 |
|
|
|
687 |
|
|
$eoffset32 = $self-> |
688 |
|
|
find_offset32 |
689 |
|
|
|
690 |
|
|
($offset + $count); |
691 |
|
|
} catch |
692 |
|
|
Message::DOM::IFLatest::DOMException with |
693 |
|
|
{ |
694 |
|
|
my $err = shift; |
695 |
|
|
if ($err->subtype eq |
696 |
|
|
'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#StringIndexOutOfBoundsException' |
697 |
|
|
) { |
698 |
|
|
$eoffset32 = ($offset + $count) * 2; |
699 |
|
|
} else { |
700 |
|
|
$err->throw; |
701 |
|
|
} |
702 |
|
|
}; |
703 |
|
|
|
704 |
|
|
|
705 |
|
|
{ |
706 |
|
|
|
707 |
|
|
local $Error::Depth = $Error::Depth + 1; |
708 |
|
|
|
709 |
|
|
{ |
710 |
|
|
|
711 |
|
|
|
712 |
|
|
my |
713 |
|
|
$offset32 = $self-> |
714 |
|
|
find_offset32 |
715 |
|
|
($offset); |
716 |
|
|
my $data = $self-> |
717 |
|
|
data |
718 |
|
|
; |
719 |
|
|
$r = substr ($data, $offset32, $eoffset32 - $offset32); |
720 |
|
|
|
721 |
|
|
|
722 |
|
|
|
723 |
|
|
} |
724 |
|
|
|
725 |
|
|
|
726 |
|
|
;} |
727 |
|
|
|
728 |
|
|
; |
729 |
|
|
|
730 |
|
|
|
731 |
|
|
} |
732 |
wakaba |
1.1 |
$r} |
733 |
|
|
sub append_data ($$) { |
734 |
|
|
my ($self, $arg) = @_; |
735 |
|
|
|
736 |
|
|
{ |
737 |
|
|
|
738 |
|
|
|
739 |
|
|
{ |
740 |
|
|
|
741 |
|
|
local $Error::Depth = $Error::Depth + 1; |
742 |
|
|
|
743 |
|
|
{ |
744 |
|
|
|
745 |
|
|
|
746 |
|
|
|
747 |
|
|
$self-> |
748 |
|
|
manakai_append_text |
749 |
|
|
(\$arg); |
750 |
|
|
|
751 |
|
|
|
752 |
|
|
|
753 |
|
|
} |
754 |
|
|
|
755 |
|
|
|
756 |
|
|
;} |
757 |
|
|
|
758 |
|
|
; |
759 |
|
|
|
760 |
|
|
|
761 |
|
|
} |
762 |
|
|
} |
763 |
|
|
sub insert_data ($$$) { |
764 |
|
|
my ($self, $offset, $arg) = @_; |
765 |
wakaba |
1.2 |
|
766 |
|
|
{ |
767 |
|
|
|
768 |
|
|
|
769 |
|
|
{ |
770 |
|
|
|
771 |
|
|
if |
772 |
|
|
($self-> |
773 |
|
|
manakai_read_only |
774 |
|
|
) { |
775 |
|
|
|
776 |
|
|
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'; |
777 |
|
|
|
778 |
|
|
; |
779 |
|
|
} |
780 |
|
|
|
781 |
|
|
|
782 |
|
|
} |
783 |
|
|
|
784 |
|
|
; |
785 |
|
|
|
786 |
|
|
|
787 |
|
|
{ |
788 |
|
|
|
789 |
|
|
local $Error::Depth = $Error::Depth + 1; |
790 |
|
|
|
791 |
|
|
{ |
792 |
|
|
|
793 |
|
|
|
794 |
|
|
my |
795 |
|
|
$offset32 = $self-> |
796 |
|
|
find_offset32 |
797 |
|
|
($offset); |
798 |
|
|
my $data = $self-> |
799 |
|
|
data |
800 |
|
|
; |
801 |
|
|
substr ($data, $offset32, 0) = $arg; |
802 |
|
|
$self-> |
803 |
|
|
data |
804 |
|
|
($data); |
805 |
|
|
|
806 |
|
|
|
807 |
|
|
|
808 |
|
|
} |
809 |
|
|
|
810 |
|
|
|
811 |
|
|
;} |
812 |
|
|
|
813 |
|
|
; |
814 |
|
|
|
815 |
|
|
|
816 |
|
|
} |
817 |
wakaba |
1.1 |
} |
818 |
|
|
sub delete_data ($$$) { |
819 |
|
|
my ($self, $offset, $count) = @_; |
820 |
wakaba |
1.2 |
|
821 |
|
|
{ |
822 |
|
|
|
823 |
|
|
|
824 |
|
|
{ |
825 |
|
|
|
826 |
|
|
if |
827 |
|
|
($self-> |
828 |
|
|
manakai_read_only |
829 |
|
|
) { |
830 |
|
|
|
831 |
|
|
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'; |
832 |
|
|
|
833 |
|
|
; |
834 |
|
|
} |
835 |
|
|
|
836 |
|
|
|
837 |
|
|
} |
838 |
|
|
|
839 |
|
|
; |
840 |
|
|
if ($count < 0) { |
841 |
|
|
|
842 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'INDEX_SIZE_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'delete_data', 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#length' => $count, 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#subtype' => 'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#NEGATIVE_LENGTH_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMCharacterData', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#param-name' => 'count'; |
843 |
|
|
|
844 |
|
|
; |
845 |
|
|
} |
846 |
|
|
my $eoffset32; |
847 |
|
|
|
848 |
|
|
|
849 |
|
|
try {local $Error::Depth = $Error::Depth + 3; |
850 |
|
|
|
851 |
|
|
|
852 |
|
|
$eoffset32 = $self-> |
853 |
|
|
find_offset32 |
854 |
|
|
|
855 |
|
|
($offset + $count); |
856 |
|
|
} catch |
857 |
|
|
Message::DOM::IFLatest::DOMException with |
858 |
|
|
{ |
859 |
|
|
my $err = shift; |
860 |
|
|
if ($err->subtype eq |
861 |
|
|
'http://suika.fam.cx/~wakaba/archive/2004/8/18/dom-core#StringIndexOutOfBoundsException' |
862 |
|
|
) { |
863 |
|
|
$eoffset32 = ($offset + $count) * 2; |
864 |
|
|
} else { |
865 |
|
|
$err->throw; |
866 |
|
|
} |
867 |
|
|
}; |
868 |
|
|
|
869 |
|
|
|
870 |
|
|
{ |
871 |
|
|
|
872 |
|
|
local $Error::Depth = $Error::Depth + 1; |
873 |
|
|
|
874 |
|
|
{ |
875 |
|
|
|
876 |
|
|
|
877 |
|
|
my |
878 |
|
|
$offset32 = $self-> |
879 |
|
|
find_offset32 |
880 |
|
|
($offset); |
881 |
|
|
my $data = $self-> |
882 |
|
|
data |
883 |
|
|
; |
884 |
|
|
substr ($data, $offset32, $eoffset32 - $offset32) = ''; |
885 |
|
|
$self-> |
886 |
|
|
data |
887 |
|
|
($data); |
888 |
|
|
|
889 |
|
|
|
890 |
|
|
|
891 |
|
|
} |
892 |
|
|
|
893 |
|
|
|
894 |
|
|
;} |
895 |
|
|
|
896 |
|
|
; |
897 |
|
|
|
898 |
|
|
|
899 |
|
|
} |
900 |
wakaba |
1.1 |
} |
901 |
|
|
sub replace_data ($$$$) { |
902 |
|
|
my ($self, $offset, $count, $arg) = @_; |
903 |
|
|
|
904 |
wakaba |
1.2 |
{ |
905 |
|
|
|
906 |
|
|
|
907 |
|
|
{ |
908 |
|
|
|
909 |
|
|
local $Error::Depth = $Error::Depth + 1; |
910 |
|
|
|
911 |
|
|
{ |
912 |
|
|
|
913 |
|
|
|
914 |
|
|
|
915 |
|
|
$self-> |
916 |
|
|
delete_data |
917 |
|
|
($offset, $count); |
918 |
|
|
$self-> |
919 |
|
|
insert_data |
920 |
|
|
($offset, $arg); |
921 |
|
|
|
922 |
|
|
|
923 |
wakaba |
1.1 |
|
924 |
|
|
} |
925 |
wakaba |
1.2 |
|
926 |
|
|
|
927 |
|
|
;} |
928 |
|
|
|
929 |
|
|
; |
930 |
|
|
|
931 |
|
|
|
932 |
|
|
} |
933 |
|
|
} |
934 |
wakaba |
1.1 |
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::CharacterData::ManakaiDOMCharacterData>}->{has_feature} = {'core', |
935 |
|
|
{'', |
936 |
|
|
'1', |
937 |
|
|
'1.0', |
938 |
|
|
'1', |
939 |
|
|
'2.0', |
940 |
|
|
'1', |
941 |
|
|
'3.0', |
942 |
|
|
'1'}, |
943 |
|
|
'xml', |
944 |
|
|
{'', |
945 |
|
|
'1', |
946 |
|
|
'1.0', |
947 |
|
|
'1', |
948 |
|
|
'2.0', |
949 |
|
|
'1', |
950 |
|
|
'3.0', |
951 |
|
|
'1'}, |
952 |
|
|
'xmlversion', |
953 |
|
|
{'', |
954 |
|
|
'1', |
955 |
|
|
'1.0', |
956 |
|
|
'1', |
957 |
|
|
'1.1', |
958 |
|
|
'1'}}; |
959 |
|
|
$Message::DOM::ClassPoint{q<Message::DOM::CharacterData::ManakaiDOMCharacterData>} = 14.1; |
960 |
|
|
$Message::Util::Grove::ClassProp{q<Message::DOM::CharacterData::ManakaiDOMCharacterData>} = {'o0', |
961 |
|
|
['parent'], |
962 |
|
|
'w0', |
963 |
|
|
['od']}; |
964 |
|
|
package Message::DOM::IFLatest::Text; |
965 |
wakaba |
1.6 |
our $VERSION = 20061104.1250; |
966 |
wakaba |
1.1 |
package Message::DOM::CharacterData::ManakaiDOMText; |
967 |
wakaba |
1.6 |
our $VERSION = 20061104.1250; |
968 |
wakaba |
1.1 |
push our @ISA, 'Message::DOM::CharacterData::ManakaiDOMCharacterData', |
969 |
|
|
'Message::DOM::IF::CharacterData', |
970 |
|
|
'Message::DOM::IF::Node', |
971 |
|
|
'Message::DOM::IF::Text', |
972 |
|
|
'Message::DOM::IFLatest::CharacterData', |
973 |
|
|
'Message::DOM::IFLatest::Node', |
974 |
|
|
'Message::DOM::IFLatest::Text', |
975 |
|
|
'Message::DOM::IFLevel1::CharacterData', |
976 |
|
|
'Message::DOM::IFLevel1::Node', |
977 |
|
|
'Message::DOM::IFLevel1::Text', |
978 |
|
|
'Message::DOM::IFLevel2::CharacterData', |
979 |
|
|
'Message::DOM::IFLevel2::Node', |
980 |
|
|
'Message::DOM::IFLevel2::Text', |
981 |
|
|
'Message::DOM::IFLevel3::CharacterData', |
982 |
|
|
'Message::DOM::IFLevel3::Node', |
983 |
|
|
'Message::DOM::IFLevel3::Text'; |
984 |
|
|
sub node_type ($;$) { |
985 |
|
|
if (@_ == 1) {my ($self) = @_; |
986 |
|
|
my $r; |
987 |
wakaba |
1.5 |
$r = 3; |
988 |
wakaba |
1.1 |
$r; |
989 |
|
|
} else {my ($self) = @_; |
990 |
|
|
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::CharacterData::ManakaiDOMText', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'node_type'; |
991 |
|
|
} |
992 |
|
|
} |
993 |
|
|
sub node_name ($;$) { |
994 |
|
|
if (@_ == 1) {my ($self) = @_; |
995 |
|
|
my $r = '#text'; |
996 |
|
|
$r; |
997 |
|
|
} else {my ($self) = @_; |
998 |
|
|
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::CharacterData::ManakaiDOMText', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'node_name'; |
999 |
|
|
} |
1000 |
|
|
} |
1001 |
|
|
sub get_feature ($$$) { |
1002 |
|
|
my ($self, $feature, $version) = @_; |
1003 |
|
|
|
1004 |
|
|
{ |
1005 |
|
|
|
1006 |
|
|
|
1007 |
|
|
$feature = lc $feature; |
1008 |
|
|
|
1009 |
|
|
|
1010 |
|
|
} |
1011 |
|
|
|
1012 |
|
|
{ |
1013 |
|
|
|
1014 |
|
|
|
1015 |
|
|
$version = '' unless defined $version; |
1016 |
|
|
|
1017 |
|
|
|
1018 |
|
|
} |
1019 |
|
|
my $r; |
1020 |
|
|
|
1021 |
|
|
{ |
1022 |
|
|
|
1023 |
|
|
|
1024 |
|
|
$feature =~ s/^\+//; |
1025 |
|
|
|
1026 |
|
|
|
1027 |
|
|
{ |
1028 |
|
|
|
1029 |
|
|
if |
1030 |
|
|
($Message::DOM::DOMFeature::ClassInfo->{ref $self} |
1031 |
wakaba |
1.6 |
->{has_feature}->{$feature}->{$version} or |
1032 |
|
|
$Message::Util::AutoLoad::Registry::Feature |
1033 |
|
|
->{$feature}->{$version}) { |
1034 |
wakaba |
1.1 |
$r = $self; |
1035 |
|
|
} else { |
1036 |
|
|
CLASS: for my $__class (sort { |
1037 |
|
|
$Message::DOM::ClassPoint{$b} <=> $Message::DOM::ClassPoint{$a} |
1038 |
|
|
} grep { |
1039 |
|
|
$Message::DOM::DOMFeature::ClassInfo->{'Message::DOM::CharacterData::ManakaiDOMText'} |
1040 |
|
|
->{compat_class}->{$_} |
1041 |
|
|
} keys %{$Message::DOM::DOMFeature::ClassInfo->{'Message::DOM::CharacterData::ManakaiDOMText'} |
1042 |
|
|
->{compat_class} or {}}) { |
1043 |
|
|
if ($Message::DOM::DOMFeature::ClassInfo->{$__class} |
1044 |
wakaba |
1.6 |
->{has_feature}->{$feature}->{$version} or |
1045 |
|
|
$Message::Util::AutoLoad::Registry::Feature |
1046 |
|
|
->{$feature}->{$version}) { |
1047 |
wakaba |
1.1 |
|
1048 |
|
|
|
1049 |
|
|
{ |
1050 |
|
|
|
1051 |
|
|
|
1052 |
|
|
$r = ${($self->{'b'})->{${($self->{'id'})}}->{ |
1053 |
|
|
'cls' |
1054 |
|
|
}}->___create_node_ref ({ |
1055 |
|
|
|
1056 |
|
|
'id' |
1057 |
|
|
=> ($self->{'id'}), |
1058 |
|
|
|
1059 |
|
|
'b' |
1060 |
|
|
=> ($self->{'b'}), |
1061 |
|
|
}, { |
1062 |
|
|
'nrcls' => \$__class, |
1063 |
|
|
}); |
1064 |
|
|
($self->{'b'})->{${($self->{'id'})}}->{ |
1065 |
|
|
'rc' |
1066 |
|
|
}++; |
1067 |
|
|
|
1068 |
|
|
|
1069 |
|
|
} |
1070 |
|
|
|
1071 |
|
|
; |
1072 |
|
|
last CLASS; |
1073 |
|
|
} |
1074 |
|
|
} # CLASS |
1075 |
|
|
} |
1076 |
|
|
|
1077 |
|
|
|
1078 |
|
|
} |
1079 |
|
|
|
1080 |
|
|
; |
1081 |
|
|
unless (defined $r) { |
1082 |
|
|
|
1083 |
|
|
|
1084 |
|
|
{ |
1085 |
|
|
|
1086 |
|
|
local $Error::Depth = $Error::Depth + 1; |
1087 |
|
|
|
1088 |
|
|
{ |
1089 |
|
|
|
1090 |
|
|
|
1091 |
|
|
|
1092 |
|
|
$r = $self->SUPER::get_feature ($feature, $version); |
1093 |
|
|
|
1094 |
|
|
|
1095 |
|
|
|
1096 |
|
|
} |
1097 |
|
|
|
1098 |
|
|
|
1099 |
|
|
;} |
1100 |
|
|
|
1101 |
|
|
; |
1102 |
|
|
} |
1103 |
|
|
|
1104 |
|
|
|
1105 |
|
|
} |
1106 |
|
|
$r} |
1107 |
|
|
sub is_element_content_whitespace ($;$) { |
1108 |
|
|
if (@_ == 1) {my ($self) = @_; |
1109 |
|
|
my $r = 0; |
1110 |
|
|
|
1111 |
|
|
{ |
1112 |
|
|
|
1113 |
|
|
|
1114 |
|
|
{ |
1115 |
|
|
|
1116 |
|
|
|
1117 |
|
|
$r = $self->{ |
1118 |
|
|
'b' |
1119 |
|
|
}->{${$self->{ |
1120 |
|
|
'id' |
1121 |
|
|
}}} |
1122 |
|
|
->{'ecws'}; |
1123 |
|
|
|
1124 |
|
|
|
1125 |
|
|
} |
1126 |
|
|
|
1127 |
|
|
; |
1128 |
|
|
|
1129 |
|
|
|
1130 |
|
|
} |
1131 |
|
|
$r; |
1132 |
|
|
} else {my ($self, $given) = @_; |
1133 |
|
|
|
1134 |
|
|
{ |
1135 |
|
|
|
1136 |
|
|
|
1137 |
|
|
{ |
1138 |
|
|
|
1139 |
|
|
if |
1140 |
|
|
($self-> |
1141 |
|
|
manakai_read_only |
1142 |
|
|
) { |
1143 |
|
|
|
1144 |
|
|
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'; |
1145 |
|
|
|
1146 |
|
|
; |
1147 |
|
|
} |
1148 |
|
|
|
1149 |
|
|
|
1150 |
|
|
} |
1151 |
|
|
|
1152 |
|
|
; |
1153 |
|
|
|
1154 |
|
|
|
1155 |
|
|
{ |
1156 |
|
|
|
1157 |
|
|
|
1158 |
|
|
$self->{ |
1159 |
|
|
'b' |
1160 |
|
|
}->{${$self->{ |
1161 |
|
|
'id' |
1162 |
|
|
}}} |
1163 |
|
|
->{'ecws'} = $given; |
1164 |
|
|
|
1165 |
|
|
|
1166 |
|
|
} |
1167 |
|
|
|
1168 |
|
|
; |
1169 |
|
|
|
1170 |
|
|
|
1171 |
|
|
} |
1172 |
|
|
} |
1173 |
|
|
} |
1174 |
|
|
sub whole_text ($;$) { |
1175 |
|
|
if (@_ == 1) {my ($self) = @_; |
1176 |
wakaba |
1.3 |
my $r = ''; |
1177 |
|
|
|
1178 |
|
|
{ |
1179 |
|
|
|
1180 |
|
|
|
1181 |
|
|
{ |
1182 |
|
|
|
1183 |
|
|
local $Error::Depth = $Error::Depth + 1; |
1184 |
|
|
|
1185 |
|
|
{ |
1186 |
|
|
|
1187 |
|
|
|
1188 |
|
|
require |
1189 |
|
|
Message::DOM::Traversal; |
1190 |
|
|
my $doc = $self-> |
1191 |
|
|
owner_document |
1192 |
|
|
; |
1193 |
|
|
my $doctrv = $doc-> |
1194 |
|
|
get_feature |
1195 |
|
|
(Traversal => '2.0'); |
1196 |
|
|
my $tw1 = $doctrv-> |
1197 |
|
|
create_tree_walker |
1198 |
|
|
|
1199 |
|
|
($doc, |
1200 |
wakaba |
1.5 |
4294967295 |
1201 |
wakaba |
1.3 |
, sub { |
1202 |
|
|
($_[1]-> |
1203 |
|
|
node_type |
1204 |
|
|
|
1205 |
|
|
== |
1206 |
wakaba |
1.5 |
5 |
1207 |
wakaba |
1.3 |
) |
1208 |
|
|
? |
1209 |
wakaba |
1.5 |
3 |
1210 |
wakaba |
1.3 |
: |
1211 |
|
|
|
1212 |
wakaba |
1.5 |
1 |
1213 |
wakaba |
1.3 |
|
1214 |
|
|
}, |
1215 |
|
|
1 |
1216 |
|
|
); |
1217 |
|
|
$tw1-> |
1218 |
|
|
current_node |
1219 |
|
|
($self); |
1220 |
|
|
my $tw2 = $tw1->clone; |
1221 |
|
|
$r = $self-> |
1222 |
|
|
node_value |
1223 |
|
|
; |
1224 |
|
|
|
1225 |
|
|
S: while (defined (my $node = $tw1-> |
1226 |
|
|
previous_sibling |
1227 |
|
|
)) { |
1228 |
|
|
my $nt = $node-> |
1229 |
|
|
node_type |
1230 |
|
|
; |
1231 |
|
|
if ($nt == |
1232 |
wakaba |
1.5 |
3 or |
1233 |
wakaba |
1.3 |
|
1234 |
|
|
$nt == |
1235 |
wakaba |
1.5 |
4 |
1236 |
wakaba |
1.3 |
) { |
1237 |
|
|
$r = $node-> |
1238 |
|
|
node_value |
1239 |
|
|
. $r; |
1240 |
|
|
} else { |
1241 |
|
|
last S; |
1242 |
|
|
} |
1243 |
|
|
} # S |
1244 |
|
|
|
1245 |
|
|
S: while (defined (my $node = $tw2-> |
1246 |
|
|
next_sibling |
1247 |
|
|
)) { |
1248 |
|
|
my $nt = $node-> |
1249 |
|
|
node_type |
1250 |
|
|
; |
1251 |
|
|
if ($nt == |
1252 |
wakaba |
1.5 |
3 or |
1253 |
wakaba |
1.3 |
|
1254 |
|
|
$nt == |
1255 |
wakaba |
1.5 |
4 |
1256 |
wakaba |
1.3 |
) { |
1257 |
|
|
$r .= $node-> |
1258 |
|
|
node_value |
1259 |
|
|
; |
1260 |
|
|
} else { |
1261 |
|
|
last S; |
1262 |
|
|
} |
1263 |
|
|
} # S |
1264 |
|
|
|
1265 |
|
|
|
1266 |
|
|
|
1267 |
|
|
} |
1268 |
|
|
|
1269 |
|
|
|
1270 |
|
|
;} |
1271 |
|
|
|
1272 |
|
|
; |
1273 |
|
|
|
1274 |
|
|
|
1275 |
|
|
} |
1276 |
|
|
$r; |
1277 |
wakaba |
1.1 |
} else {my ($self) = @_; |
1278 |
|
|
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::CharacterData::ManakaiDOMText', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'whole_text'; |
1279 |
|
|
} |
1280 |
|
|
} |
1281 |
|
|
sub replace_whole_text ($$) { |
1282 |
|
|
my ($self, $content) = @_; |
1283 |
|
|
my $r; |
1284 |
|
|
report Message::Util::Error::DOMException::CoreException -object => $self, '-type' => 'NOT_SUPPORTED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'replace_whole_text', '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_METHOD_NOT_IMPLEMENTED', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMText'; |
1285 |
|
|
$r} |
1286 |
|
|
sub split_text ($$) { |
1287 |
|
|
my ($self, $offset) = @_; |
1288 |
|
|
my $r; |
1289 |
wakaba |
1.2 |
|
1290 |
|
|
{ |
1291 |
|
|
|
1292 |
|
|
|
1293 |
|
|
{ |
1294 |
|
|
|
1295 |
|
|
if |
1296 |
|
|
($self-> |
1297 |
|
|
manakai_read_only |
1298 |
|
|
) { |
1299 |
|
|
|
1300 |
|
|
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'; |
1301 |
|
|
|
1302 |
|
|
; |
1303 |
|
|
} |
1304 |
|
|
|
1305 |
|
|
|
1306 |
|
|
} |
1307 |
|
|
|
1308 |
|
|
; |
1309 |
|
|
my $parent = $self-> |
1310 |
|
|
parent_node |
1311 |
|
|
; |
1312 |
|
|
if (defined $parent and $parent-> |
1313 |
|
|
manakai_read_only |
1314 |
|
|
) { |
1315 |
|
|
|
1316 |
|
|
report Message::DOM::DOMCore::ManakaiDOMException -object => $self, '-type' => 'NO_MODIFICATION_ALLOWED_ERR', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#method' => 'split_text', '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_PARENT', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#class' => 'Message::DOM::CharacterData::ManakaiDOMText'; |
1317 |
|
|
|
1318 |
|
|
; |
1319 |
|
|
} |
1320 |
|
|
|
1321 |
|
|
|
1322 |
|
|
|
1323 |
|
|
{ |
1324 |
|
|
|
1325 |
|
|
local $Error::Depth = $Error::Depth + 1; |
1326 |
|
|
|
1327 |
|
|
{ |
1328 |
|
|
|
1329 |
|
|
|
1330 |
|
|
my |
1331 |
|
|
$offset32 = $self-> |
1332 |
|
|
find_offset32 |
1333 |
|
|
($offset); |
1334 |
|
|
my $data1 = $self-> |
1335 |
|
|
data |
1336 |
|
|
; |
1337 |
|
|
my $data2 = substr ($data1, $offset32); |
1338 |
|
|
substr ($data1, $offset32) = ''; |
1339 |
|
|
|
1340 |
|
|
$r = $self-> |
1341 |
|
|
node_type |
1342 |
|
|
== |
1343 |
wakaba |
1.5 |
3 |
1344 |
wakaba |
1.2 |
|
1345 |
|
|
? $self-> |
1346 |
|
|
owner_document |
1347 |
|
|
|
1348 |
|
|
-> |
1349 |
|
|
create_text_node |
1350 |
|
|
($data2) |
1351 |
|
|
: $self-> |
1352 |
|
|
owner_document |
1353 |
|
|
|
1354 |
|
|
-> |
1355 |
|
|
create_cdata_section |
1356 |
|
|
($data2); |
1357 |
|
|
$r-> |
1358 |
|
|
is_element_content_whitespace |
1359 |
|
|
|
1360 |
|
|
($self-> |
1361 |
|
|
is_element_content_whitespace |
1362 |
|
|
); |
1363 |
|
|
$self-> |
1364 |
|
|
data |
1365 |
|
|
($data1); |
1366 |
|
|
if (defined $parent) { |
1367 |
|
|
$parent-> |
1368 |
|
|
insert_before |
1369 |
|
|
|
1370 |
|
|
($r, $self-> |
1371 |
|
|
next_sibling |
1372 |
|
|
); |
1373 |
|
|
} |
1374 |
|
|
|
1375 |
|
|
|
1376 |
|
|
|
1377 |
|
|
} |
1378 |
|
|
|
1379 |
|
|
|
1380 |
|
|
;} |
1381 |
|
|
|
1382 |
|
|
; |
1383 |
|
|
|
1384 |
|
|
|
1385 |
|
|
} |
1386 |
wakaba |
1.1 |
$r} |
1387 |
|
|
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::CharacterData::ManakaiDOMText>}->{has_feature} = {'core', |
1388 |
|
|
{'', |
1389 |
|
|
'1', |
1390 |
|
|
'1.0', |
1391 |
|
|
'1', |
1392 |
|
|
'2.0', |
1393 |
|
|
'1', |
1394 |
|
|
'3.0', |
1395 |
|
|
'1'}, |
1396 |
|
|
'xml', |
1397 |
|
|
{'', |
1398 |
|
|
'1', |
1399 |
|
|
'1.0', |
1400 |
|
|
'1', |
1401 |
|
|
'2.0', |
1402 |
|
|
'1', |
1403 |
|
|
'3.0', |
1404 |
|
|
'1'}, |
1405 |
|
|
'xmlversion', |
1406 |
|
|
{'', |
1407 |
|
|
'1', |
1408 |
|
|
'1.0', |
1409 |
|
|
'1', |
1410 |
|
|
'1.1', |
1411 |
|
|
'1'}}; |
1412 |
|
|
$Message::DOM::ClassPoint{q<Message::DOM::CharacterData::ManakaiDOMText>} = 14.1; |
1413 |
|
|
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::TreeCore::ManakaiDOMText>}->{compat_class}->{q<Message::DOM::CharacterData::ManakaiDOMText>} = 1; |
1414 |
|
|
$Message::Util::Grove::ClassProp{q<Message::DOM::CharacterData::ManakaiDOMText>} = {'o0', |
1415 |
|
|
['parent'], |
1416 |
|
|
'w0', |
1417 |
|
|
['od']}; |
1418 |
|
|
package Message::DOM::IFLatest::Comment; |
1419 |
wakaba |
1.6 |
our $VERSION = 20061104.1250; |
1420 |
wakaba |
1.1 |
package Message::DOM::CharacterData::ManakaiDOMComment; |
1421 |
wakaba |
1.6 |
our $VERSION = 20061104.1250; |
1422 |
wakaba |
1.1 |
push our @ISA, 'Message::DOM::CharacterData::ManakaiDOMCharacterData', |
1423 |
|
|
'Message::DOM::IF::CharacterData', |
1424 |
|
|
'Message::DOM::IF::Comment', |
1425 |
|
|
'Message::DOM::IF::Node', |
1426 |
|
|
'Message::DOM::IFLatest::CharacterData', |
1427 |
|
|
'Message::DOM::IFLatest::Comment', |
1428 |
|
|
'Message::DOM::IFLatest::Node', |
1429 |
|
|
'Message::DOM::IFLevel1::CharacterData', |
1430 |
|
|
'Message::DOM::IFLevel1::Comment', |
1431 |
|
|
'Message::DOM::IFLevel1::Node', |
1432 |
|
|
'Message::DOM::IFLevel2::CharacterData', |
1433 |
|
|
'Message::DOM::IFLevel2::Comment', |
1434 |
|
|
'Message::DOM::IFLevel2::Node', |
1435 |
|
|
'Message::DOM::IFLevel3::CharacterData', |
1436 |
|
|
'Message::DOM::IFLevel3::Comment', |
1437 |
|
|
'Message::DOM::IFLevel3::Node'; |
1438 |
|
|
sub node_type ($;$) { |
1439 |
|
|
if (@_ == 1) {my ($self) = @_; |
1440 |
|
|
my $r; |
1441 |
wakaba |
1.5 |
$r = 8; |
1442 |
wakaba |
1.1 |
$r; |
1443 |
|
|
} else {my ($self) = @_; |
1444 |
|
|
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::CharacterData::ManakaiDOMComment', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'node_type'; |
1445 |
|
|
} |
1446 |
|
|
} |
1447 |
|
|
sub node_name ($;$) { |
1448 |
|
|
if (@_ == 1) {my ($self) = @_; |
1449 |
|
|
my $r = ''; |
1450 |
|
|
$r = '#comment'; |
1451 |
|
|
$r; |
1452 |
|
|
} else {my ($self) = @_; |
1453 |
|
|
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::CharacterData::ManakaiDOMComment', 'http://suika.fam.cx/~wakaba/archive/2004/8/4/manakai-dom-exception#attr' => 'node_name'; |
1454 |
|
|
} |
1455 |
|
|
} |
1456 |
|
|
sub get_feature ($$$) { |
1457 |
|
|
my ($self, $feature, $version) = @_; |
1458 |
|
|
|
1459 |
|
|
{ |
1460 |
|
|
|
1461 |
|
|
|
1462 |
|
|
$feature = lc $feature; |
1463 |
|
|
|
1464 |
|
|
|
1465 |
|
|
} |
1466 |
|
|
|
1467 |
|
|
{ |
1468 |
|
|
|
1469 |
|
|
|
1470 |
|
|
$version = '' unless defined $version; |
1471 |
|
|
|
1472 |
|
|
|
1473 |
|
|
} |
1474 |
|
|
my $r; |
1475 |
|
|
|
1476 |
|
|
{ |
1477 |
|
|
|
1478 |
|
|
|
1479 |
|
|
$feature =~ s/^\+//; |
1480 |
|
|
|
1481 |
|
|
|
1482 |
|
|
{ |
1483 |
|
|
|
1484 |
|
|
if |
1485 |
|
|
($Message::DOM::DOMFeature::ClassInfo->{ref $self} |
1486 |
wakaba |
1.6 |
->{has_feature}->{$feature}->{$version} or |
1487 |
|
|
$Message::Util::AutoLoad::Registry::Feature |
1488 |
|
|
->{$feature}->{$version}) { |
1489 |
wakaba |
1.1 |
$r = $self; |
1490 |
|
|
} else { |
1491 |
|
|
CLASS: for my $__class (sort { |
1492 |
|
|
$Message::DOM::ClassPoint{$b} <=> $Message::DOM::ClassPoint{$a} |
1493 |
|
|
} grep { |
1494 |
|
|
$Message::DOM::DOMFeature::ClassInfo->{'Message::DOM::CharacterData::ManakaiDOMComment'} |
1495 |
|
|
->{compat_class}->{$_} |
1496 |
|
|
} keys %{$Message::DOM::DOMFeature::ClassInfo->{'Message::DOM::CharacterData::ManakaiDOMComment'} |
1497 |
|
|
->{compat_class} or {}}) { |
1498 |
|
|
if ($Message::DOM::DOMFeature::ClassInfo->{$__class} |
1499 |
wakaba |
1.6 |
->{has_feature}->{$feature}->{$version} or |
1500 |
|
|
$Message::Util::AutoLoad::Registry::Feature |
1501 |
|
|
->{$feature}->{$version}) { |
1502 |
wakaba |
1.1 |
|
1503 |
|
|
|
1504 |
|
|
{ |
1505 |
|
|
|
1506 |
|
|
|
1507 |
|
|
$r = ${($self->{'b'})->{${($self->{'id'})}}->{ |
1508 |
|
|
'cls' |
1509 |
|
|
}}->___create_node_ref ({ |
1510 |
|
|
|
1511 |
|
|
'id' |
1512 |
|
|
=> ($self->{'id'}), |
1513 |
|
|
|
1514 |
|
|
'b' |
1515 |
|
|
=> ($self->{'b'}), |
1516 |
|
|
}, { |
1517 |
|
|
'nrcls' => \$__class, |
1518 |
|
|
}); |
1519 |
|
|
($self->{'b'})->{${($self->{'id'})}}->{ |
1520 |
|
|
'rc' |
1521 |
|
|
}++; |
1522 |
|
|
|
1523 |
|
|
|
1524 |
|
|
} |
1525 |
|
|
|
1526 |
|
|
; |
1527 |
|
|
last CLASS; |
1528 |
|
|
} |
1529 |
|
|
} # CLASS |
1530 |
|
|
} |
1531 |
|
|
|
1532 |
|
|
|
1533 |
|
|
} |
1534 |
|
|
|
1535 |
|
|
; |
1536 |
|
|
unless (defined $r) { |
1537 |
|
|
|
1538 |
|
|
|
1539 |
|
|
{ |
1540 |
|
|
|
1541 |
|
|
local $Error::Depth = $Error::Depth + 1; |
1542 |
|
|
|
1543 |
|
|
{ |
1544 |
|
|
|
1545 |
|
|
|
1546 |
|
|
|
1547 |
|
|
$r = $self->SUPER::get_feature ($feature, $version); |
1548 |
|
|
|
1549 |
|
|
|
1550 |
|
|
|
1551 |
|
|
} |
1552 |
|
|
|
1553 |
|
|
|
1554 |
|
|
;} |
1555 |
|
|
|
1556 |
|
|
; |
1557 |
|
|
} |
1558 |
|
|
|
1559 |
|
|
|
1560 |
|
|
} |
1561 |
|
|
$r} |
1562 |
|
|
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::CharacterData::ManakaiDOMComment>}->{has_feature} = {'core', |
1563 |
|
|
{'', |
1564 |
|
|
'1', |
1565 |
|
|
'1.0', |
1566 |
|
|
'1', |
1567 |
|
|
'2.0', |
1568 |
|
|
'1', |
1569 |
|
|
'3.0', |
1570 |
|
|
'1'}, |
1571 |
|
|
'xml', |
1572 |
|
|
{'', |
1573 |
|
|
'1', |
1574 |
|
|
'1.0', |
1575 |
|
|
'1', |
1576 |
|
|
'2.0', |
1577 |
|
|
'1', |
1578 |
|
|
'3.0', |
1579 |
|
|
'1'}, |
1580 |
|
|
'xmlversion', |
1581 |
|
|
{'', |
1582 |
|
|
'1', |
1583 |
|
|
'1.0', |
1584 |
|
|
'1', |
1585 |
|
|
'1.1', |
1586 |
|
|
'1'}}; |
1587 |
|
|
$Message::DOM::ClassPoint{q<Message::DOM::CharacterData::ManakaiDOMComment>} = 14.1; |
1588 |
|
|
$Message::DOM::DOMFeature::ClassInfo->{q<Message::DOM::TreeCore::ManakaiDOMComment>}->{compat_class}->{q<Message::DOM::CharacterData::ManakaiDOMComment>} = 1; |
1589 |
|
|
$Message::Util::Grove::ClassProp{q<Message::DOM::CharacterData::ManakaiDOMComment>} = {'o0', |
1590 |
|
|
['parent'], |
1591 |
|
|
'w0', |
1592 |
|
|
['od']}; |
1593 |
|
|
package Message::DOM::IFLatest::StringExtended; |
1594 |
wakaba |
1.6 |
our $VERSION = 20061104.1250; |
1595 |
wakaba |
1.1 |
for ($Message::DOM::IF::CharacterData::, $Message::DOM::IF::Comment::, $Message::DOM::IF::Node::, $Message::DOM::IF::Text::, $Message::DOM::IFLatest::Node::, $Message::DOM::IFLevel1::CharacterData::, $Message::DOM::IFLevel1::Comment::, $Message::DOM::IFLevel1::Node::, $Message::DOM::IFLevel1::Text::, $Message::DOM::IFLevel2::CharacterData::, $Message::DOM::IFLevel2::Comment::, $Message::DOM::IFLevel2::Node::, $Message::DOM::IFLevel2::Text::, $Message::DOM::IFLevel3::CharacterData::, $Message::DOM::IFLevel3::Comment::, $Message::DOM::IFLevel3::Node::, $Message::DOM::IFLevel3::Text::){} |
1596 |
|
|
## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL> |
1597 |
|
|
1; |