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

Contents of /messaging/manakai/lib/Message/DOM/CharacterData.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Sun Jul 29 08:18:35 2007 UTC (17 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.16: +0 -0 lines
FILE REMOVED
++ ChangeLog	29 Jul 2007 08:07:03 -0000
	* .htaccess: New file.

2007-07-29  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/Message/DOM/ChangeLog	29 Jul 2007 08:18:17 -0000
	* DOMString.dis, DOMString.pm, Document.dis, Document.pm,
	Element.dis, Element.pm, CharacterData.dis, CharacterData.pm,
	TreeCore.dis, TreeCore.pm, DOMCore.dis, DOMCore.pm,
	DOMFeature.dis, DOMFeature.pm, XML.dis, XML.pm,
	DOMMain.dis, DOMMain.pm, DOMLS.dis,
	GenericLS.dis, GenericLS.pm, SimpleLS.dis: Removed.

	* Makefile: Rules for DIS are removed.

2007-07-29  Wakaba  <wakaba@suika.fam.cx>

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24