comparison Lib/IMPL/DOM/Navigator.pm @ 18:818c74b038ae

DOM Schema + tests
author Sergey
date Thu, 10 Sep 2009 17:42:47 +0400
parents bb8d67f811ea
children 7f00786f8210
comparison
equal deleted inserted replaced
17:7f88e01b58f8 18:818c74b038ae
23 push @{$this->{$Path}}, $this->{$Current}; 23 push @{$this->{$Path}}, $this->{$Current};
24 return $this->{$Current} = $newNode; 24 return $this->{$Current} = $newNode;
25 } else { 25 } else {
26 return undef; 26 return undef;
27 } 27 }
28 }
29
30 sub _NavigateNode {
31 my ($this,$newNode) = @_;
32 push @{$this->{$Path}}, $this->{$Current};
33 return $this->{$Current} = $newNode;
34 }
35
36 sub _NavigateNodeStirct {
37 my ($this,$newNode) = @_;
38
39 die new IMPL::InvalidOperationException("A newNode doesn't belongs to the current") unless $newNode->parentNode == $this->{$Current};
40 push @{$this->{$Path}}, $this->{$Current};
41 return $this->{$Current} = $newNode;
28 } 42 }
29 43
30 sub Back { 44 sub Back {
31 my ($this) = @_; 45 my ($this) = @_;
32 46