/[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.14 - (hide annotations) (download)
Sat Jul 14 16:32:28 2007 UTC (17 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.13: +6 -3 lines
++ manakai/t/ChangeLog	14 Jul 2007 16:32:13 -0000
2007-07-15  Wakaba  <wakaba@suika.fam.cx>

	* DOM-TreeWalker.t, DOM-SerialWalker.t: New test scripts.

	* DOM-DOMImplementation.t: Tests for |Traversal| feature
	are added.

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

++ manakai/lib/Message/DOM/ChangeLog	14 Jul 2007 16:31:23 -0000
2007-07-15  Wakaba  <wakaba@suika.fam.cx>

	* TreeWalker.pm, SerialWalker.pm: New Perl modules.

	* Text.pm (whole_text): Parameter index number has
	been changed to support new |NodeFilter| Perl binding
	definition.

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

	* AttributeDefinition.pm, DOMElement.pm, DocumentType.pm,
	ElementTypeDefinition.pm, Entity.pm, EntityReference.pm,
	Notation.pm, ProcessingInstruction.pm (AUTOLOAD): Don't croak even if an attempt is made to modify a read-only attribute.

	* DOMConfiguration.pm (can_set_parameter,
	set_parameter): Don't allow to set the value
	to a string other than <http://www.w3.org/TR/REC-xml> (XML 1.0 DTD).

	* DOMDocument.pm (Message::IF::DocumentTraversal): New interface.
	(create_tree_walker, manakai_create_serial_walker): References
	and prototypes are added.

	* DOMException.pm (NULLPO_ERR): New error type:-).

	* DOMImplementation.pm ($HasFeature): Feature |Traversal|,
	version |2.0|, is added.

1 wakaba 1.1 package Message::DOM::DOMException;
2     use strict;
3 wakaba 1.14 our $VERSION=do{my @r=(q$Revision: 1.13 $=~/\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.14 CONFIGURATION_PARAMETER_VALUE_ERR => {
83 wakaba 1.13 -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 wakaba 1.14 NULLPO_ERR => {
89     -description => q(NULLPO),
90     },
91 wakaba 1.4 UNKNOWN_XML_VERSION_ERR => {
92     -description => q(Specified version of XML is not supported),
93     },
94     },
95     },
96     INUSE_ATTRIBUTE_ERR => {
97     -code => 10,
98     -description => q(Attribute is already in use),
99     },
100 wakaba 1.13 # INVALID_STATE_ERR == 11
101     # SYNTAX_ERR == 12
102     # INVALID_MODIFICATION_ERR == 13
103 wakaba 1.7 NAMESPACE_ERR => {
104     -code => 14,
105     -subtype => {
106     MALFORMED_QNAME_ERR => {
107     -description => q(Malformed XML qualified name),
108     },
109     NONXMLNSPREFIX_XMLNSNS_ERR => {
110     -description => q(Namespace prefix "xmlns" must be used for namespace URI <http://www.w3.org/2000/xmlns/>),
111     },
112     PREFIXED_NULLNS_ERR => {
113     -description => q(A namespace prefix is specified while namespace URI is null),
114     },
115 wakaba 1.8 QNAME_NULLNS_ERR => {
116     -description => q(Qualified name is not specified),
117     },
118 wakaba 1.7 XMLNS_NONXMLNSNS_ERR => {
119     -description => q(Qualified name "xmlns" can only be used with namespace URI <http://www.w3.org/2000/xmlns/>),
120     },
121     XMLNSPREFIX_NONXMLNSNS_ERR => {
122     -description => q(Namespace prefix "xmlns" cannot be used for namespace URI other than <http://www.w3.org/2000/xmlns/>),
123     },
124     XMLPREFIX_NONXMLNS_ERR => {
125     -description => q(Namespace prefix "xml" cannot be used for namespace URI other than <http://www.w3.org/XML/1998/namespace>),
126     },
127     },
128     },
129 wakaba 1.13 # INVALID_ACCESS_ERR == 15
130     # VALIDATION_ERR == 16
131     TYPE_MISMATCH_ERR => {
132     -code => 17,
133     -subtype => {
134     CONFIGURATION_PARAMETER_TYPE_ERR => {
135     -description => q(The value type for this configuration parameter is incompatible with the specified value),
136     },
137     },
138     },
139 wakaba 1.1 }} # ___error_def
140    
141     package Message::IF::DOMException;
142 wakaba 1.2 push our @ISA, 'Message::Util::Error';
143 wakaba 1.1
144     ## DOM1
145     sub INDEX_SIZE_ERR () { 1 }
146     sub DOMSTRING_SIZE_ERR () { 2 }
147     sub HIERARCHY_REQUEST_ERR () { 3 }
148     sub WRONG_DOCUMENT_ERR () { 4 }
149     sub INVALID_CHARACTER_ERR () { 5 }
150     sub NO_DATA_ALLOWED_ERR () { 6 }
151     sub NO_MODIFICATION_ALLOWED_ERR () { 7 }
152     sub NOT_FOUND_ERR () { 8 }
153     sub NOT_SUPPORTED_ERR () { 9 }
154     sub INUSE_ATTRIBUTE_ERR () { 10 }
155     ## DOM2
156     sub INVALID_STATE_ERR () { 11 }
157     sub SYNTAX_ERR () { 12 }
158     sub INVALID_MODIFICATION_ERR () { 13 }
159     sub NAMESPACE_ERR () { 14 }
160     sub INVALID_ACCESS_ERR () { 15 }
161     ## DOM3
162     sub VALIDATION_ERR () { 16 }
163     sub TYPE_MISMATCH_ERR () { 17 }
164    
165     =head1 LICENSE
166    
167     Copyright 2007 Wakaba <w@suika.fam.cx>
168    
169     This program is free software; you can redistribute it and/or
170     modify it under the same terms as Perl itself.
171    
172     =cut
173    
174     1;
175 wakaba 1.14 ## $Date: 2007/07/14 09:19:11 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24