eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::Entity':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Entity (in XML)


Inheritance:

   Object
   |
   +--XML::Node
      |
      +--XML::Entity
         |
         +--XML::GeneralEntity
         |
         +--XML::ParameterEntity

Package:
stx:goodies/xml/vw
Category:
XML-VW-Nodes
Version:
rev: 1.10 date: 2013/07/03 07:04:19
user: stefan
file: Entity.st directory: goodies/xml/vw
module: stx stc-classLibrary: vw

Description:


An XML document may consist of one or many storage units called entities. All XML entities have content and are idententified by name. 

Entities may be either parsed or unparsed. This class and it's subclasses GeneralEntity and ParameterEntity represent parsed entities. These entities are invoked by name using entity references and their contents are held in the text instance variable

Entities may also be internal or external. If the content of the entity is given in the declaration (within the document) itself then the entity is called an internal entity. If the entity is not internal to the document and is declared elsewhere it's called an external entity. 

External entities have a system identifier (systemID instance variable) that is an URI which may be used to retrieve the entity. In addition to a system identifier, an external entity declaration may include a public identifier (publicID instance variable). The XMLParser may use the publicID to try to generate an alternative URI to retrive the entity's contents.

Subclasses must implement the following messages:
	accessing
		entityType

Instance Variables:
	name    <XML.NodeTag>  
				Identifies the entity in an entity referece
	text    <String>
				The entity's contents
	systemID        <String | XML.URIResolver>
				URI used to retrieve an external entity's contents
	publicID        <String | XML.URIResolver>
				name which (theoretically) could be looked up in a catalog to generate a URI. If catalogs are supported, this should be used in preference to the systemID.


Instance protocol:

accessing
o  entityType

o  externalFrom: anArray

o  name

o  name: aName

o  publicID
Needed for SAX, REW

o  streamFor: aParser

o  systemID
Needed for SAX, REW

o  text: aString

comparing
o  = anXmlEntity

o  hash

printing
o  printOn: aStream

testing
o  isEntity

o  isExternal

o  isParsed

visiting
o  acceptVisitor: aVisitor
Double dispatch back to the visitor, passing my type encoded in
the selector (visitor pattern)



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 06 Dec 2019 08:48:42 GMT