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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by wakaba, Thu Jun 21 14:57:53 2007 UTC revision 1.4 by wakaba, Sat Jul 7 05:58:11 2007 UTC
# Line 7  sub ____new ($) { Line 7  sub ____new ($) {
7    my $self = bless {}, shift;    my $self = bless {}, shift;
8    return $self;    return $self;
9  } # ____new  } # ____new
10    *new = \&____new;
11    
12  sub AUTOLOAD {  sub AUTOLOAD {
13    my $method_name = our $AUTOLOAD;    my $method_name = our $AUTOLOAD;
# Line 30  sub AUTOLOAD { Line 31  sub AUTOLOAD {
31      Carp::croak (qq<Can't locate method "$AUTOLOAD">);      Carp::croak (qq<Can't locate method "$AUTOLOAD">);
32    }    }
33  } # AUTOLOAD  } # AUTOLOAD
34  ## DOMImplementation  
 sub create_document ($;$$$);  
 sub create_document_type ($$;$$);  
35  ## MCImplementation  ## MCImplementation
36  sub create_mc_decode_handler;  sub create_mc_decode_handler;
37  sub get_charset_name_from_uri;  sub get_charset_name_from_uri;
# Line 40  sub get_uri_from_charset_name; Line 39  sub get_uri_from_charset_name;
39  ## URIImplementation  ## URIImplementation
40  sub create_uri_reference ($$);  sub create_uri_reference ($$);
41    
42  #our $HasFeature;  our $HasFeature;
43    $HasFeature->{core}->{''} = 1;
44    $HasFeature->{core}->{'1.0'} = 1;
45    $HasFeature->{core}->{'2.0'} = 1;
46    $HasFeature->{core}->{'3.0'} = 1;
47    $HasFeature->{xml}->{''} = 1;
48    $HasFeature->{xml}->{'1.0'} = 1;
49    $HasFeature->{xml}->{'2.0'} = 1;
50    $HasFeature->{xml}->{'3.0'} = 1;
51    $HasFeature->{xmlversion}->{''} = 1;
52    $HasFeature->{xmlversion}->{'1.0'} = 1;
53    $HasFeature->{xmlversion}->{'1.1'} = 1;
54    $HasFeature->{q<http://suika.fam.cx/www/2006/feature/min>}->{''} = 1;
55    $HasFeature->{q<http://suika.fam.cx/www/2006/feature/min>}->{'3.0'} = 1;
56    $HasFeature->{q<http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#minimum>}->{''} = 1;
57    $HasFeature->{q<http://suika.fam.cx/~wakaba/archive/2004/8/18/manakai-dom#minimum>}->{'3.0'} = 1;
58    $HasFeature->{q<http://suika.fam.cx/www/2006/feature/xdoctype>}->{''} = 1;
59    $HasFeature->{q<http://suika.fam.cx/www/2006/feature/xdoctype>}->{'3.0'} = 1;
60    
61    ## |DOMImplementation| methods
62    
63    sub create_document ($;$$$);
64    
65    sub create_document_type ($$;$$);
66    
67  ## TODO: getFeature  sub get_feature ($$;$) {
68  ## TODO: hasFeature    my $feature = lc $_[1]; ## TODO: What |lc|?
69      $feature =~ s/^\+//;
70      
71      if ($HasFeature->{$feature}->{defined $_[2] ? $_[2] : ''}) {
72        return $_[0];
73      } else {
74        return undef;
75      }
76    } # get_feature
77    
78  ## NOTE: createDocumentType will be defined in DocumentType.pm  sub has_feature ($$;$) {
79      my $feature = lc $_[1];
80      my $plus = $feature =~ s/^\+// ? 1 : 0;
81      return $HasFeature->{$feature}->{defined $_[2] ? $_[2] : ''};
82    } # has_feature
83    
84  package Message::IF::DOMImplementation;  package Message::IF::DOMImplementation;
85    
86    =head1 LICENSE
87    
88    Copyright 2007 Wakaba <w@suika.fam.cx>
89    
90    This program is free software; you can redistribute it and/or
91    modify it under the same terms as Perl itself.
92    
93    =cut
94    
95  1;  1;
 ## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL>  
96  ## $Date$  ## $Date$

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24