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