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

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

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

revision 1.4 by wakaba, Sat Jun 16 15:27:45 2007 UTC revision 1.5 by wakaba, Sun Jun 17 13:37:40 2007 UTC
# Line 37  sub AUTOLOAD { Line 37  sub AUTOLOAD {
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 };
# Line 50  sub AUTOLOAD { Line 61  sub 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;
# Line 64  sub node_name ($); # read-only trivial a Line 73  sub node_name ($); # read-only trivial a
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    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24