4 |
push our @ISA, 'Message::DOM::Node', 'Message::IF::AttributeDefinition'; |
push our @ISA, 'Message::DOM::Node', 'Message::IF::AttributeDefinition'; |
5 |
require Message::DOM::Node; |
require Message::DOM::Node; |
6 |
|
|
|
## Spec: |
|
|
## <http://suika.fam.cx/gate/2005/sw/AttributeDefinition> |
|
|
|
|
7 |
sub ____new ($$$) { |
sub ____new ($$$) { |
8 |
my $self = shift->SUPER::____new (shift); |
my $self = shift->SUPER::____new (shift); |
9 |
$$self->{node_name} = $_[0]; |
$$self->{node_name} = $_[0]; |
50 |
} |
} |
51 |
} # AUTOLOAD |
} # AUTOLOAD |
52 |
|
|
53 |
|
## |AttributeDefinition| constants |
54 |
|
|
55 |
|
## |DeclaredValueType| |
56 |
|
sub NO_TYPE_ATTR () { 0 } |
57 |
|
sub CDATA_ATTR () { 1 } |
58 |
|
sub ID_ATTR () { 2 } |
59 |
|
sub IDREF_ATTR () { 3 } |
60 |
|
sub IDREFS_ATTR () { 4 } |
61 |
|
sub ENTITY_ATTR () { 5 } |
62 |
|
sub ENTITIES_ATTR () { 6 } |
63 |
|
sub NMTOKEN_ATTR () { 7 } |
64 |
|
sub NMTOKENS_ATTR () { 8 } |
65 |
|
sub NOTATION_ATTR () { 9 } |
66 |
|
sub ENUMERATION_ATTR () { 10 } |
67 |
|
sub UNKNOWN_ATTR () { 11 } |
68 |
|
|
69 |
|
## |DefaultValueType| |
70 |
|
sub UNKNOWN_DEFAULT () { 0 } |
71 |
|
sub FIXED_DEFAULT () { 1 } |
72 |
|
sub REQUIRED_DEFAULT () { 2 } |
73 |
|
sub IMPLIED_DEFAULT () { 3 } |
74 |
|
sub EXPLICIT_DEFAULT () { 4 } |
75 |
|
|
76 |
## The |Node| interface - attribute |
## The |Node| interface - attribute |
77 |
|
|
78 |
## Spec: |
## Spec: |
91 |
|
|
92 |
## TODO: node_value |
## TODO: node_value |
93 |
|
|
94 |
|
## |AttributeDefinition| attributes |
95 |
|
|
96 |
|
sub declared_type ($;$) { |
97 |
|
my $self = $_[0]; |
98 |
|
if (@_ > 1) { |
99 |
|
if (${$$self->{owner_document}}->{strict_error_checking}) { |
100 |
|
if ($$self->{manakai_read_only}) { |
101 |
|
report Message::DOM::DOMException |
102 |
|
-object => $self, |
103 |
|
-type => 'NO_MODIFICATION_ALLOWED_ERR', |
104 |
|
-subtype => 'READ_ONLY_NODE_ERR'; |
105 |
|
} |
106 |
|
} |
107 |
|
if ($_[1]) { |
108 |
|
$$self->{declared_type} = 0+$_[1]; |
109 |
|
} else { |
110 |
|
delete $$self->{declared_type}; |
111 |
|
} |
112 |
|
} |
113 |
|
|
114 |
|
return $$self->{declared_type} || 0; |
115 |
|
} # declared_type |
116 |
|
|
117 |
|
sub default_type ($;$) { |
118 |
|
my $self = $_[0]; |
119 |
|
if (@_ > 1) { |
120 |
|
if (${$$self->{owner_document}}->{strict_error_checking}) { |
121 |
|
if ($$self->{manakai_read_only}) { |
122 |
|
report Message::DOM::DOMException |
123 |
|
-object => $self, |
124 |
|
-type => 'NO_MODIFICATION_ALLOWED_ERR', |
125 |
|
-subtype => 'READ_ONLY_NODE_ERR'; |
126 |
|
} |
127 |
|
} |
128 |
|
if ($_[1]) { |
129 |
|
$$self->{default_type} = 0+$_[1]; |
130 |
|
} else { |
131 |
|
delete $$self->{default_type}; |
132 |
|
} |
133 |
|
} |
134 |
|
|
135 |
|
return $$self->{default_type} || 0; |
136 |
|
} # default_type |
137 |
|
|
138 |
package Message::IF::AttributeDefinition; |
package Message::IF::AttributeDefinition; |
139 |
|
|
140 |
package Message::DOM::Document; |
package Message::DOM::Document; |