37 |
}->{$method_name}) { |
}->{$method_name}) { |
38 |
no strict 'refs'; |
no strict 'refs'; |
39 |
eval qq{ |
eval qq{ |
40 |
sub $method_name (\$) { |
sub $method_name (\$;\$) { |
41 |
if (\@_ > 1) { |
if (\@_ > 1) { |
42 |
\${\$_[0]}->{$method_name} = ''.$_[1]; |
if (\${\$_[0]}->{strict_error_checking} and |
43 |
|
\${\$_[0]}->{manakai_read_only}) { |
44 |
|
report Message::DOM::DOMException |
45 |
|
-object => \$_[0], |
46 |
|
-type => 'NO_MODIFICATION_ALLOWED_ERR', |
47 |
|
-subtype => 'READ_ONLY_NODE_ERR'; |
48 |
|
} |
49 |
|
if (defined \$_[1]) { |
50 |
|
\${\$_[0]}->{$method_name} = ''.\$_[1]; |
51 |
|
} else { |
52 |
|
delete \${\$_[0]}->{$method_name}; |
53 |
|
} |
54 |
} |
} |
55 |
return \${\$_[0]}->{$method_name}; |
return \${\$_[0]}->{$method_name}; |
56 |
} |
} |
57 |
}; |
}; |
58 |
goto &{ $AUTOLOAD }; |
goto &{ $AUTOLOAD }; |
61 |
Carp::croak (qq<Can't locate method "$AUTOLOAD">); |
Carp::croak (qq<Can't locate method "$AUTOLOAD">); |
62 |
} |
} |
63 |
} # AUTOLOAD |
} # AUTOLOAD |
|
sub public_id ($;$); |
|
|
sub system_id ($;$); |
|
64 |
|
|
65 |
## The |Node| interface - attribute |
## |Node| attributes |
66 |
|
|
67 |
sub child_nodes ($) { |
sub child_nodes ($) { |
68 |
require Message::DOM::NodeList; |
require Message::DOM::NodeList; |
73 |
|
|
74 |
sub node_type () { 12 } # NOTATION_NODE |
sub node_type () { 12 } # NOTATION_NODE |
75 |
|
|
76 |
sub text_content ($;$) { undef } |
sub text_content () { undef } |
77 |
|
|
78 |
|
## |Node| methods |
79 |
|
|
80 |
|
sub manakai_append_text () { } |
81 |
|
|
82 |
|
## |Notation| attributes |
83 |
|
|
84 |
|
sub manakai_declaration_base_uri ($;$) { |
85 |
|
## NOTE: Same as |Notation|'s. |
86 |
|
|
87 |
|
if (@_ > 1) { |
88 |
|
if (${${$_[0]}->{owner_document}}->{strict_error_checking} and |
89 |
|
${$_[0]}->{manakai_read_only}) { |
90 |
|
report Message::DOM::DOMException |
91 |
|
-object => $_[0], |
92 |
|
-type => 'NO_MODIFICATION_ALLOWED_ERR', |
93 |
|
-subtype => 'READ_ONLY_NODE_ERR'; |
94 |
|
} |
95 |
|
if (defined $_[1]) { |
96 |
|
${$_[0]}->{manakai_declaration_base_uri} = ''.$_[1]; |
97 |
|
} else { |
98 |
|
delete ${$_[0]}->{manakai_declaration_base_uri}; |
99 |
|
} |
100 |
|
} |
101 |
|
|
102 |
|
if (defined wantarray) { |
103 |
|
if (defined ${$_[0]}->{manakai_declaration_base_uri}) { |
104 |
|
return ${$_[0]}->{manakai_declaration_base_uri}; |
105 |
|
} else { |
106 |
|
local $Error::Depth = $Error::Depth + 1; |
107 |
|
return $_[0]->base_uri; |
108 |
|
} |
109 |
|
} |
110 |
|
} # manakai_declaration_base_uri |
111 |
|
|
112 |
|
## NOTE: Setter is a manakai extension. |
113 |
|
sub public_id ($;$); |
114 |
|
|
115 |
|
## NOTE: Setter is a manakai extension. |
116 |
|
sub system_id ($;$); |
117 |
|
|
118 |
package Message::IF::Notation; |
package Message::IF::Notation; |
119 |
|
|