From: Jan T. <de...@us...> - 2002-01-01 17:53:37
|
Update of /cvsroot/net-script/netscript2/src/perl/XML/DOM2 In directory usw-pr-cvs1:/tmp/cvs-serv22794 Added Files: Document.pm DocumentFragment.pm DocumentType.pm Entity.pm EntityReference.pm Notation.pm Log Message: * initial checkin --- NEW FILE: Document.pm --- #-------------------------------------------------------- # DOM Level 2 Implementation for Perl # Class Document # $Id: Document.pm,v 1.1 2002/01/01 17:53:34 derkork Exp $ # # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- use strict; package XML::DOM2::Document; use base qw(XML::DOM2::Node); use vars qw($VERSION); use XML::DOM2::DOMException; #-------------------------------------------------------- # Globals #-------------------------------------------------------- $VERSION = '1.0'; #-------------------------------------------------------- # Methods #-------------------------------------------------------- #/** # Creates a new Processing instruction. # @return an instance of XML::DOM2::ProcessingInstruction # @public #*/ sub new { my ($proto) = shift; my $class = ref( $proto ) || $proto;# get the Classname my $this = $proto -> SUPER::new(@_); $this -> { m_doctype } = undef; $this -> { m_documentElement } = undef; $this -> { m_implementation } = undef; return $this; } #/** # Returns the document type declaration associated with this document. # If there was no DTD specified, or the document is an html document, # this is undef. # @return an instance of XML::DOM2::DocumentType or undef # @public #*/ sub doctype { my ($this) = @_; $this -> { m_doctype }; } #/** # This returns the root element of the document. # @return an instance of XML::DOM2::Element # @public #*/ sub documentElement { my ($this) = @_; $this -> firstChild(); } #/** # This returns the DOMImplementation object that handles this document. # @return an instance of XML::DOM2::DOMImplementation. # @public #*/ sub implementation { my ($this) = @_; } #... continue here ... sub nodeType { &DOCUMENT_NODE(); } --- NEW FILE: DocumentFragment.pm --- #-------------------------------------------------------- # DOM Level 2 Implementation for Perl # Class DocumentFragment # $Id: DocumentFragment.pm,v 1.1 2002/01/01 17:53:34 derkork Exp $ # # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- use strict; package XML::DOM2::DocumentFragment; use base qw(XML::DOM2::Node); use vars qw($VERSION); use XML::DOM2::DOMException; #-------------------------------------------------------- # Globals #-------------------------------------------------------- $VERSION = '1.0'; #-------------------------------------------------------- # Methods #-------------------------------------------------------- #/** # Returns DOCUMENT_FRAGMENT_NODE. # @public #*/ sub nodeType { &DOCUMENT_FRAGMENT_NODE(); } --- NEW FILE: DocumentType.pm --- #-------------------------------------------------------- # DOM Level 2 Implementation for Perl # Class DocumentType # $Id: DocumentType.pm,v 1.1 2002/01/01 17:53:34 derkork Exp $ # # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- use strict; package XML::DOM2::DocumentType; use base qw(XML::DOM2::Node); use vars qw($VERSION); use XML::DOM2::DOMException; use XML::DOM2::NamedNodeMap; #-------------------------------------------------------- # Globals #-------------------------------------------------------- $VERSION = '1.0'; #-------------------------------------------------------- # Methods #-------------------------------------------------------- #/** # Creates a new XML::DOM2::DocumentType. # @return an instance of XML::DOM2::DocumentType #*/ sub new { my ($proto) = shift; my $class = ref( $proto ) || $proto;# get the Classname my $this = $proto -> SUPER::new(@_); $this -> { m_name } = ""; $this -> { m_entities } = XML::DOM2::NamedNodeMap -> new(); $this -> { m_notation } = XML::DOM2::NamedNodeMap -> new(); $this -> { m_publicId } = ""; $this -> { m_systemId } = ""; $this -> { m_internalSubset } = ""; return $this; } #/** # A XML::DOM2::NamedNodeMap that contains the general entities, both external # and internal, declared in the DTD. Parameter entities are not contained. # Duplicates are discarded. The mapping is "Entity Name" -> XML::DOM2::Entity # @public #*/ sub entities { my ($this) = @_; $this -> { m_entities }; } #/** # Returns the internal subset as a string. # @public #*/ sub internalSubset { my ($this) = @_; $this -> { m_internalSubset }; } #/** # Returns the name of the DTD, the name immediately following the # DOCTYPE-keyword. # @public #*/ sub name { my ($this) = @_; $this -> { m_name }; } #/** # Returns an XML::DOM2::NamedNodeMap containing the notations declared in # the DTD. Duplicates are discarded. # Mapping is "Notation Name" -> XML::DOM2::Notation. # @public #*/ sub notations { my ($this) = @_; $this -> { m_notations }; } #/** # Returns the public identifier of the external subset. # @public #*/ sub publicId { my ($this) = @_; $this -> { m_publicId }; } #/** # Returns the System identifier of the external subset. # @public #*/ sub systemId { my ($this) = @_; $this -> { m_systemId }; } #/** # Returns DOCUMENT_FRAGMENT_NODE. # @public #*/ sub nodeType { &DOCUMENT_TYPE_NODE(); } --- NEW FILE: Entity.pm --- #-------------------------------------------------------- # DOM Level 2 Implementation for Perl # Class Entity # $Id: Entity.pm,v 1.1 2002/01/01 17:53:34 derkork Exp $ # # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- use strict; package XML::DOM2::Entity; use base qw(XML::DOM2::Node); use vars qw($VERSION); use XML::DOM2::DOMException; #-------------------------------------------------------- # Globals #-------------------------------------------------------- $VERSION = '1.0'; #-------------------------------------------------------- # Methods #-------------------------------------------------------- #/** # Creates a new XML::DOM2::Entity # @return an instance of XML::DOM2::Entity #*/ sub new { my ($proto) = shift; my $class = ref( $proto ) || $proto;# get the Classname my $this = $proto -> SUPER::new(@_); $this -> { m_publicId } = ""; $this -> { m_systemId } = ""; $this -> { m_notationName } = ""; return $this; } #/** # For unparsed entites, the name of the notation for the entity. For # parsed entities this is undef; # @public #*/ sub notationName { my ($this) = @_; $this -> { m_notationName }; } #/** # The public identifier associated with the entity, if specified. If the # public identifier was not specified, this is undef. # @public #*/ sub publicId { my ($this) = @_; $this -> { m_publicId }; } #/** # The system identifier associated with the entity, if specified. If # the system identifier was not specified, this is undef. # @public #*/ sub systemId { my ($this) = @_; $this -> { m_systemId }; } #/** # Returns ENTITY_NODE # @public #*/ sub nodeType { &ENTITY_NODE(); } --- NEW FILE: EntityReference.pm --- #-------------------------------------------------------- # DOM Level 2 Implementation for Perl # Class EntityReference # $Id: EntityReference.pm,v 1.1 2002/01/01 17:53:34 derkork Exp $ # # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- use strict; package XML::DOM2::EntityReference; use base qw(XML::DOM2::Node); use vars qw($VERSION); use XML::DOM2::DOMException; #-------------------------------------------------------- # Globals #-------------------------------------------------------- $VERSION = '1.0'; #-------------------------------------------------------- # Methods #-------------------------------------------------------- #/** # Returns ENTITY_REFERENCE_NODE. # @public #*/ sub nodeType { &ENTITY_REFERENCE_NODE(); } --- NEW FILE: Notation.pm --- #-------------------------------------------------------- # DOM Level 2 Implementation for Perl # Class Notation # $Id: Notation.pm,v 1.1 2002/01/01 17:53:34 derkork Exp $ # # DOM2 and all related materials, such as documentation, # are protected under the terms and conditions of the Artistic License. # (C) 2000-2001 by Jan Thomä, insOMnia # mailto: ko...@in... #-------------------------------------------------------- use strict; package XML::DOM2::Notation; use base qw(XML::DOM2::Node); use vars qw($VERSION); use XML::DOM2::DOMException; #-------------------------------------------------------- # Globals #-------------------------------------------------------- $VERSION = '1.0'; #-------------------------------------------------------- # Methods #-------------------------------------------------------- #/** # Creates a new XML::DOM2::Entity # @return an instance of XML::DOM2::Entity #*/ sub new { my ($proto) = shift; my $class = ref( $proto ) || $proto;# get the Classname my $this = $proto -> SUPER::new(@_); $this -> { m_publicId } = ""; $this -> { m_systemId } = ""; return $this; } #/** # The public identifier of this notation. If the # public identifier was not specified, this is undef. # @public #*/ sub publicId { my ($this) = @_; $this -> { m_publicId }; } #/** # The system identifier if this notation. If # the system identifier was not specified, this is undef. # @public #*/ sub systemId { my ($this) = @_; $this -> { m_systemId }; } #/** # Returns NOTATION_NODE # @public #*/ sub nodeType { &NOTATION_NODE(); } |