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