Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv10534 Modified Files: Attr.pm CDATASection.pm CharacterData.pm Comment.pm DOMException.pm DOMImplementation.pm DOMParser.pm DOMParserStyle.pm DOMWriter.pm DOMWriterStyle.pm Document.pm DocumentFragment.pm DocumentType.pm Element.pm Entity.pm EntityReference.pm NamedNodeMap.pm Node.pm NodeList.pm Notation.pm ProcessingInstruction.pm Text.pm XMLDOMWriterStyle.pm notes.txt Log Message: * increased speed by more than 13% Index: Attr.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Attr.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Attr.pm 17 Mar 2002 19:26:14 -0000 1.5 --- Attr.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::Attr; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Attr; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 110,114 **** # FIXME: Support for entity references my $node = $this -> childNodes() -> item( { index => $_ } ); ! if ( $node -> nodeType() == $this -> TEXT_NODE() ) { $result .= $node -> nodeValue(); } --- 110,114 ---- # FIXME: Support for entity references my $node = $this -> childNodes() -> item( { index => $_ } ); ! if ( $node -> nodeType() == $XML::DOM2::Node::TEXT_NODE ) { $result .= $node -> nodeValue(); } *************** *** 198,202 **** sub nodeType { my ($this) = @_; ! $this -> ATTRIBUTE_NODE(); } --- 198,202 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::ATTRIBUTE_NODE; } Index: CDATASection.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CDATASection.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CDATASection.pm 17 Mar 2002 19:26:14 -0000 1.5 --- CDATASection.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::CDATASection; use base qw(XML::DOM2::Text); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::CDATASection; use base qw(XML::DOM2::Text); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 94,98 **** sub nodeType { my ($this) = @_; ! $this -> CDATA_SECTION_NODE(); } --- 94,98 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::CDATA_SECTION_NODE; } Index: CharacterData.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CharacterData.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CharacterData.pm 9 May 2002 19:09:41 -0000 1.5 --- CharacterData.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::CharacterData; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::CharacterData; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: Comment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Comment.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Comment.pm 17 Mar 2002 19:26:14 -0000 1.5 --- Comment.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::Comment; use base qw(XML::DOM2::CharacterData); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Comment; use base qw(XML::DOM2::CharacterData); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 95,99 **** sub nodeType { my ($this) = @_; ! $this -> COMMENT_NODE(); } --- 95,99 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::COMMENT_NODE; } Index: DOMException.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMException.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DOMException.pm 17 Mar 2002 19:26:14 -0000 1.7 --- DOMException.pm 11 May 2002 13:10:23 -0000 1.8 *************** *** 11,15 **** use strict; package XML::DOM2::DOMException; ! use vars qw($VERSION); use Carp; --- 11,15 ---- use strict; package XML::DOM2::DOMException; ! use Carp; *************** *** 17,21 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 17,21 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: DOMImplementation.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMImplementation.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** DOMImplementation.pm 26 Apr 2002 10:50:52 -0000 1.5 --- DOMImplementation.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 11,15 **** use strict; package XML::DOM2::DOMImplementation; ! use vars qw($VERSION); use XML::DOM2::Document; use XML::DOM2::DOMException; --- 11,15 ---- use strict; package XML::DOM2::DOMImplementation; ! use XML::DOM2::Document; use XML::DOM2::DOMException; *************** *** 18,22 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 18,22 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: DOMParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParser.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DOMParser.pm 17 Mar 2002 19:26:14 -0000 1.3 --- DOMParser.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 11,15 **** use strict; package XML::DOM2::DOMParser; ! use vars qw($VERSION); use XML::DOM2::DOMImplementation; --- 11,15 ---- use strict; package XML::DOM2::DOMParser; ! use XML::DOM2::DOMImplementation; *************** *** 21,25 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 21,25 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: DOMParserStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParserStyle.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DOMParserStyle.pm 17 Mar 2002 19:26:14 -0000 1.3 --- DOMParserStyle.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 11,15 **** use strict; package XML::DOM2::DOMParserStyle; ! use vars qw($VERSION); # This package is a style which forwards function calls --- 11,15 ---- use strict; package XML::DOM2::DOMParserStyle; ! # This package is a style which forwards function calls *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: DOMWriter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriter.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DOMWriter.pm 26 Apr 2002 10:50:52 -0000 1.2 --- DOMWriter.pm 11 May 2002 13:10:23 -0000 1.3 *************** *** 11,15 **** use strict; package XML::DOM2::DOMWriter; ! use vars qw($VERSION); use XML::DOM2::Node; --- 11,15 ---- use strict; package XML::DOM2::DOMWriter; ! use XML::DOM2::Node; *************** *** 18,22 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 18,22 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 66,81 **** my $nodeType = $child -> nodeType(); $style -> processElement( $child ) ! if ($nodeType == XML::DOM2::Node -> ELEMENT_NODE() ); $style -> processText( $child ) ! if ($nodeType == XML::DOM2::Node -> TEXT_NODE() ); $style -> processPI( $child ) ! if ($nodeType == XML::DOM2::Node -> PROCESSING_INSTRUCTION_NODE()); $style -> processCDATASection( $child ) ! if ($nodeType == XML::DOM2::Node -> CDATA_SECTION_NODE()); $style -> processComment( $child ) ! if ($nodeType == XML::DOM2::Node -> COMMENT_NODE()); #if the node type is an element we have to finish it later ! if ($nodeType == XML::DOM2::Node -> ELEMENT_NODE()) { push ( @elements, $child ); unshift( @childrenList, "ELEMENT" ); --- 66,81 ---- my $nodeType = $child -> nodeType(); $style -> processElement( $child ) ! if ($nodeType == $XML::DOM2::Node::ELEMENT_NODE ); $style -> processText( $child ) ! if ($nodeType == $XML::DOM2::Node::TEXT_NODE ); $style -> processPI( $child ) ! if ($nodeType == $XML::DOM2::Node::PROCESSING_INSTRUCTION_NODE); $style -> processCDATASection( $child ) ! if ($nodeType == $XML::DOM2::Node::CDATA_SECTION_NODE); $style -> processComment( $child ) ! if ($nodeType == $XML::DOM2::Node::COMMENT_NODE); #if the node type is an element we have to finish it later ! if ($nodeType == $XML::DOM2::Node::ELEMENT_NODE) { push ( @elements, $child ); unshift( @childrenList, "ELEMENT" ); Index: DOMWriterStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriterStyle.pm,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DOMWriterStyle.pm 17 Mar 2002 19:26:14 -0000 1.1 --- DOMWriterStyle.pm 11 May 2002 13:10:23 -0000 1.2 *************** *** 11,20 **** use strict; package XML::DOM2::DOMWriterStyle; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 11,20 ---- use strict; package XML::DOM2::DOMWriterStyle; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: Document.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Document.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Document.pm 26 Apr 2002 10:50:52 -0000 1.6 --- Document.pm 11 May 2002 13:10:23 -0000 1.7 *************** *** 12,16 **** package XML::DOM2::Document; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Document; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 28,32 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 28,32 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 412,416 **** my $deep = $paramRef -> { deep }; ! if ($node -> nodeType() == XML::DOM2::Node -> ATTRIBUTE_NODE()) { # make a shallow copy my $newNode = $node -> cloneNode(); --- 412,416 ---- my $deep = $paramRef -> { deep }; ! if ($node -> nodeType() == $XML::DOM2::Node::ATTRIBUTE_NODE) { # make a shallow copy my $newNode = $node -> cloneNode(); *************** *** 454,458 **** my $newNode = $params{ newChild }; ! if ( $newNode -> nodeType() == XML::DOM2::Node -> ELEMENT_NODE() ) { if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( --- 454,458 ---- my $newNode = $params{ newChild }; ! if ( $newNode -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( *************** *** 486,490 **** my $newNode = $params{ newChild }; ! if ( $newNode -> nodeType() == XML::DOM2::Node -> ELEMENT_NODE() ) { if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( --- 486,490 ---- my $newNode = $params{ newChild }; ! if ( $newNode -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( *************** *** 509,513 **** sub nodeType { my ($this) = @_; ! $this -> DOCUMENT_NODE(); } --- 509,513 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::DOCUMENT_NODE; } Index: DocumentFragment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DocumentFragment.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DocumentFragment.pm 17 Mar 2002 19:26:14 -0000 1.3 --- DocumentFragment.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::DocumentFragment; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::DocumentFragment; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 32,36 **** sub nodeType { my ($this) = @_; ! $this -> DOCUMENT_FRAGMENT_NODE(); } --- 32,36 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE; } Index: DocumentType.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DocumentType.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DocumentType.pm 17 Mar 2002 19:26:14 -0000 1.3 --- DocumentType.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::DocumentType; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::DocumentType; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 20,24 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 20,24 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 110,114 **** sub nodeType { my ($this) = @_; ! $this -> DOCUMENT_TYPE_NODE(); } --- 110,114 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::DOCUMENT_TYPE_NODE; } Index: Element.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Element.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Element.pm 26 Apr 2002 10:50:52 -0000 1.6 --- Element.pm 11 May 2002 13:10:23 -0000 1.7 *************** *** 12,16 **** package XML::DOM2::Element; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Element; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 21,25 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 21,25 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 176,180 **** my $child = $children -> item ( { "index" => $_} ); ! if ( $child -> nodeType() == &ELEMENT_NODE() ) { # if an element is found add it to the list if ( $name eq "*" || $child -> nodeName() eq $name) { --- 176,180 ---- my $child = $children -> item ( { "index" => $_} ); ! if ( $child -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { # if an element is found add it to the list if ( $name eq "*" || $child -> nodeName() eq $name) { *************** *** 223,227 **** my $child = $children -> item ( { "index" => $_} ); ! if ( $child -> nodeType() == &ELEMENT_NODE() ) { # if an element is found add it to the list if ( ( $localName eq "*" || $child -> localName() eq $localName ) && --- 223,227 ---- my $child = $children -> item ( { "index" => $_} ); ! if ( $child -> nodeType() == $XML::DOM2::Node::ELEMENT_NODE ) { # if an element is found add it to the list if ( ( $localName eq "*" || $child -> localName() eq $localName ) && *************** *** 548,552 **** sub nodeType { my ($this) = @_; ! $this -> ELEMENT_NODE(); } --- 548,552 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::ELEMENT_NODE; } Index: Entity.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Entity.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Entity.pm 17 Mar 2002 19:26:14 -0000 1.3 --- Entity.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::Entity; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Entity; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 77,81 **** sub nodeType { my ($this) = @_; ! $this -> ENTITY_NODE(); } --- 77,81 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::ENTITY_NODE; } Index: EntityReference.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/EntityReference.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EntityReference.pm 17 Mar 2002 19:26:14 -0000 1.3 --- EntityReference.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::EntityReference; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::EntityReference; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 32,36 **** sub nodeType { my ($this) = @_; ! $this -> ENTITY_REFERENCE_NODE(); } --- 32,36 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::ENTITY_REFERENCE_NODE; } Index: NamedNodeMap.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NamedNodeMap.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NamedNodeMap.pm 26 Apr 2002 10:50:52 -0000 1.8 --- NamedNodeMap.pm 11 May 2002 13:10:23 -0000 1.9 *************** *** 11,20 **** use strict; package XML::DOM2::NamedNodeMap; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 11,20 ---- use strict; package XML::DOM2::NamedNodeMap; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: Node.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Node.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Node.pm 9 May 2002 19:09:41 -0000 1.16 --- Node.pm 11 May 2002 13:10:23 -0000 1.17 *************** *** 16,20 **** use strict; package XML::DOM2::Node; - use vars qw($VERSION); use XML::DOM2::NodeList; use XML::DOM2::NamedNodeMap; --- 16,19 ---- *************** *** 23,43 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- # Constants #-------------------------------------------------------- ! sub ELEMENT_NODE { 1; } ! sub ATTRIBUTE_NODE { 2; } ! sub TEXT_NODE { 3; } ! sub CDATA_SECTION_NODE { 4; } ! sub ENTITY_REFERENCE_NODE { 5; } ! sub ENTITY_NODE { 6; } ! sub PROCESSING_INSTRUCTION_NODE { 7; } ! sub COMMENT_NODE { 8; } ! sub DOCUMENT_NODE { 9; } ! sub DOCUMENT_TYPE_NODE { 10; } ! sub DOCUMENT_FRAGMENT_NODE { 11; } ! sub NOTATION_NODE { 12; } #-------------------------------------------------------- --- 22,43 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- # Constants #-------------------------------------------------------- ! ! our $ELEMENT_NODE = 1; ! our $ATTRIBUTE_NODE = 2; ! our $TEXT_NODE = 3; ! our $CDATA_SECTION_NODE = 4; ! our $ENTITY_REFERENCE_NODE = 5; ! our $ENTITY_NODE = 6; ! our $PROCESSING_INSTRUCTION_NODE = 7; ! our $COMMENT_NODE = 8; ! our $DOCUMENT_NODE = 9; ! our $DOCUMENT_TYPE_NODE = 10; ! our $DOCUMENT_FRAGMENT_NODE = 11; ! our $NOTATION_NODE = 12; #-------------------------------------------------------- *************** *** 59,63 **** bless( $this, $class ); # create Object ! $this -> { m_childNodes } = undef; # XML::DOM2::NodeList -> new (); #LAZY $this -> { m_ownerDocument } = undef; $this -> { m_parentNode } = undef; --- 59,63 ---- bless( $this, $class ); # create Object ! $this -> { m_childNodes } = XML::DOM2::NodeList -> new (); $this -> { m_ownerDocument } = undef; $this -> { m_parentNode } = undef; *************** *** 98,104 **** sub childNodes { my ( $this ) = @_; - unless( defined( $this -> { m_childNodes } ) ) { - $this -> { m_childNodes } = XML::DOM2::NodeList -> new(); - } $this -> { m_childNodes }; } --- 98,101 ---- *************** *** 117,126 **** $this -> { m_firstChild }; - # if ( $this -> childNodes() -> length() > 0 ) { - # return $this -> childNodes() -> item( { index => 0 } ) ; - # } - # else { - # return undef; - # } } --- 114,117 ---- *************** *** 137,148 **** $this -> { m_lastChild }; - # my $len = $this -> childNodes() -> length(); - # - # if ( $len > 0 ) { - # return $this -> childNodes() -> item( { index => $len - 1 } ) ; - # } - # else { - # return undef; - # } } --- 128,131 ---- *************** *** 201,209 **** my $result = undef; SWITCH: { ! $result = "#cdata-section", last SWITCH if $this -> nodeType() == &CDATA_SECTION_NODE(); ! $result = "#comment", last SWITCH if $this -> nodeType() == &COMMENT_NODE(); ! $result = "#document", last SWITCH if $this -> nodeType() == &DOCUMENT_NODE(); ! $result = "#document-fragment", last SWITCH if $this -> nodeType() == &DOCUMENT_FRAGMENT_NODE(); ! $result = "#text", last SWITCH if $this -> nodeType() == &TEXT_NODE(); } $result; --- 184,192 ---- my $result = undef; SWITCH: { ! $result = "#cdata-section", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::CDATA_SECTION_NODE; ! $result = "#comment", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::COMMENT_NODE; ! $result = "#document", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::DOCUMENT_NODE; ! $result = "#document-fragment", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE; ! $result = "#text", last SWITCH if $this -> nodeType() == $XML::DOM2::Node::TEXT_NODE; } $result; *************** *** 361,365 **** # Handle document fragments ! if ( $newNode -> nodeType() == &DOCUMENT_FRAGMENT_NODE() ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; --- 344,348 ---- # Handle document fragments ! if ( $newNode -> nodeType() == $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; *************** *** 495,499 **** # Handle document fragments ! if ( $newNode -> nodeType() == &DOCUMENT_FRAGMENT_NODE() ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; --- 478,482 ---- # Handle document fragments ! if ( $newNode -> nodeType() == $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; *************** *** 691,695 **** # Handle document fragments ! if ( $newNode -> nodeType() == &DOCUMENT_FRAGMENT_NODE() ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; --- 674,678 ---- # Handle document fragments ! if ( $newNode -> nodeType() == $XML::DOM2::Node::DOCUMENT_FRAGMENT_NODE ) { my $children = $newNode -> childNodes(); my $l = $children -> length() - 1; Index: NodeList.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NodeList.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NodeList.pm 9 May 2002 19:09:41 -0000 1.11 --- NodeList.pm 11 May 2002 13:10:23 -0000 1.12 *************** *** 11,20 **** use strict; package XML::DOM2::NodeList; ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; #-------------------------------------------------------- --- 11,20 ---- use strict; package XML::DOM2::NodeList; ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- Index: Notation.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Notation.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Notation.pm 17 Mar 2002 19:26:15 -0000 1.3 --- Notation.pm 11 May 2002 13:10:23 -0000 1.4 *************** *** 12,16 **** package XML::DOM2::Notation; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Notation; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 66,70 **** sub nodeType { my ($this) = @_; ! $this -> NOTATION_NODE(); } --- 66,70 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::NOTATION_NODE; } Index: ProcessingInstruction.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/ProcessingInstruction.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ProcessingInstruction.pm 17 Mar 2002 19:26:15 -0000 1.4 --- ProcessingInstruction.pm 11 May 2002 13:10:23 -0000 1.5 *************** *** 12,16 **** package XML::DOM2::ProcessingInstruction; use base qw(XML::DOM2::Node); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::ProcessingInstruction; use base qw(XML::DOM2::Node); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 145,149 **** sub nodeType { my ($this) = @_; ! $this -> PROCESSING_INSTRUCTION_NODE(); } --- 145,149 ---- sub nodeType { my ($this) = @_; ! $XML::DOM2::Node::PROCESSING_INSTRUCTION_NODE; } Index: Text.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Text.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Text.pm 17 Mar 2002 19:26:15 -0000 1.5 --- Text.pm 11 May 2002 13:10:23 -0000 1.6 *************** *** 12,16 **** package XML::DOM2::Text; use base qw(XML::DOM2::CharacterData); ! use vars qw($VERSION); use XML::DOM2::DOMException; --- 12,16 ---- package XML::DOM2::Text; use base qw(XML::DOM2::CharacterData); ! use XML::DOM2::DOMException; *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 19,23 ---- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; *************** *** 153,157 **** sub nodeType() { my ($this) = @_; ! $this -> TEXT_NODE(); } --- 153,157 ---- sub nodeType() { my ($this) = @_; ! $XML::DOM2::Node::TEXT_NODE; } Index: XMLDOMWriterStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/XMLDOMWriterStyle.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** XMLDOMWriterStyle.pm 17 Mar 2002 19:27:57 -0000 1.2 --- XMLDOMWriterStyle.pm 11 May 2002 13:10:23 -0000 1.3 *************** *** 12,21 **** package XML::DOM2::XMLDOMWriterStyle; use base qw(XML::DOM2::DOMWriterStyle); ! use vars qw($VERSION); #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! $VERSION = '1.0'; --- 12,21 ---- package XML::DOM2::XMLDOMWriterStyle; use base qw(XML::DOM2::DOMWriterStyle); ! #-------------------------------------------------------- # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; Index: notes.txt =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/notes.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** notes.txt 26 Apr 2002 10:50:52 -0000 1.6 --- notes.txt 11 May 2002 13:10:23 -0000 1.7 *************** *** 42,45 **** --- 42,48 ---- sources and the W3C specs. + The following requirements have to be met in order to use this package + + * Perl 5.6 or higher |