comparison Lib/IMPL/DOM/Schema/Property.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents 76515373dac0
children 2904da230022
comparison
equal deleted inserted replaced
193:8e8401c0aea4 194:4d0e1962161c
40 40
41 # buld a pseudo node for the property value 41 # buld a pseudo node for the property value
42 my $nodeProp = new IMPL::DOM::Node(nodeName => '::property', nodeValue => eval { $node->$prop() } || $node->nodeProperty($prop)); 42 my $nodeProp = new IMPL::DOM::Node(nodeName => '::property', nodeValue => eval { $node->$prop() } || $node->nodeProperty($prop));
43 43
44 if ($nodeProp->nodeValue) { 44 if ($nodeProp->nodeValue) {
45 # we have a value so validate it 45 # we have a value so validate it
46 return $this->SUPER::Validate($nodeProp,$ctx); 46 return $this->SUPER::Validate($nodeProp,$ctx);
47 } elsif($this->minOccur) { 47 } elsif($this->minOccur) {
48 # we don't have a value but it's a mandatory property 48 # we don't have a value but it's a mandatory property
49 return new IMPL::DOM::Schema::ValidationError( 49 return new IMPL::DOM::Schema::ValidationError(
50 Message => $this->messageRequired, 50 Message => $this->messageRequired,
51 Node => $node, 51 Node => $node,
52 Schema => $this, 52 Schema => $this,
53 Source => $ctx && $ctx->{Source} || $this 53 Source => $ctx && $ctx->{Source} || $this