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