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.14 date: 2023/09/28 09:57:01
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

** This method must be redefined in concrete classes (subclassResponsibility) **

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
(comment from inherited method)
return true if the receiver and the arg have the same structure.
Notice:
This method is partially open coded (inlined) by the compiler(s)
identical objects are always considered equal.
redefining it may not work as expected.

o  hash
(comment from inherited method)
return an Integer useful as a hash key for the receiver.
This hash should return same values for objects with same
contents (i.e. use this to hash on structure)

printing
o  printOn: aStream
(comment from inherited method)
self printAsOneLineOn: 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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 17:07:46 GMT