/[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.13 - (hide annotations) (download)
Sat Jul 14 09:19:11 2007 UTC (17 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.12: +23 -2 lines
++ manakai/t/ChangeLog	14 Jul 2007 09:19:01 -0000
	* DOM-Node.t: Test data for new constants and attributes
	are added.

	* DOM-TypeInfo.t: Tests for constants are added.

2007-07-14  Wakaba  <wakaba@suika.fam.cx>

++ manakai/lib/Message/DOM/ChangeLog	14 Jul 2007 09:17:51 -0000
	* AttributeDefinition.pm (node_value): Implemented.
	(create_attribute_definition): Implemented.

	* DOMConfiguration.pm (%{}, TIEHASH,
	get_parameter, set_parameter, can_set_parameter,
	EXISTS, DELETE, parameter_names, FETCH, STORE,
	FIRSTKEY, LASTKEY): Implemented.

	* DOMDocument.pm (____new): Set |error-handler| default.
	(get_elements_by_tag_name, get_elements_by_tag_name_ns): Implemented.

	* DOMElement.pm (get_elements_by_tag_name, get_elements_by_tag_name_ns):
	Implemented.

	* DOMException.pm: Error types for |DOMConfiguration|
	are added.

	* DOMStringList.pm (Message::DOM::DOMStringList::StaticList): New
	class.

	* DocumentType.pm (get_element_type_definition_node,
	get_general_entity_node, get_notation_node,
	set_element_type_definition_node, set_general_entity_node,
	set_notation_node, create_document_type_definition): Implemented.

	* ElementTypeDefinition.pm (get_attribute_definition_node,
	set_attribute_definition_node, create_element_type_definition):
	Implemented.

	* Entity.pm (create_general_entity): Implemented.

	* Node.pm: Constants in |OperationType| definition
	group are added.
	(manakai_language): Implemented.

	* NodeList.pm (Message::DOM::NodeList::GetElementsList): New
	class.

	* Notation.pm (create_notation): Implemented.

2007-07-14  Wakaba  <wakaba@suika.fam.cx>

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 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24