/[suikacvs]/messaging/manakai/lib/Message/DOM/DOMException.pm
Suika

Contents of /messaging/manakai/lib/Message/DOM/DOMException.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sun Jul 8 05:42:37 2007 UTC (17 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.8: +28 -7 lines
++ manakai/t/ChangeLog	8 Jul 2007 05:42:31 -0000
2007-07-08  Wakaba  <wakaba@suika.fam.cx>

	* DOM-Document.t, DOM-Node.t, DOM-NodeList.t: Some tests are modified so
	that no |WRONG_DOCUMENT_ERR| is raised.

	* DOM-Node.t: Tests for |remove_child| are added.

++ manakai/lib/Message/DOM/ChangeLog	8 Jul 2007 05:41:27 -0000
2007-07-08  Wakaba  <wakaba@suika.fam.cx>

	* Attr.pm, AttributeDefinition.pm, DOMCharacterData.pm,
	DOMDocument.pm, DocumentType.pm, ElementTypeDefinition.pm,
	Node.pm, Notation.pm, ProcessingInstruction.pm (append_child,
	insert_before, replace_child): Implemented.

	* DOMException.pm (HIERARCHY_REQUEST_ERR, NOT_FOUND_ERR): Implemented.

	* Node.pm (remove_child): Implemented.

1 package Message::DOM::DOMException;
2 use strict;
3 our $VERSION=do{my @r=(q$Revision: 1.8 $=~/\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 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 WRONG_DOCUMENT_ERR => {
20 -code => 4,
21 -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 },
29 },
30 INVALID_CHARACTER_ERR => {
31 -code => 5,
32 -subtype => {
33 MALFORMED_NAME_ERR => {
34 -description => q(Not a legal XML |Name|),
35 },
36 },
37 },
38 NO_MODIFICATION_ALLOWED_ERR => {
39 -code => 7,
40 -subtype => {
41 READ_ONLY_NODE_ERR => {
42 -description => q(Can't modify read-only node),
43 },
44 READ_ONLY_NODE_LIST_ERR => {
45 -description => q(Can't modify read-only node list),
46 },
47 },
48 },
49 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 NOT_SUPPORTED_ERR => {
58 -code => 9,
59 -subtype => {
60 ADOPT_NODE_TYPE_NOT_SUPPORTED_ERR => {
61 -description => q(Can't adopt specified type of node),
62 },
63 CLONE_NODE_TYPE_NOT_SUPPORTED_ERR => {
64 -description => q(Can't clone specified type of node),
65 },
66 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 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 QNAME_NULLNS_ERR => {
91 -description => q(Qualified name is not specified),
92 },
93 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 }} # ___error_def
105
106 package Message::IF::DOMException;
107 push our @ISA, 'Message::Util::Error';
108
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 ## $Date: 2007/07/07 12:26:09 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24