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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Sun Jun 17 13:37:40 2007 UTC (17 years, 5 months ago) by wakaba
Branch: MAIN
Changes since 1.1: +20 -2 lines
++ manakai/t/ChangeLog	17 Jun 2007 13:37:22 -0000
2007-06-17  Wakaba  <wakaba@suika.fam.cx>

	* DOM-Attr.t, DOM-AttributeDefinition.t, DOM-DocumentType.t,
	DOM-Element.t, DOM-Entity.t, DOM-EntityReference.t,
	DOM-Notation.t, DOM-ProcessingInstruction.t: New.

	* DOM-Document.t, DOM-Node.t: Tests for newly-implemented attributes
	and methods are added.

	* Makefile (test-module-dom-old): Renamed from |test-module-dom|.
	(test-module-dom): New.

++ manakai/lib/Message/DOM/ChangeLog	17 Jun 2007 13:34:54 -0000
2007-06-17  Wakaba  <wakaba@suika.fam.cx>

	* Attr.pm (____new): Initialize |specified| as 1.
	(base_uri, manakai_attribute_type, specified): Implemented.
	(prefix): Don't check read-only flag unless |strict_error_checking|.
	(value): Call |text_content| for now.

	* AttributeDefinition.pm (DeclaredValueType, DefaultValueType): Added.
	(declared_type, default_type): Implemented.

	* CharacterData.pm (____new): Allow a scalar reference
	as an input for the |data| attribute.
	(base_uri, manakai_append_text): Implemented.

	* DOMConfiguration.pm (set_parameter): Resetting implemented.

	* DOMDocument.pm (____new): Set default values to
	configuration parameter whose default is true.
	(document_uri, input_encoding): Implemented.
	(all_declarations_processed, manakai_is_html): Implemented.
	(base_uri, manakai_append_text,
	manakai_entity_base_uri, strict_error_checking,
	xml_encoding, xml_version, xml_standalone): Implemented.

	* DOMElement.pm (manakai_base_uri, base_uri): Implemented.
	(get_attribute, get_attribute_node): Alpha version.
	(set_attribute_node, set_attribute_node_ns): Implemented.
	(set_attribute_ns): Accept non-ARRAY qualified name.

	* DOMException.pm (___error_def): |WRONG_DOCUMENT_ERR|,
	|NOT_SUPPORTED_ERR|, and |INUSE_ATTRIBUTE_ERR| are added.

	* DocumentType.pm (public_id, system_id): Implemented.
	(base_uri, declaration_base_uri, manakai_declaration_base_uri,
	manakai_append_text): Implemented.
	(element_types, general_entities, notations,
	set_element_type_definition_node, set_general_entity_node,
	set_notation_node): Alpha version.

	* ElementTypeDefinition.pm (manakai_append_text): Implemented.
	(attribute_definitions, set_attribute_definition_node): Alpha version.

	* Entity.pm (has_replacement_tree, public_id, system_id,
	manakai_declaration_base_uri, manakai_entity_base_uri,
	manakai_entity_uri): Implemented.

	* EntityReference.pm (manakai_expanded, manakai_external): Implemented.
	(base_uri, manakai_entity_base_uri): Implemented.

	* Node.pm (base_uri): Implemented.
	(text_content): Don't check read-only or not
	unless |strict_error_checking|.
	(manakai_append_text): Implemented.
	(get_feature): Alpha.
	(manakai_set_read_only): Implemented.

	* Notation.pm (public_id, system_id, manakai_append_text,
	manakai_declaration_base_uri): Implemented.

	* ProcessingInstruction.pm (manakai_base_uri,
	base_uri, manakai_append_text): Implemented.

1 wakaba 1.1 package Message::DOM::DOMConfiguration;
2     use strict;
3     our $VERSION=do{my @r=(q$Revision: 1.1 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
4     push our @ISA, 'Message::IF::DOMConfiguration';
5     require Message::DOM::DOMException;
6    
7     use overload
8     eq => sub {
9     return 0 unless UNIVERSAL::isa ($_[1], 'Message::DOM::DOMConfiguration');
10     return $${$_[0]} eq $${$_[1]};
11     },
12     ne => sub {
13     return not ($_[0] eq $_[1]);
14     },
15     fallback => 1;
16    
17     sub ___report_error ($$) {
18     $_[1]->throw;
19     } # ___report_error
20    
21     ## |DOMConfiguration| methods
22    
23     sub set_parameter ($$;$) {
24 wakaba 1.2 if (defined $_[2]) {
25     ${$${$_[0]}}->{$_[1]} = $_[2];
26     } else {
27     if ($_[1] eq 'http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree' or
28     $_[1] eq 'http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute' or
29     $_[1] eq 'http://suika.fam.cx/www/2006/dom-config/strict-document-children') {
30     ${$${$_[0]}}->{$_[1]} = 1;
31     } elsif ($_[1] eq 'error-handler') {
32     ${$${$_[0]}}->{$_[1]} = sub { };
33     } else {
34     delete ${$${$_[0]}}->{$_[1]};
35     }
36     }
37     ## http://suika.fam.cx/www/2006/dom-config/clone-entity-reference-subtree
38     ## http://suika.fam.cx/www/2006/dom-config/dtd-default-attribute
39     ## http://suika.fam.cx/www/2006/dom-config/xml-id
40     ## error-handler
41     ## xml-dtd
42     ## http://suika.fam.cx/www/2006/dom-config/strict-document-children
43 wakaba 1.1 } # set_parameter
44    
45     package Message::IF::DOMConfiguration;
46    
47     =head1 LICENSE
48    
49     Copyright 2007 Wakaba <w@suika.fam.cx>
50    
51     This program is free software; you can redistribute it and/or
52     modify it under the same terms as Perl itself.
53    
54     =cut
55    
56     1;
57 wakaba 1.2 ## $Date: 2007/06/16 15:27:45 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24