You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2002/08/27 21:50:37 UTC
cvs commit: xml-xerces/perl Xerces-extra.pm
jasons 2002/08/27 12:50:37
Modified: perl Xerces-extra.pm
Log:
* Xerces-extra.pm (Repository):
DOM_ => DOM
removed old methods for handling DOM/IDOM diffs
Revision Changes Path
1.6 +18 -43 xml-xerces/perl/Xerces-extra.pm
Index: Xerces-extra.pm
===================================================================
RCS file: /home/cvs/xml-xerces/perl/Xerces-extra.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Xerces-extra.pm 25 Apr 2002 06:26:50 -0000 1.5
+++ Xerces-extra.pm 27 Aug 2002 19:50:37 -0000 1.6
@@ -25,9 +25,9 @@
my $error = shift;
print STDERR "Error in eval: ";
if (ref $error) {
- if ($error->isa('XML::Xerces::DOM_DOMException')) {
+ if ($error->isa('XML::Xerces::DOMException')) {
croak "Message: <", $error->getMessage(),
- "> Code: ", $XML::Xerces::DOM_DOMException::CODES[$error->getCode];
+ "> Code: ", $XML::Xerces::DOMException::CODES[$error->getCode];
} else {
croak $error->getMessage();
}
@@ -162,7 +162,7 @@
sub reset_errors {}
-package XML::Xerces::DOM_NodeList;
+package XML::Xerces::DOMNodeList;
# convert the NodeList to a perl list
sub to_list {
my $self = shift;
@@ -197,7 +197,7 @@
return %hash;
}
-package XML::Xerces::DOM_NamedNodeMap;
+package XML::Xerces::DOMNamedNodeMap;
# convert the NamedNodeMap to a perl hash
sub to_hash {
my $self = shift;
@@ -209,7 +209,7 @@
return @list;
}
-package XML::Xerces::DOM_Node;
+package XML::Xerces::DOMNode;
sub to_hash {
my $self = shift;
return ($self->getNodeName,$self->getNodeValue);
@@ -227,7 +227,7 @@
return $node_value;
}
-package XML::Xerces::DOM_Entity;
+package XML::Xerces::DOMEntity;
sub to_hash {
my $self = shift;
if ($self->hasChildNodes) {
@@ -238,12 +238,12 @@
}
}
-package XML::Xerces::DOM_Text;
+package XML::Xerces::DOMText;
sub serialize {
return $_[0]->quote_content($_[0]->getNodeValue);
}
-package XML::Xerces::DOM_ProcessingInstruction;
+package XML::Xerces::DOMProcessingInstruction;
sub serialize {
my $output .= '<?' . $_[0]->getNodeName;
if (length(my $str = $_[0]->getNodeValue)) {
@@ -253,7 +253,7 @@
return $output;
}
-package XML::Xerces::DOM_Document;
+package XML::Xerces::DOMDocument;
sub serialize {
my $output;
my $indent = 2;
@@ -266,7 +266,7 @@
return "$output\n";
}
-package XML::Xerces::DOM_Element;
+package XML::Xerces::DOMElement;
sub serialize {
my ($self,$indent) = @_;
my $output;
@@ -298,7 +298,7 @@
return $output;
}
-package XML::Xerces::DOM_EntityReference;
+package XML::Xerces::DOMEntityReference;
sub serialize {
my ($self) = @_;
my $output;
@@ -311,17 +311,17 @@
return $output;
}
-package XML::Xerces::DOM_CDATASection;
+package XML::Xerces::DOMCDATASection;
sub serialize {
return '<![CDATA[' . $_[0]->getNodeValue . ']]>';
}
-package XML::Xerces::DOM_Comment;
+package XML::Xerces::DOMComment;
sub serialize {
return '<!--' . $_[0]->getNodeValue . "-->\n";
}
-package XML::Xerces::DOM_DocumentType;
+package XML::Xerces::DOMDocumentType;
sub serialize {
my $output;
$output .= '<!DOCTYPE ' . $_[0]->getNodeName;
@@ -344,7 +344,7 @@
return $output;
}
-package XML::Xerces::DOM_Entity;
+package XML::Xerces::DOMEntity;
sub serialize {
my $output;
$output .= '<!ENTITY ' . $_[0]->getNodeName;
@@ -358,7 +358,7 @@
return $output;
}
-package XML::Xerces::DOM_DOMException;
+package XML::Xerces::DOMException;
sub getMessage {
return shift->{msg};
}
@@ -367,39 +367,14 @@
return shift->{code};
}
-package XML::Xerces::DOM_Node;
-use Carp;
-sub isNull {
- carp("using DOM_Node::isNULL() is depricated");
- return 0;
-}
-
-sub actual_cast {
- carp("using DOM_Node::actual_cast() is depricated");
- return $_[0];
-}
-
-package XML::Xerces::DOM_Document;
-use Carp;
-sub createDocument {
- carp("using DOM_Document::createDocument() is depricated");
- return undef;
-}
-
-package XML::Xerces::DOMParser;
-use Carp;
-sub setToCreateXMLDeclTypeNode {
- carp("using DOMParser::setToCreateXMLDeclTypeNode() is depricated");
-}
-
-package XML::Xerces::DOM_Element;
+package XML::Xerces::DOMElement;
sub get_text {
my $node = shift;
my @nodes = $node->getChildNodes();
my $text;
foreach (@nodes) {
$text .= $_->getNodeValue()
- if $_->isa('XML::Xerces::DOM_Text');
+ if $_->isa('XML::Xerces::DOMText');
}
return $text;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org