Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2
In directory usw-pr-cvs1:/tmp/cvs-serv5179
Modified Files:
DOMParser.pm Document.pm Element.pm Node.pm
Log Message:
* bugfixes
* speedup
Index: DOMParser.pm
===================================================================
RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParser.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** DOMParser.pm 9 Jun 2002 12:48:12 -0000 1.7
--- DOMParser.pm 7 Jul 2002 14:35:53 -0000 1.8
***************
*** 43,46 ****
--- 43,56 ----
);
+ return $this;
+ }
+
+
+ #/**
+ # Performs some initialization.
+ # @private
+ #*/
+ sub initInternals {
+ my ( $this ) = @_;
# holds the currently innermost element
# e.g
***************
*** 64,71 ****
$this -> { m_contextElement } = $this -> { m_document };
-
- return $this;
}
-
#/**
--- 74,78 ----
***************
*** 105,108 ****
--- 112,116 ----
sub Init {
my ($this, $expat ) = @_;
+ $this -> initInternals();
}
Index: Document.pm
===================================================================
RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Document.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Document.pm 8 Jun 2002 12:14:29 -0000 1.9
--- Document.pm 7 Jul 2002 14:35:53 -0000 1.10
***************
*** 388,392 ****
sub importNode {
my ( $this, $node, $deep ) = @_;
-
if ($node -> getNodeType() == $XML::DOM2::Node::ATTRIBUTE_NODE) {
# make a shallow copy
--- 388,391 ----
***************
*** 399,403 ****
for ( 0..$len ) {
$newNode -> appendChild(
! $this -> importNode( $descendants -> item( $_ ) ) );
}
return $newNode;
--- 398,402 ----
for ( 0..$len ) {
$newNode -> appendChild(
! $this -> importNode( $descendants -> item( $_ ), $deep ) );
}
return $newNode;
***************
*** 414,418 ****
for ( 0..$len ) {
$newNode -> appendChild(
! $this -> importNode( $descendants -> item( $_ ) ) );
}
}
--- 413,417 ----
for ( 0..$len ) {
$newNode -> appendChild(
! $this -> importNode( $descendants -> item( $_ ), $deep ) );
}
}
Index: Element.pm
===================================================================
RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Element.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Element.pm 8 Jun 2002 12:14:29 -0000 1.9
--- Element.pm 7 Jul 2002 14:35:53 -0000 1.10
***************
*** 565,569 ****
sub cloneNode {
my ($this, $deep ) = @_;
-
#copy node
my $newNode = $this -> getOwnerDocument() -> createElementNS(
--- 565,568 ----
Index: Node.pm
===================================================================
RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Node.pm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Node.pm 9 Jun 2002 12:48:12 -0000 1.20
--- Node.pm 7 Jul 2002 14:35:53 -0000 1.21
***************
*** 532,536 ****
$this -> getChildNodes() -> insert( $index, $newNode );
# set new parent
! $newNode -> setParentNode( $this );
# get the siblings right
--- 532,536 ----
$this -> getChildNodes() -> insert( $index, $newNode );
# set new parent
! $newNode -> { m_parentNode } = $this;
# get the siblings right
***************
*** 600,604 ****
sub removeChild {
my ( $this, $oldChild ) = @_;
!
# Check index of ref node.
my $index = $this -> getChildNodes() -> indexOf( $oldChild );
--- 600,604 ----
sub removeChild {
my ( $this, $oldChild ) = @_;
! warn $this->getNodeName()." REMOVING: $oldChild....";
# Check index of ref node.
my $index = $this -> getChildNodes() -> indexOf( $oldChild );
|