comparison Lib/IMPL/DOM/Schema/Property.pm @ 101:d8dc6cad3f55

Schema in progress
author wizard
date Thu, 06 May 2010 17:55:59 +0400
parents 16ada169ca75
children c289ed9662ca
comparison
equal deleted inserted replaced
100:df6b4f054957 101:d8dc6cad3f55
34 sub Validate { 34 sub Validate {
35 my ($this,$node) = @_; 35 my ($this,$node) = @_;
36 36
37 if ($this->minOccur) { 37 if ($this->minOccur) {
38 my $prop = $this->name; 38 my $prop = $this->name;
39 my $nodeProp = new IMPL::DOM::Node(nodeName => '::property', nodeValue => $node->$prop() || $node->nodePropety($prop)); 39 my $nodeProp = new IMPL::DOM::Node(nodeName => '::property', nodeValue => eval { $node->$prop() } || $node->nodeProperty($prop));
40 40
41 if (! $nodeProp->nodeValue) { 41 if (! $nodeProp->nodeValue) {
42 return new IMPL::DOM::Schema::ValidationError( 42 return new IMPL::DOM::Schema::ValidationError(
43 Message => $this->RequiredMessage, 43 Message => $this->RequiredMessage,
44 Node => $node, 44 Node => $node,