Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv1943 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 Log Message: Index: Attr.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Attr.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Attr.pm 11 May 2002 13:10:23 -0000 1.6 --- Attr.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Attr # $Id$ # --- 1,4 ---- *************** *** 13,23 **** use base qw(XML::DOM2::Node); - use XML::DOM2::DOMException; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; --- 12,17 ---- *************** *** 75,80 **** # that an XML processor would recognize as markup are instead treated # as literal text. ! # @param (optional) a hash reference containing the following key-value-pairs ! # value - the new value of the string. # @return the value of this attribute. #*/ --- 69,74 ---- # that an XML processor would recognize as markup are instead treated # as literal text. ! # @optional a hash reference containing the following key-value-pairs ! # <ul><li>value - the new value of the string.</li></ul> # @return the value of this attribute. #*/ *************** *** 182,186 **** if ( $deep ) { my $children = $this -> childNodes(); ! for ( 0..$children -> length() - 1 ) { $newNode -> appendChild( { newChild => $children -> --- 176,181 ---- if ( $deep ) { my $children = $this -> childNodes(); ! my $len = $children -> length() - 1; ! for ( 0.. $len ) { $newNode -> appendChild( { newChild => $children -> *************** *** 201,203 **** } ! --- 196,198 ---- } ! 1; # make require happy Index: CDATASection.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CDATASection.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CDATASection.pm 11 May 2002 13:10:23 -0000 1.6 --- CDATASection.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class CDATASection # $Id$ # --- 1,4 ---- *************** *** 16,24 **** use XML::DOM2::DOMException; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - #-------------------------------------------------------- --- 15,18 ---- *************** *** 43,47 **** sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 37,41 ---- sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 54,58 **** sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 48,52 ---- sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 65,69 **** sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 59,63 ---- sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 77,81 **** sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 71,75 ---- sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 108,109 **** --- 102,105 ---- $newNode; } + + 1; # make require happy Index: CharacterData.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/CharacterData.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CharacterData.pm 11 May 2002 13:10:23 -0000 1.6 --- CharacterData.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class CharacterData # $Id$ # --- 1,4 ---- *************** *** 13,26 **** use base qw(XML::DOM2::Node); - use XML::DOM2::DOMException; #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 12,18 ---- *************** *** 85,89 **** if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : --- 77,81 ---- if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : *************** *** 125,129 **** if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : --- 117,121 ---- if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : *************** *** 153,157 **** if ($offset < 0 || $offset > $this -> length() ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => ($offset < 0 ? "The offset is less than 0." : "The offset is greater than the data length.") --- 145,149 ---- if ($offset < 0 || $offset > $this -> length() ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => ($offset < 0 ? "The offset is less than 0." : "The offset is greater than the data length.") *************** *** 183,187 **** if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : --- 175,179 ---- if ($offset < 0 || $offset > $this -> length() || $count < 0 ) { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => ($offset < 0 ? "The offset is less than 0." : $count < 0 ? "The count is less than 0." : *************** *** 198,199 **** --- 190,192 ---- } + 1; # make require happy Index: Comment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Comment.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Comment.pm 11 May 2002 13:10:23 -0000 1.6 --- Comment.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Comment # $Id$ # --- 1,4 ---- *************** *** 16,23 **** use XML::DOM2::DOMException; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; --- 15,18 ---- *************** *** 43,47 **** sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 38,42 ---- sub appendChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 54,58 **** sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 49,53 ---- sub removeChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 65,69 **** sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 60,64 ---- sub replaceChild { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 77,81 **** sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => XML::DOM2::DOMException -> INVALID_ACCESS_ERR(), ErrDesc => "This node cannot have children." } ); --- 72,76 ---- sub insertBefore { my $exc = XML::DOM2::DOMException -> new ( ! { ErrCode => $XML::DOM2::DOMException::INVALID_ACCESS_ERR, ErrDesc => "This node cannot have children." } ); *************** *** 109,110 **** --- 104,107 ---- $newNode; } + + 1; # make require happy Index: DOMException.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMException.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DOMException.pm 11 May 2002 13:10:23 -0000 1.8 --- DOMException.pm 2 Jun 2002 19:37:40 -0000 1.9 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMException # $Id$ # --- 1,4 ---- *************** *** 17,21 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- --- 16,20 ---- # Globals #-------------------------------------------------------- ! #-------------------------------------------------------- *************** *** 23,41 **** #-------------------------------------------------------- ! sub INDEX_SIZE_ERR { 1; } ! sub DOMSTRING_SIZE_ERR { 2; } ! sub HIERARCHY_REQUEST_ERR { 3; } ! sub WRONG_DOCUMENT_ERR { 4; } ! sub INVALID_CHARACTER_ERR { 5; } ! sub NO_DATA_ALLOWED_ERR { 6; } ! sub NO_MODIFICATION_ALLOWED_ERR { 7; } ! sub NOT_FOUND_ERR { 8; } ! sub NOT_SUPPORTED_ERR { 9; } ! sub INUSE_ATTRIBUTE_ERR { 10; } ! sub INVALID_STATE_ERR { 11; } ! sub SYNTAX_ERR { 12; } ! sub INVALID_MODIFICATION_ERR { 13; } ! sub NAMESPACE_ERR { 14; } ! sub INVALID_ACCESS_ERR { 15; } #-------------------------------------------------------- --- 22,46 ---- #-------------------------------------------------------- ! use vars qw( $INDEX_SIZE_ERR $DOMSTRING_SIZE_ERR $HIERARCHY_REQUEST_ERR ! $WRONG_DOCUMENT_ERR $INVALID_CHARACTER_ERR $NO_DATA_ALLOWED_ERR ! $NO_MODIFICATION_ALLOWED_ERR $NOT_FOUND_ERR $NOT_SUPPORTED_ERR ! $INUSE_ATTRIBUTE_ERR $INVALID_STATE_ERR $SYNTAX_ERR ! $INVALID_MODIFICATION_ERR $NAMESPACE_ERR $INVALID_ACCESS_ERR ); ! ! $INDEX_SIZE_ERR = 1; ! $DOMSTRING_SIZE_ERR = 2; ! $HIERARCHY_REQUEST_ERR = 3; ! $WRONG_DOCUMENT_ERR = 4; ! $INVALID_CHARACTER_ERR = 5; ! $NO_DATA_ALLOWED_ERR = 6; ! $NO_MODIFICATION_ALLOWED_ERR = 7; ! $NOT_FOUND_ERR = 8; ! $NOT_SUPPORTED_ERR = 9; ! $INUSE_ATTRIBUTE_ERR = 10; ! $INVALID_STATE_ERR = 11; ! $SYNTAX_ERR = 12; ! $INVALID_MODIFICATION_ERR = 13; ! $NAMESPACE_ERR = 14; ! $INVALID_ACCESS_ERR = 15; #-------------------------------------------------------- *************** *** 97,143 **** } ! if ($errCode == &DOMSTRING_SIZE_ERR) { return "The specified range of text does not fit into a DOMString."; } ! if ($errCode == &HIERARCHY_REQUEST_ERR ) { return "A node was inserted where it does not belong."; } ! if ($errCode == &INDEX_SIZE_ERR ) { return "Index or size is negative or greater than the allowed value."; } ! if ($errCode == &INUSE_ATTRIBUTE_ERR ) { return "An attempt was made to add an attribute that is already in use."; } ! if ($errCode == &INVALID_ACCESS_ERR ) { return "A parameter or an operation is not supported by the object."; } ! if ($errCode == &INVALID_CHARACTER_ERR ) { return "An invalid or illegal character was specified."; } ! if ($errCode == &INVALID_MODIFICATION_ERR ) { return "An attempt was made to modify the type of an underlying object."; } ! if ($errCode == &INVALID_STATE_ERR ) { return "An attempt was made to use an object that is not or no longer useable."; } ! if ($errCode == &NAMESPACE_ERR ) { return "An attempt was made to change or create an object in a way that is incorrect with regard to namespaces."; } ! if ($errCode == &NOT_FOUND_ERR ) { return "An attempt was made to reference a node in a context where it does not exist."; } ! if ($errCode == &NOT_SUPPORTED_ERR ) { return "The requested type or operation is not (yet) supported."; } ! if ($errCode == &NO_DATA_ALLOWED_ERR ) { return "Data was specified for a node which does not support data."; } ! if ($errCode == &NO_MODIFICATION_ALLOWED_ERR ) { return "An attempt was made to modify an object where no modification is allowed."; } ! if ($errCode == &SYNTAX_ERR ) { return "An invalid or illegal string was specified."; } ! if ($errCode == &WRONG_DOCUMENT_ERR ) { return "A node is used in a different document than the one that created it."; } --- 102,148 ---- } ! if ($errCode == $DOMSTRING_SIZE_ERR) { return "The specified range of text does not fit into a DOMString."; } ! if ($errCode == $HIERARCHY_REQUEST_ERR ) { return "A node was inserted where it does not belong."; } ! if ($errCode == $INDEX_SIZE_ERR ) { return "Index or size is negative or greater than the allowed value."; } ! if ($errCode == $INUSE_ATTRIBUTE_ERR ) { return "An attempt was made to add an attribute that is already in use."; } ! if ($errCode == $INVALID_ACCESS_ERR ) { return "A parameter or an operation is not supported by the object."; } ! if ($errCode == $INVALID_CHARACTER_ERR ) { return "An invalid or illegal character was specified."; } ! if ($errCode == $INVALID_MODIFICATION_ERR ) { return "An attempt was made to modify the type of an underlying object."; } ! if ($errCode == $INVALID_STATE_ERR ) { return "An attempt was made to use an object that is not or no longer useable."; } ! if ($errCode == $NAMESPACE_ERR ) { return "An attempt was made to change or create an object in a way that is incorrect with regard to namespaces."; } ! if ($errCode == $NOT_FOUND_ERR ) { return "An attempt was made to reference a node in a context where it does not exist."; } ! if ($errCode == $NOT_SUPPORTED_ERR ) { return "The requested type or operation is not (yet) supported."; } ! if ($errCode == $NO_DATA_ALLOWED_ERR ) { return "Data was specified for a node which does not support data."; } ! if ($errCode == $NO_MODIFICATION_ALLOWED_ERR ) { return "An attempt was made to modify an object where no modification is allowed."; } ! if ($errCode == $SYNTAX_ERR ) { return "An invalid or illegal string was specified."; } ! if ($errCode == $WRONG_DOCUMENT_ERR ) { return "A node is used in a different document than the one that created it."; } Index: DOMImplementation.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMImplementation.pm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DOMImplementation.pm 11 May 2002 13:10:23 -0000 1.6 --- DOMImplementation.pm 2 Jun 2002 19:37:40 -0000 1.7 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMImplementation # $Id$ # --- 1,4 ---- *************** *** 15,22 **** use XML::DOM2::DOMException; use XML::DOM2::DocumentType; ! #-------------------------------------------------------- ! # Globals ! #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- --- 14,18 ---- use XML::DOM2::DOMException; use XML::DOM2::DocumentType; ! #-------------------------------------------------------- *************** *** 100,104 **** if ( defined($doctype -> ownerDocument()) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The specified Doctype has been used with another document!" }); --- 96,100 ---- if ( defined($doctype -> ownerDocument()) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The specified Doctype has been used with another document!" }); *************** *** 120,124 **** } ! --- 116,120 ---- } ! 1; # make require happy Index: DOMParser.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParser.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DOMParser.pm 11 May 2002 13:10:23 -0000 1.4 --- DOMParser.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMParser # $Id$ # --- 1,4 ---- *************** *** 19,28 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 18,21 ---- *************** *** 59,62 **** --- 52,70 ---- $this -> { m_contextElement } = undef; $this -> { m_document } = undef; + + + # create new document + $this -> { m_document } = + $this -> { m_DOMImplementation } -> createDocument( { + qualifiedName => "dummy", + namespaceURI => "dummy" + } ); + + # remove the dummy element. + my $docEl = $this -> { m_document } -> documentElement(); + $this -> { m_document } -> removeChild( { oldChild => $docEl } ); + + $this -> { m_contextElement } = $this -> { m_document }; + return $this; } *************** *** 131,154 **** my $prefix = $prefixMap{$namespaceURI}; ! if ( !defined( $this -> { m_document } ) ) { ! # create new document ! $this -> { m_document } = ! $this -> { m_DOMImplementation } -> createDocument( { ! qualifiedName => defined($prefix) ? $prefix.":".$element : $element, ! namespaceURI => $namespaceURI ! } ); ! # get the root node ! $elementNode = $this -> { m_document } -> documentElement(); ! } ! else { ! $elementNode = $this -> { m_document } -> createElementNS( { ! qualifiedName => defined($prefix) ? $prefix.":".$element : $element, ! namespaceURI => $namespaceURI ! } ); ! # get currently innermost open Element. ! # and append this element to it. ! my $parentNode = $this -> { m_contextElement }; ! $parentNode -> appendChild( { newChild => $elementNode } ); ! } # add any attributes while( @attrList ) { --- 139,151 ---- my $prefix = $prefixMap{$namespaceURI}; ! $elementNode = $this -> { m_document } -> createElementNS( { ! qualifiedName => defined($prefix) ? $prefix.":".$element : $element, ! namespaceURI => $namespaceURI ! } ); ! # get currently innermost open Element. ! # and append this element to it. ! my $parentNode = $this -> { m_contextElement }; ! $parentNode -> appendChild( { newChild => $elementNode } ); ! # add any attributes while( @attrList ) { *************** *** 241,245 **** # no idea what happens here, CDATA is currently not supported. my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => XML::DOM2::DOMException -> ERR_NOT_SUPPORTED(), ErrDesc => "The DOMParser currently does not support CDATA sections." }); --- 238,242 ---- # no idea what happens here, CDATA is currently not supported. my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => $XML::DOM2::DOMException::ERR_NOT_SUPPORTED, ErrDesc => "The DOMParser currently does not support CDATA sections." }); *************** *** 255,259 **** # no idea what happens here, CDATA is currently not supported. my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => XML::DOM2::DOMException -> ERR_NOT_SUPPORTED(), ErrDesc => "The DOMParser currently does not support CDATA sections." }); --- 252,256 ---- # no idea what happens here, CDATA is currently not supported. my $exc = XML::DOM2::DOMException -> new( { ! ErrCode => $XML::DOM2::DOMException::ERR_NOT_SUPPORTED, ErrDesc => "The DOMParser currently does not support CDATA sections." }); *************** *** 318,319 **** --- 315,317 ---- } + 1; # make require happy Index: DOMParserStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMParserStyle.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DOMParserStyle.pm 11 May 2002 13:10:23 -0000 1.4 --- DOMParserStyle.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMParserStyle # $Id$ # --- 1,4 ---- *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; --- 18,22 ---- # Globals #-------------------------------------------------------- ! Index: DOMWriter.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriter.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DOMWriter.pm 11 May 2002 13:10:23 -0000 1.3 --- DOMWriter.pm 2 Jun 2002 19:37:40 -0000 1.4 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMWriter # $Id$ # --- 1,4 ---- *************** *** 15,23 **** use XML::DOM2::Node; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - #-------------------------------------------------------- --- 14,17 ---- *************** *** 108,111 **** } ! --- 102,105 ---- } ! 1; # make require happy Index: DOMWriterStyle.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DOMWriterStyle.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DOMWriterStyle.pm 11 May 2002 13:10:23 -0000 1.2 --- DOMWriterStyle.pm 2 Jun 2002 19:37:40 -0000 1.3 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DOMWriterStyle # $Id$ # --- 1,4 ---- *************** *** 14,23 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 13,16 ---- *************** *** 110,112 **** } ! --- 103,105 ---- } ! 1; # make require happy Index: Document.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Document.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Document.pm 11 May 2002 13:10:23 -0000 1.7 --- Document.pm 2 Jun 2002 19:37:40 -0000 1.8 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Document # $Id$ # --- 1,4 ---- *************** *** 25,33 **** - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - #-------------------------------------------------------- --- 24,27 ---- *************** *** 125,129 **** if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" }); --- 119,123 ---- if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" }); *************** *** 136,140 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); --- 130,134 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); *************** *** 146,150 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); --- 140,144 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); *************** *** 246,250 **** if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The qualified name (".$paramRef->{ qualifiedName }.") has a prefix, but the namespace URI is undef!" }); --- 240,244 ---- if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The qualified name (".$paramRef->{ qualifiedName }.") has a prefix, but the namespace URI is undef!" }); *************** *** 257,261 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); --- 251,255 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); *************** *** 267,271 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); --- 261,265 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); *************** *** 457,461 **** if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "This document already has a document element. You can only add one ". "Element to a document.Cannot append." --- 451,455 ---- if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "This document already has a document element. You can only add one ". "Element to a document.Cannot append." *************** *** 489,493 **** if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "This document already has a document element. You can only add one ". "Element to a document.Cannot insert." --- 483,487 ---- if ( $this -> documentElement() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "This document already has a document element. You can only add one ". "Element to a document.Cannot insert." *************** *** 512,514 **** } ! --- 506,508 ---- } ! 1; # make require happy Index: DocumentFragment.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DocumentFragment.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocumentFragment.pm 11 May 2002 13:10:23 -0000 1.4 --- DocumentFragment.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DocumentFragment # $Id$ # --- 1,4 ---- *************** *** 17,26 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 16,19 ---- *************** *** 58,60 **** $newNode; } ! --- 51,53 ---- $newNode; } ! 1; # make require happy Index: DocumentType.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/DocumentType.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** DocumentType.pm 11 May 2002 13:10:23 -0000 1.4 --- DocumentType.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class DocumentType # $Id$ # --- 1,4 ---- *************** *** 18,27 **** #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - - #-------------------------------------------------------- # Methods #-------------------------------------------------------- --- 17,20 ---- *************** *** 113,115 **** --- 106,109 ---- } + 1; # make require happy Index: Element.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Element.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Element.pm 11 May 2002 13:10:23 -0000 1.7 --- Element.pm 2 Jun 2002 19:37:40 -0000 1.8 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Element # $Id$ # --- 1,4 ---- *************** *** 21,25 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; --- 20,24 ---- # Globals #-------------------------------------------------------- ! *************** *** 171,175 **** # first search all own children. my $children = $this -> childNodes(); ! my $length -> $children -> length(); for ( 0..$length-1 ) { --- 170,174 ---- # first search all own children. my $children = $this -> childNodes(); ! my $length = $children -> length(); for ( 0..$length-1 ) { *************** *** 218,222 **** # first search all own children. my $children = $this -> childNodes(); ! my $length -> $children -> length(); for ( 0..$length-1 ) { --- 217,221 ---- # first search all own children. my $children = $this -> childNodes(); ! my $length = $children -> length(); for ( 0..$length-1 ) { *************** *** 326,330 **** else { my $exc = XML::DOM2::DOMException( ! { ErrCode => XML::DOM2::DOMException -> NOT_FOUND_ERR(), ErrDesc => "The attribute is no attribute of this element!" }); --- 325,329 ---- else { my $exc = XML::DOM2::DOMException( ! { ErrCode => $XML::DOM2::DOMException::NOT_FOUND_ERR, ErrDesc => "The attribute is no attribute of this element!" }); *************** *** 387,391 **** if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" }); --- 386,390 ---- if ( defined($prefix) && !defined($namespaceURI) ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The qualified name (".$paramRef -> { qualifiedName }.") has a prefix, but the namespace URI is undef!" }); *************** *** 398,402 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); --- 397,401 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xml' but the namespace URI is different from 'http://www.w3.org/XML/1998/namespace'!" }); *************** *** 408,412 **** my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); --- 407,411 ---- my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix is 'xmlns' but the namespace URI is different from 'http://www.w3.org/2000/xmlsn'!" }); *************** *** 444,448 **** if ( $attribute -> ownerDocument() != $this -> ownerDocument() ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The Attribute you were trying to add was created with a different document!" }); --- 443,447 ---- if ( $attribute -> ownerDocument() != $this -> ownerDocument() ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The Attribute you were trying to add was created with a different document!" }); *************** *** 453,457 **** my $exc = XML::DOM2::DOMExcpetion -> new ( { ! ErrCode => XML::DOM2::DOMException -> INUSE_ATTRIBUTE_ERR(), ErrCode => "The Attribute you were trying to add, is an Attribute of another Element!" } ) --- 452,456 ---- my $exc = XML::DOM2::DOMExcpetion -> new ( { ! ErrCode => $XML::DOM2::DOMException::INUSE_ATTRIBUTE_ERR, ErrCode => "The Attribute you were trying to add, is an Attribute of another Element!" } ) *************** *** 482,486 **** if ( $attribute -> ownerDocument() != $this -> ownerDocument() ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The Attribute you were trying to add was created with a different document!" }); --- 481,485 ---- if ( $attribute -> ownerDocument() != $this -> ownerDocument() ) { my $exc = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The Attribute you were trying to add was created with a different document!" }); *************** *** 491,495 **** my $exc = XML::DOM2::DOMExcpetion -> new ( { ! ErrCode => XML::DOM2::DOMException -> INUSE_ATTRIBUTE_ERR(), ErrCode => "The Attribute you were trying to add, is an Attribute of another Element!" } ) --- 490,494 ---- my $exc = XML::DOM2::DOMExcpetion -> new ( { ! ErrCode => $XML::DOM2::DOMException::INUSE_ATTRIBUTE_ERR, ErrCode => "The Attribute you were trying to add, is an Attribute of another Element!" } ) *************** *** 566,570 **** #copy attributes my $attributes = $this -> attributes(); ! for ( 0..$attributes -> length() -1 ) { $newNode -> setAttributeNodeNS( { newAttr => $attributes -> item ( { index => $_ } ) -> cloneNode( { deep => 1 } ) --- 565,570 ---- #copy attributes my $attributes = $this -> attributes(); ! my $length = $attributes -> length() -1; ! for ( 0..$length ) { $newNode -> setAttributeNodeNS( { newAttr => $attributes -> item ( { index => $_ } ) -> cloneNode( { deep => 1 } ) *************** *** 575,579 **** if ( $deep ) { my $children = $this -> childNodes(); ! for ( 0..$children -> length() - 1 ) { $newNode -> appendChild( { newChild => $children -> --- 575,580 ---- if ( $deep ) { my $children = $this -> childNodes(); ! my $len = $children -> length() -1; ! for ( 0..$len ) { $newNode -> appendChild( { newChild => $children -> *************** *** 585,587 **** } ! --- 586,588 ---- } ! 1; # make require happy Index: Entity.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Entity.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Entity.pm 11 May 2002 13:10:23 -0000 1.4 --- Entity.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Entity # $Id$ # --- 1,4 ---- *************** *** 19,23 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; --- 18,22 ---- # Globals #-------------------------------------------------------- ! Index: EntityReference.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/EntityReference.pm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** EntityReference.pm 11 May 2002 13:10:23 -0000 1.4 --- EntityReference.pm 2 Jun 2002 19:37:40 -0000 1.5 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class EntityReference # $Id$ # --- 1,4 ---- *************** *** 16,24 **** use XML::DOM2::DOMException; - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - #-------------------------------------------------------- --- 15,18 ---- *************** *** 35,37 **** } ! --- 29,31 ---- } ! 1; # make require happy Index: NamedNodeMap.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NamedNodeMap.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** NamedNodeMap.pm 11 May 2002 13:10:23 -0000 1.9 --- NamedNodeMap.pm 2 Jun 2002 19:37:40 -0000 1.10 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class NamedNodeMap # $Id$ # --- 1,4 ---- *************** *** 12,25 **** package XML::DOM2::NamedNodeMap; - - #-------------------------------------------------------- - # Globals - #-------------------------------------------------------- - our $VERSION = '1.0'; - - #-------------------------------------------------------- - # Constants - #-------------------------------------------------------- - #-------------------------------------------------------- # Methods --- 11,14 ---- *************** *** 198,200 **** $node -> localName() } = $node; } ! --- 187,189 ---- $node -> localName() } = $node; } ! 1; # make require happy Index: Node.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/Node.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Node.pm 11 May 2002 13:10:23 -0000 1.17 --- Node.pm 2 Jun 2002 19:37:40 -0000 1.18 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class Node # $Id$ # --- 1,4 ---- *************** *** 12,16 **** # This class implements a DOM Node. Its the base class of most DOM # Interfaces. ! # @author Jan Thomä #*/ use strict; --- 11,15 ---- # This class implements a DOM Node. Its the base class of most DOM # Interfaces. ! # @author Jan Thomä (ko...@in...) #*/ use strict; *************** *** 20,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; #-------------------------------------------------------- --- 19,42 ---- #-------------------------------------------------------- # Constants #-------------------------------------------------------- ! use vars qw( $ELEMENT_NODE $ATTRIBUTE_NODE $TEXT_NODE $CDATA_SECTION_NODE ! $ENTITY_REFERENCE_NODE $ENTITY_NODE $PROCESSING_INSTRUCTION_NODE ! $COMMENT_NODE $DOCUMENT_NODE $DOCUMENT_TYPE_NODE $DOCUMENT_FRAGMENT_NODE ! $NOTATION_NODE ); ! ! $ELEMENT_NODE = 1; ! $ATTRIBUTE_NODE = 2; ! $TEXT_NODE = 3; ! $CDATA_SECTION_NODE = 4; ! $ENTITY_REFERENCE_NODE = 5; ! $ENTITY_NODE = 6; ! $PROCESSING_INSTRUCTION_NODE = 7; ! $COMMENT_NODE = 8; ! $DOCUMENT_NODE = 9; ! $DOCUMENT_TYPE_NODE = 10; ! $DOCUMENT_FRAGMENT_NODE = 11; ! $NOTATION_NODE = 12; #-------------------------------------------------------- *************** *** 289,293 **** if ( ! defined( $namespaceURI ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The namespace URI of this node is UNDEF." } --- 288,292 ---- if ( ! defined( $namespaceURI ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The namespace URI of this node is UNDEF." } *************** *** 300,304 **** $this -> namespaceURI() ne "http://www.w3.org/XML/1998/namespace" ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NAMESPACE_ERR(), ErrDesc => "The prefix \"xml\" can only be used, if the ". "namespace URI of this node is ". --- 299,303 ---- $this -> namespaceURI() ne "http://www.w3.org/XML/1998/namespace" ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NAMESPACE_ERR, ErrDesc => "The prefix \"xml\" can only be used, if the ". "namespace URI of this node is ". *************** *** 357,361 **** unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The given node was created from a different". "document than the one that created this node. ". --- 356,360 ---- unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The given node was created from a different". "document than the one that created this node. ". *************** *** 370,374 **** if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot append." --- 369,373 ---- if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot append." *************** *** 426,430 **** sub cloneNode { my $exception = XML::DOM2::DOMException -> new ( { ! ErrCode => XML::DOM2::DOMException -> NOT_SUPPORTED_ERR(), ErrDesc => "Cloning of this node type is not supported by this implementation." }); --- 425,429 ---- sub cloneNode { my $exception = XML::DOM2::DOMException -> new ( { ! ErrCode => $XML::DOM2::DOMException::NOT_SUPPORTED_ERR, ErrDesc => "Cloning of this node type is not supported by this implementation." }); *************** *** 491,495 **** unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The given node was created from a different". "document than the one that created this node. ". --- 490,494 ---- unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The given node was created from a different". "document than the one that created this node. ". *************** *** 504,508 **** if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot insert." --- 503,507 ---- if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot insert." *************** *** 518,522 **** if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NOT_FOUND_ERR(), ErrDesc => "The given reference node is not a child of ". "this node. Cannot insert." --- 517,521 ---- if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NOT_FOUND_ERR, ErrDesc => "The given reference node is not a child of ". "this node. Cannot insert." *************** *** 591,595 **** my ( $this ) = @_; my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NOT_SUPPORTED_ERR(), ErrDesc => "Node normalization is not yet supported by this implementation." } --- 590,594 ---- my ( $this ) = @_; my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NOT_SUPPORTED_ERR, ErrDesc => "Node normalization is not yet supported by this implementation." } *************** *** 620,624 **** if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NOT_FOUND_ERR(), ErrDesc => "The given reference node is not a child of ". "this node. Cannot remove." --- 619,623 ---- if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NOT_FOUND_ERR, ErrDesc => "The given reference node is not a child of ". "this node. Cannot remove." *************** *** 687,691 **** unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> WRONG_DOCUMENT_ERR(), ErrDesc => "The given node was created from a different". "document than the one that created this node. ". --- 686,690 ---- unless ( $this -> ownerDocument() == $newNode -> ownerDocument() ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::WRONG_DOCUMENT_ERR, ErrDesc => "The given node was created from a different". "document than the one that created this node. ". *************** *** 700,704 **** if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> HIERARCHY_REQUEST_ERR(), ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot replace." --- 699,703 ---- if ( $this -> isAncestor( { aNode => $newNode } ) ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::HIERARCHY_REQUEST_ERR, ErrDesc => "The given node is an ancestor of this node ". "or the node itself. Cannot replace." *************** *** 714,718 **** if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> NOT_FOUND_ERR(), ErrDesc => "The given reference node is not a child of ". "this node. Cannot replace." --- 713,717 ---- if ( $index == -1 ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::NOT_FOUND_ERR, ErrDesc => "The given reference node is not a child of ". "this node. Cannot replace." *************** *** 780,782 **** } ! --- 779,781 ---- } ! 1; # make require happy Index: NodeList.pm =================================================================== RCS file: /cvsroot/net-script/netscript2/src/perl/XML/DOM2/NodeList.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** NodeList.pm 11 May 2002 13:10:23 -0000 1.12 --- NodeList.pm 2 Jun 2002 19:37:40 -0000 1.13 *************** *** 1,5 **** #-------------------------------------------------------- # DOM Level 2 Implementation for Perl - # Class NodeList # $Id$ # --- 1,4 ---- *************** *** 16,20 **** # Globals #-------------------------------------------------------- ! our $VERSION = '1.0'; #-------------------------------------------------------- --- 15,19 ---- # Globals #-------------------------------------------------------- ! #-------------------------------------------------------- *************** *** 60,66 **** my $index = $paramsRef -> { 'index' }; ! if ( $index < 0 || $index >= $this -> { m_length } ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => XML::DOM2::DOMException -> INDEX_SIZE_ERR(), ErrDesc => "The given index is not valid. ( 0 < ".$index." < ". $this -> length() ." )." --- 59,65 ---- my $index = $paramsRef -> { 'index' }; ! if ( $index < 0 || $index >= $this -> { m_length } || $index eq "" ) { my $exception = XML::DOM2::DOMException -> new( ! { ErrCode => $XML::DOM2::DOMException::INDEX_SIZE_ERR, ErrDesc => "The given index is not valid. ( 0 < ".$index." < ". $this -> length() ." )." *************** *** 115,119 **** if ( $index < 0 || $index >= $this -> { m_length } ) { my $exception = X... [truncated message content] |