Parent Directory | Revision Log
++ manakai/t/ChangeLog 14 Jun 2007 13:09:37 -0000 2007-06-14 Wakaba <wakaba@suika.fam.cx> * DOM-DOMImplementation.t: Tests for |create_document| and |create_document_type| are added. ++ manakai/lib/Message/DOM/ChangeLog 14 Jun 2007 13:09:13 -0000 2007-06-14 Wakaba <wakaba@suika.fam.cx> * Notation.pm, Entity.pm, EntityReference.pm, ProcessingInstruction.pm, CDATASection.pm, DocumentFragment.pm, ElementTypeDefinition.pm, AttributeDefinition.pm: New modules. * DOMDocument.pm (@ISA): 'Message::IF::DocumentXDoctype' added. (create_attribute_definition, create_element_type_definition, create_document_type_definition, create_cdata_section, create_processing_instruction, create_entity_reference, create_general_entity, create_notation): Prototypes added. * DOMImplementation.pm (create_document_type): Prototype added. * DocumentType.pm (@ISA), 'Message::IF::DocumentTypeDefinition' and 'Message::IF::DocumentTypeDeclaration' added. (create_document_type, create_document_type_definition): New methods.
1 | wakaba | 1.1 | package Message::DOM::DOMImplementation; |
2 | use strict; | ||
3 | wakaba | 1.2 | our $VERSION=do{my @r=(q$Revision: 1.1 $=~/\d+/g);sprintf "%d."."%02d" x $#r,@r}; |
4 | wakaba | 1.1 | push our @ISA, 'Message::IF::DOMImplementation'; |
5 | |||
6 | wakaba | 1.2 | ## Spec: |
7 | ## <http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-102161490> | ||
8 | |||
9 | wakaba | 1.1 | sub ____new ($) { |
10 | my $self = bless {}, shift; | ||
11 | return $self; | ||
12 | } # ____new | ||
13 | |||
14 | sub AUTOLOAD { | ||
15 | my $method_name = our $AUTOLOAD; | ||
16 | $method_name =~ s/.*:://; | ||
17 | return if $method_name eq 'DESTROY'; | ||
18 | |||
19 | my $module_name = { | ||
20 | create_document => 'Message::DOM::DOMDocument', ## TODO: New module name | ||
21 | wakaba | 1.2 | create_document_type => 'Message::DOM::DocumentType', |
22 | wakaba | 1.1 | create_uri_reference => 'Message::URI::URIReference', |
23 | }->{$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.1 | ## URIImplementation |
37 | sub create_uri_reference ($$); | ||
38 | |||
39 | #our $HasFeature; | ||
40 | |||
41 | ## TODO: getFeature | ||
42 | ## TODO: hasFeature | ||
43 | |||
44 | ## NOTE: createDocumentType will be defined in DocumentType.pm | ||
45 | |||
46 | package Message::IF::DOMImplementation; | ||
47 | |||
48 | 1; | ||
49 | ## License: <http://suika.fam.cx/~wakaba/archive/2004/8/18/license#Perl+MPL> | ||
50 | wakaba | 1.2 | ## $Date: 2007/06/13 12:04:50 $ |
admin@suikawiki.org | ViewVC Help |
Powered by ViewVC 1.1.24 |