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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Thu Jun 21 14:57:53 2007 UTC (17 years, 5 months ago) by wakaba
Branch: MAIN
Changes since 1.2: +9 -5 lines
++ manakai/t/ChangeLog	21 Jun 2007 14:57:40 -0000
2007-06-21  Wakaba  <wakaba@suika.fam.cx>

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

++ manakai/lib/Message/DOM/ChangeLog	21 Jun 2007 14:57:15 -0000
	* Comment.pm (node_type): Node type was incorrect!

	* DOMConfiguration.pm (get_parameter): Alpha.

	* DOMImplementation.pm (create_mc_decode_handler,
	create_charset_name_from_uri, create_uri_from_charset_name):
	New autoload configuration.  Note that the Message::Charset::Encode
	module is subject to change.

	* XMLParserTemp.pm: Now it can be used with new version
	of DOM implementation.  Current plan is to replace it by
	an XML5 parser someday.

2007-06-21  Wakaba  <wakaba@suika.fam.cx>

1 wakaba 1.1 package Message::DOM::DOMImplementation;
2     use strict;
3 wakaba 1.3 our $VERSION=do{my @r=(q$Revision: 1.2 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
4 wakaba 1.1 push our @ISA, 'Message::IF::DOMImplementation';
5    
6     sub ____new ($) {
7     my $self = bless {}, shift;
8     return $self;
9     } # ____new
10    
11     sub AUTOLOAD {
12     my $method_name = our $AUTOLOAD;
13     $method_name =~ s/.*:://;
14     return if $method_name eq 'DESTROY';
15    
16     my $module_name = {
17     create_document => 'Message::DOM::DOMDocument', ## TODO: New module name
18 wakaba 1.2 create_document_type => 'Message::DOM::DocumentType',
19 wakaba 1.3 create_mc_decode_handler => 'Message::Charset::Encode',
20 wakaba 1.1 create_uri_reference => 'Message::URI::URIReference',
21 wakaba 1.3 get_charset_name_from_uri => 'Message::Charset::Encode',
22     get_uri_from_charset_name => 'Message::Charset::Encode',
23 wakaba 1.1 }->{$method_name};
24     if ($module_name) {
25     eval qq{ require $module_name } or die $@;
26     no strict 'refs';
27     goto &{ $AUTOLOAD };
28     } else {
29     require Carp;
30     Carp::croak (qq<Can't locate method "$AUTOLOAD">);
31     }
32     } # AUTOLOAD
33     ## DOMImplementation
34     sub create_document ($;$$$);
35 wakaba 1.2 sub create_document_type ($$;$$);
36 wakaba 1.3 ## MCImplementation
37     sub create_mc_decode_handler;
38     sub get_charset_name_from_uri;
39     sub get_uri_from_charset_name;
40 wakaba 1.1 ## URIImplementation
41     sub create_uri_reference ($$);
42    
43     #our $HasFeature;
44    
45     ## TODO: getFeature
46     ## TODO: hasFeature
47    
48     ## NOTE: createDocumentType will be defined in DocumentType.pm
49    
50     package Message::IF::DOMImplementation;
51    
52     1;
53     ## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL>
54 wakaba 1.3 ## $Date: 2007/06/14 13:10:07 $

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24