comparison Lib/IMPL/DOM/Schema.pm @ 37:c2e7f7c96bcd

performance improvements, DOM reworked (a little)
author Sergey
date Mon, 23 Nov 2009 00:59:06 +0300
parents a8086f85a571
children 16ada169ca75
comparison
equal deleted inserted replaced
36:1828103371d0 37:c2e7f7c96bcd
29 29
30 sub resolveType { 30 sub resolveType {
31 $_[0]->{$_TypesMap}->{$_[1]}; 31 $_[0]->{$_TypesMap}->{$_[1]};
32 } 32 }
33 33
34 #sub Create { 34 sub Create {
35 # my ($this,$nodeName,$class,$refArgs) = @_; 35 my ($this,$nodeName,$class,$refArgs) = @_;
36 36
37 # goto &SUPER::Create unless $class eq 'IMPL::DOM::Schema::Validator' 37 die new IMPL::Exception('Invalid node class') unless $class->isa('IMPL::DOM::Schema::Node');
38 #} 38
39 goto &SUPER::Create;
40 }
39 41
40 sub Process { 42 sub Process {
41 my ($this) = @_; 43 my ($this) = @_;
42 44
43 $this->{$_TypesMap} = { map { $_->type, $_ } $this->selectNodes(sub { $_[0]->nodeName eq 'ComplexType' || $_[0]->nodeName eq 'SimpleType' } ) }; 45 $this->{$_TypesMap} = { map { $_->type, $_ } $this->selectNodes(sub { $_[0]->nodeName eq 'ComplexType' || $_[0]->nodeName eq 'SimpleType' } ) };