diff 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
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Navigator.pm	Wed Sep 09 17:43:31 2009 +0400
+++ b/Lib/IMPL/DOM/Navigator.pm	Thu Sep 10 17:42:47 2009 +0400
@@ -27,6 +27,20 @@
     }
 }
 
+sub _NavigateNode {
+    my ($this,$newNode) = @_;
+    push @{$this->{$Path}}, $this->{$Current};
+    return $this->{$Current} = $newNode;
+}
+
+sub _NavigateNodeStirct {
+    my ($this,$newNode) = @_;
+    
+    die new IMPL::InvalidOperationException("A newNode doesn't belongs to the current") unless $newNode->parentNode == $this->{$Current};
+    push @{$this->{$Path}}, $this->{$Current};
+    return $this->{$Current} = $newNode;
+}
+
 sub Back {
     my ($this) = @_;