comparison Lib/IMPL/DOM/Navigator/Builder.pm @ 11:75980091813b

DOM и навигация
author Sergey
date Wed, 02 Sep 2009 17:47:44 +0400
parents
children bb8d67f811ea
comparison
equal deleted inserted replaced
10:63f6653b094e 11:75980091813b
1 package IMPL::DOM::Navigator::Builder;
2 use strict;
3 use warnings;
4
5 use base qw(IMPL::DOM::Navigator);
6 use IMPL::Class::Property;
7 use IMPL::Class::Property::Direct;
8
9 BEGIN {
10 protected _direct property _navigatorSchema => prop_all;
11 public _direct property Document => prop_get | owner_set;
12 }
13
14 __PACKAGE__->PassThroughArgs;
15
16 sub CTOR {
17 my ($this,$domDocument,$schema) = @_;
18
19 $this->{$Document} = $domDocument;
20 $this->{$_navigatorSchema} = new IMPL::DOM::Navigator($schema);
21 }
22
23 sub NavigateCreate {
24 my ($this,$nodeName,%props) = @_;
25
26 if ( my $nodeSchema = $this->{$_navigatorSchema}->Navigate($nodeName) ) {
27
28
29 } else {
30 die new IMPL::InvalidOperationException("Requested elemnt not found in the schema");
31 }
32 }
33
34 1;