Update of /cvsroot/net-script/netscript2/src/perl/NetScript/Engine
In directory sc8-pr-cvs1:/tmp/cvs-serv7847/perl/NetScript/Engine
Modified Files:
DOMWalker.pm
Log Message:
* added <?netscript include ?> directive
Index: DOMWalker.pm
===================================================================
RCS file: /cvsroot/net-script/netscript2/src/perl/NetScript/Engine/DOMWalker.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** DOMWalker.pm 31 May 2003 22:39:33 -0000 1.12
--- DOMWalker.pm 2 Jun 2003 21:49:16 -0000 1.13
***************
*** 215,220 ****
# set current target node to new node
! if ( $this -> dal() -> isElementNode( $clone ) && $isRefNode ) {
! $this -> setCurrentTarget( $clone ) ;
if ( $this -> { m_is_firstNode } ) {
--- 215,222 ----
# set current target node to new node
! if ( $this -> dal() -> isElementNode( $clone ) ) {
! if ( $isRefNode ) {
! $this -> setCurrentTarget( $clone ) ;
! }
if ( $this -> { m_is_firstNode } ) {
***************
*** 226,229 ****
--- 228,252 ----
$clone;
}
+
+ #/**
+ # Inserts the given node and its subtree into the target without any
+ # processing.
+ # @param the node/subtree to insert.
+ #*/
+ sub insertSubtreeIntoTarget {
+ my ($this, $node) = @_;
+ my $copy = $this -> dal() -> importNode( $this -> targetDocument(), $node, 1 );
+
+ $this -> dal() -> appendChild( $this -> currentTarget(), $copy );
+ if ( $this -> dal() -> isElementNode( $copy ) ) {
+ if ( $this -> { m_is_firstNode } ) {
+ $this -> dal() -> setDocumentElement( $this -> targetDocument(),
+ $copy );
+ $this -> { m_is_firstNode } = 0;
+ }
+ }
+ }
+
+
#/**
|