30 |
|
|
31 |
my %names = ( |
my %names = ( |
32 |
'error-handler' => 1, |
'error-handler' => 1, |
33 |
|
'schema-type' => 1, |
34 |
q<http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree> => 1, |
35 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
36 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
37 |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
38 |
|
q<http://suika.fam.cx/www/2006/dom-config/xml-id> => 1, |
39 |
); |
); |
|
## http://suika.fam.cx/www/2006/dom-config/xml-id |
|
|
## xml-dtd |
|
40 |
|
|
41 |
sub parameter_names ($) { |
sub parameter_names ($) { |
42 |
require Message::DOM::DOMStringList; |
require Message::DOM::DOMStringList; |
49 |
sub can_set_parameter ($$;$) { |
sub can_set_parameter ($$;$) { |
50 |
my $name = ''.$_[1]; |
my $name = ''.$_[1]; |
51 |
if ({ |
if ({ |
52 |
|
'schema-type' => 1, |
53 |
q<http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree> => 1, |
54 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
55 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
56 |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
57 |
|
q<http://suika.fam.cx/www/2006/dom-config/xml-id> => 1, |
58 |
}->{$name}) { |
}->{$name}) { |
59 |
return 1; |
return 1; |
60 |
} elsif ($name eq 'error-handler') { |
} elsif ($name eq 'error-handler') { |
68 |
sub get_parameter ($$) { |
sub get_parameter ($$) { |
69 |
my $name = ''.$_[1]; |
my $name = ''.$_[1]; |
70 |
if ({ |
if ({ |
71 |
|
'schema-type' => 1, |
72 |
q<http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree> => 1, |
73 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
74 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
75 |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
76 |
|
q<http://suika.fam.cx/www/2006/dom-config/xml-id> => 1, |
77 |
'error-handler' => 1, |
'error-handler' => 1, |
78 |
}->{$name}) { |
}->{$name}) { |
79 |
return ${$${$_[0]}}->{$name}; |
return ${$${$_[0]}}->{$name}; |
96 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
97 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
98 |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
99 |
|
q<http://suika.fam.cx/www/2006/dom-config/xml-id> => 1, |
100 |
}->{$name}) { |
}->{$name}) { |
101 |
if ($_[2]) { |
if ($_[2]) { |
102 |
${$${$_[0]}}->{$name} = 1; |
${$${$_[0]}}->{$name} = 1; |
112 |
-type => 'TYPE_MISMATCH_ERR', |
-type => 'TYPE_MISMATCH_ERR', |
113 |
-subtype => 'CONFIGURATION_PARAMETER_TYPE_ERR'; |
-subtype => 'CONFIGURATION_PARAMETER_TYPE_ERR'; |
114 |
} |
} |
115 |
|
} elsif ($name eq 'schema-type') { |
116 |
|
${$${$_[0]}}->{$name} = ''.$_[2]; |
117 |
} else { |
} else { |
118 |
report Message::DOM::DOMException |
report Message::DOM::DOMException |
119 |
-object => $_[0], |
-object => $_[0], |
120 |
-type => 'NOT_FOUND_ERR', |
-type => 'NOT_FOUND_ERR', |
121 |
-subtype => 'UNRECOGNIZED_CONFIGURATION_PARAMETER_ERR'; |
-subtype => 'UNRECOGNIZED_CONFIGURATION_PARAMETER_ERR'; |
122 |
} |
} |
123 |
} else { |
} else { # reset |
124 |
if ({ |
if ({ |
125 |
q<http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree> => 1, |
126 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-attribute-type> => 1, |
127 |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute> => 1, |
128 |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
q<http://suika.fam.cx/www/2006/dom-config/strict-document-children> => 1, |
129 |
|
q<http://suika.fam.cx/www/2006/dom-config/xml-id> => 1, |
130 |
}->{$name}) { |
}->{$name}) { |
131 |
${$${$_[0]}}->{$name} = 1; |
${$${$_[0]}}->{$name} = 1; |
132 |
|
} elsif ({ |
133 |
|
'schema-type' => 1, |
134 |
|
}->{$name}) { |
135 |
|
delete ${$${$_[0]}}->{$name}; |
136 |
} elsif ($_[1] eq 'error-handler') { |
} elsif ($_[1] eq 'error-handler') { |
137 |
${$${$_[0]}}->{$name} = sub ($) { |
${$${$_[0]}}->{$name} = sub ($) { |
138 |
## NOTE: Same as one set by |Document| constructor. |
## NOTE: Same as one set by |Document| constructor. |