| 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; |
| 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; |
| 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$ |