comparison Lib/IMPL/DOM/Schema/ValidationError.pm @ 383:2f16f13b000c

DOM localization
author cin
date Thu, 23 Jan 2014 17:26:34 +0400
parents 4ddb27ff4a0b
children 5aff94ba842f
comparison
equal deleted inserted replaced
382:99ac2e19c0cc 383:2f16f13b000c
29 } elsif ($args{node}) { 29 } elsif ($args{node}) {
30 $this->{$parent} = $args{node}->parentNode; 30 $this->{$parent} = $args{node}->parentNode;
31 } else { 31 } else {
32 die new IMPL::InvalidArgumentException("A 'parent' or a 'node' parameter is required"); 32 die new IMPL::InvalidArgumentException("A 'parent' or a 'node' parameter is required");
33 } 33 }
34 $this->{$message} = FormatMessage(delete $args{message}, \%args) if $args{message}; 34
35 if(my $msg = $args{message}) {
36 if (my($msgId) = ( $msg =~ /^ID:([\w\.]+)$/ ) ) {
37 $this->{$message} = ($args{schema} || $args{source})->document->stringMap->GetString($msgId, \%args);
38 } else {
39 $this->{$message} = FormatMessage(delete $args{message}, \%args) if $args{message};
40 }
41 }
35 } 42 }
36 43
37 sub toString { 44 sub toString {
38 (my $this) = @_; 45 (my $this) = @_;
39 return $this->message; 46 return $this->message;