| 1 |
wakaba |
1.1 |
package Message::DOM::DOMException; |
| 2 |
|
|
use strict; |
| 3 |
wakaba |
1.13 |
our $VERSION=do{my @r=(q$Revision: 1.12 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
| 4 |
wakaba |
1.1 |
push our @ISA, 'Message::Util::Error', 'Message::IF::DOMException'; |
| 5 |
|
|
require Message::Util::Error; |
| 6 |
|
|
|
| 7 |
|
|
sub ___error_def () {+{ |
| 8 |
wakaba |
1.11 |
INDEX_SIZE_ERR => { |
| 9 |
|
|
-code => 1, |
| 10 |
|
|
-subtype => { |
| 11 |
|
|
INDEX_OUT_OF_BOUND_ERR => { |
| 12 |
wakaba |
1.12 |
-description => q(Specified index is outside of the bounds), |
| 13 |
wakaba |
1.11 |
}, |
| 14 |
|
|
}, |
| 15 |
|
|
}, |
| 16 |
wakaba |
1.13 |
# DOMSTRING_SIZE_ERR == 2 |
| 17 |
wakaba |
1.9 |
HIERARCHY_REQUEST_ERR => { |
| 18 |
|
|
-code => 3, |
| 19 |
|
|
-subtype => { |
| 20 |
|
|
ANCESTOR_NODE_ERR => { |
| 21 |
|
|
-description => q(Specified node is an ancestor of the node or the node itself), |
| 22 |
|
|
}, |
| 23 |
|
|
CHILD_NODE_TYPE_ERR => { |
| 24 |
|
|
-description => q(This type of node cannot be inserted to this point), |
| 25 |
|
|
}, |
| 26 |
wakaba |
1.10 |
INUSE_DEFINITION_ERR => { |
| 27 |
|
|
-description => q(The node is already in use), |
| 28 |
|
|
}, |
| 29 |
wakaba |
1.9 |
}, |
| 30 |
|
|
}, |
| 31 |
wakaba |
1.4 |
WRONG_DOCUMENT_ERR => { |
| 32 |
|
|
-code => 4, |
| 33 |
wakaba |
1.9 |
-subtype => { |
| 34 |
|
|
EXTERNAL_OBJECT_ERR => { |
| 35 |
|
|
-description => q(Can't insert into different document), |
| 36 |
|
|
}, |
| 37 |
|
|
INUSE_DOCTYPE_ERR => { |
| 38 |
|
|
-description => q(Document type is already in use), |
| 39 |
|
|
}, |
| 40 |
wakaba |
1.8 |
}, |
| 41 |
wakaba |
1.4 |
}, |
| 42 |
wakaba |
1.7 |
INVALID_CHARACTER_ERR => { |
| 43 |
|
|
-code => 5, |
| 44 |
|
|
-subtype => { |
| 45 |
|
|
MALFORMED_NAME_ERR => { |
| 46 |
|
|
-description => q(Not a legal XML |Name|), |
| 47 |
|
|
}, |
| 48 |
|
|
}, |
| 49 |
|
|
}, |
| 50 |
wakaba |
1.13 |
# NO_DATA_ALLOWED_ERR == 6 |
| 51 |
wakaba |
1.1 |
NO_MODIFICATION_ALLOWED_ERR => { |
| 52 |
|
|
-code => 7, |
| 53 |
|
|
-subtype => { |
| 54 |
wakaba |
1.3 |
READ_ONLY_NODE_ERR => { |
| 55 |
|
|
-description => q(Can't modify read-only node), |
| 56 |
|
|
}, |
| 57 |
wakaba |
1.1 |
READ_ONLY_NODE_LIST_ERR => { |
| 58 |
|
|
-description => q(Can't modify read-only node list), |
| 59 |
|
|
}, |
| 60 |
|
|
}, |
| 61 |
|
|
}, |
| 62 |
wakaba |
1.9 |
NOT_FOUND_ERR => { |
| 63 |
|
|
-code => 8, |
| 64 |
|
|
-subtype => { |
| 65 |
|
|
NOT_CHILD_ERR => { |
| 66 |
|
|
-description => q(Not a child of this node), |
| 67 |
|
|
}, |
| 68 |
wakaba |
1.13 |
UNRECOGNIZED_CONFIGURATION_PARAMETER_ERR => { |
| 69 |
|
|
-description => q(Unrecognized configuration parameter is specified), |
| 70 |
|
|
}, |
| 71 |
wakaba |
1.9 |
}, |
| 72 |
|
|
}, |
| 73 |
wakaba |
1.4 |
NOT_SUPPORTED_ERR => { |
| 74 |
|
|
-code => 9, |
| 75 |
|
|
-subtype => { |
| 76 |
wakaba |
1.6 |
ADOPT_NODE_TYPE_NOT_SUPPORTED_ERR => { |
| 77 |
|
|
-description => q(Can't adopt specified type of node), |
| 78 |
|
|
}, |
| 79 |
wakaba |
1.5 |
CLONE_NODE_TYPE_NOT_SUPPORTED_ERR => { |
| 80 |
|
|
-description => q(Can't clone specified type of node), |
| 81 |
|
|
}, |
| 82 |
wakaba |
1.13 |
CONFIGURATION_PARAMETER_VALUE_ERR => { ## TODO: Necessary? |
| 83 |
|
|
-description => q(Can't set the value to the configuration parameter), |
| 84 |
|
|
}, |
| 85 |
wakaba |
1.4 |
NON_HTML_OPERATION_ERR => { |
| 86 |
|
|
-description => q(Can't apply to HTML document), |
| 87 |
|
|
}, |
| 88 |
|
|
UNKNOWN_XML_VERSION_ERR => { |
| 89 |
|
|
-description => q(Specified version of XML is not supported), |
| 90 |
|
|
}, |
| 91 |
|
|
}, |
| 92 |
|
|
}, |
| 93 |
|
|
INUSE_ATTRIBUTE_ERR => { |
| 94 |
|
|
-code => 10, |
| 95 |
|
|
-description => q(Attribute is already in use), |
| 96 |
|
|
}, |
| 97 |
wakaba |
1.13 |
# INVALID_STATE_ERR == 11 |
| 98 |
|
|
# SYNTAX_ERR == 12 |
| 99 |
|
|
# INVALID_MODIFICATION_ERR == 13 |
| 100 |
wakaba |
1.7 |
NAMESPACE_ERR => { |
| 101 |
|
|
-code => 14, |
| 102 |
|
|
-subtype => { |
| 103 |
|
|
MALFORMED_QNAME_ERR => { |
| 104 |
|
|
-description => q(Malformed XML qualified name), |
| 105 |
|
|
}, |
| 106 |
|
|
NONXMLNSPREFIX_XMLNSNS_ERR => { |
| 107 |
|
|
-description => q(Namespace prefix "xmlns" must be used for namespace URI <http://www.w3.org/2000/xmlns/>), |
| 108 |
|
|
}, |
| 109 |
|
|
PREFIXED_NULLNS_ERR => { |
| 110 |
|
|
-description => q(A namespace prefix is specified while namespace URI is null), |
| 111 |
|
|
}, |
| 112 |
wakaba |
1.8 |
QNAME_NULLNS_ERR => { |
| 113 |
|
|
-description => q(Qualified name is not specified), |
| 114 |
|
|
}, |
| 115 |
wakaba |
1.7 |
XMLNS_NONXMLNSNS_ERR => { |
| 116 |
|
|
-description => q(Qualified name "xmlns" can only be used with namespace URI <http://www.w3.org/2000/xmlns/>), |
| 117 |
|
|
}, |
| 118 |
|
|
XMLNSPREFIX_NONXMLNSNS_ERR => { |
| 119 |
|
|
-description => q(Namespace prefix "xmlns" cannot be used for namespace URI other than <http://www.w3.org/2000/xmlns/>), |
| 120 |
|
|
}, |
| 121 |
|
|
XMLPREFIX_NONXMLNS_ERR => { |
| 122 |
|
|
-description => q(Namespace prefix "xml" cannot be used for namespace URI other than <http://www.w3.org/XML/1998/namespace>), |
| 123 |
|
|
}, |
| 124 |
|
|
}, |
| 125 |
|
|
}, |
| 126 |
wakaba |
1.13 |
# INVALID_ACCESS_ERR == 15 |
| 127 |
|
|
# VALIDATION_ERR == 16 |
| 128 |
|
|
TYPE_MISMATCH_ERR => { |
| 129 |
|
|
-code => 17, |
| 130 |
|
|
-subtype => { |
| 131 |
|
|
CONFIGURATION_PARAMETER_TYPE_ERR => { |
| 132 |
|
|
-description => q(The value type for this configuration parameter is incompatible with the specified value), |
| 133 |
|
|
}, |
| 134 |
|
|
}, |
| 135 |
|
|
}, |
| 136 |
wakaba |
1.1 |
}} # ___error_def |
| 137 |
|
|
|
| 138 |
|
|
package Message::IF::DOMException; |
| 139 |
wakaba |
1.2 |
push our @ISA, 'Message::Util::Error'; |
| 140 |
wakaba |
1.1 |
|
| 141 |
|
|
## DOM1 |
| 142 |
|
|
sub INDEX_SIZE_ERR () { 1 } |
| 143 |
|
|
sub DOMSTRING_SIZE_ERR () { 2 } |
| 144 |
|
|
sub HIERARCHY_REQUEST_ERR () { 3 } |
| 145 |
|
|
sub WRONG_DOCUMENT_ERR () { 4 } |
| 146 |
|
|
sub INVALID_CHARACTER_ERR () { 5 } |
| 147 |
|
|
sub NO_DATA_ALLOWED_ERR () { 6 } |
| 148 |
|
|
sub NO_MODIFICATION_ALLOWED_ERR () { 7 } |
| 149 |
|
|
sub NOT_FOUND_ERR () { 8 } |
| 150 |
|
|
sub NOT_SUPPORTED_ERR () { 9 } |
| 151 |
|
|
sub INUSE_ATTRIBUTE_ERR () { 10 } |
| 152 |
|
|
## DOM2 |
| 153 |
|
|
sub INVALID_STATE_ERR () { 11 } |
| 154 |
|
|
sub SYNTAX_ERR () { 12 } |
| 155 |
|
|
sub INVALID_MODIFICATION_ERR () { 13 } |
| 156 |
|
|
sub NAMESPACE_ERR () { 14 } |
| 157 |
|
|
sub INVALID_ACCESS_ERR () { 15 } |
| 158 |
|
|
## DOM3 |
| 159 |
|
|
sub VALIDATION_ERR () { 16 } |
| 160 |
|
|
sub TYPE_MISMATCH_ERR () { 17 } |
| 161 |
|
|
|
| 162 |
|
|
=head1 LICENSE |
| 163 |
|
|
|
| 164 |
|
|
Copyright 2007 Wakaba <w@suika.fam.cx> |
| 165 |
|
|
|
| 166 |
|
|
This program is free software; you can redistribute it and/or |
| 167 |
|
|
modify it under the same terms as Perl itself. |
| 168 |
|
|
|
| 169 |
|
|
=cut |
| 170 |
|
|
|
| 171 |
|
|
1; |
| 172 |
wakaba |
1.13 |
## $Date: 2007/07/08 11:28:45 $ |