Mercurial > pub > Impl
comparison Lib/IMPL/DOM/Schema/SimpleNode.pm @ 152:1e7f03414b65
DOM: schema improvements
DOM: saving to XML::Writer feature
author | wizard |
---|---|
date | Thu, 23 Sep 2010 03:58:43 +0400 |
parents | e30bdd040fe3 |
children | 76515373dac0 |
comparison
equal
deleted
inserted
replaced
151:e36ffd8c29db | 152:1e7f03414b65 |
---|---|
3 use warnings; | 3 use warnings; |
4 | 4 |
5 use base qw(IMPL::DOM::Schema::Node); | 5 use base qw(IMPL::DOM::Schema::Node); |
6 use IMPL::Class::Property; | 6 use IMPL::Class::Property; |
7 use IMPL::Class::Property::Direct; | 7 use IMPL::Class::Property::Direct; |
8 use IMPL::DOM::Property qw(_dom); | |
8 | 9 |
9 BEGIN { | 10 BEGIN { |
10 public _direct property inflator => prop_get; | 11 public _dom _direct property inflator => prop_get; |
11 public _direct property messageInflateError => prop_get; | 12 public _dom _direct property messageInflateError => prop_get; |
12 } | 13 } |
13 | 14 |
14 our %CTOR = ( | 15 our %CTOR = ( |
15 'IMPL::DOM::Schema::Node' => sub { | 16 'IMPL::DOM::Schema::Node' => sub { |
16 my %args = @_; | 17 my %args = @_; |
21 ); | 22 ); |
22 | 23 |
23 sub CTOR { | 24 sub CTOR { |
24 my ($this,%args) = @_; | 25 my ($this,%args) = @_; |
25 | 26 |
26 $this->{$inflator} = $args{inflator} if $args{inflator}; | 27 if ( $args{inflator} ) { |
27 $this->{$messageInflateError} = $args{messageInflateError} || 'Failed to inflate nodeValue %Node.path%: %Error%'; | 28 $this->{$inflator} = $args{inflator} ; |
29 $this->{$messageInflateError} = exists $args{messageInflateError} ? $args{messageInflateError} : 'Failed to inflate nodeValue %Node.path%: %Error%'; | |
30 } | |
28 } | 31 } |
29 | 32 |
30 sub Validate { | 33 sub Validate { |
31 my ($this,$node,$ctx) = @_; | 34 my ($this,$node,$ctx) = @_; |
32 | 35 |