eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::DocumentType':

Home

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

Class: DocumentType (in XML)


Inheritance:

   Object
   |
   +--XML::DocumentType

Package:
stx:goodies/xml/vw
Category:
XML-VW-Parsing
Version:
rev: 1.27 date: 2023/09/07 21:44:01
user: stefan
file: DocumentType.st directory: goodies/xml/vw
module: stx stc-classLibrary: vw

Description:


This class represents an XML document type definition or DTD. The document type declaration can point to an external subset containing markup declarations, or can contain the markup declarations directly in an internal subset, or can do both. The DTD for a document consists of both subsets taken together.

Instance Variables:
	attributeDefs   <Dictionary>
	elementDefs     <Dictionary>
	generalEntities <Dictionary>
	parameterEntities       <Dictionary>
	notations       <Dictionary>


Class protocol:

class initialization
o  initializePredefinedEntities
XML::DocumentType initializePredefinedEntities

instance creation
o  new
(comment from inherited method)
return an instance of myself without indexed variables


Instance protocol:

accessing
o  attributeFor: key subKey: k2

o  attributeFor: key subKey: k2 put: value
same as parameter entities, first definition counts, do not warn because modern dtds do this
all the time

o  attributesFor: key

o  declaredRoot

o  declaredRoot: something

o  elementDefinitions

o  elementFor: key

o  elementFor: key put: value

o  generalEntityAt: key
We do some tricks to make sure that, if the value
is predefined in the parser, we use the predefined
value. We could just store the predefined values
in with the general ones, but we don't want to show
warnings if the user (very correctly) defines them.
An enhancement would be to let the user use his own
values rather than the predefined ones, but we know
that the predefined ones will be correct--we don't know
that his will be.

o  generalEntityAt: key put: value

o  generalEntityAt: key put: value from: anErrorReporter

o  notationAt: name

o  notationAt: name ifAbsent: aBlock

o  notationAt: name put: notation

o  parameterEntityAt: key

o  parameterEntityAt: key put: value
gj: against all expectations, in a dtd, it's the first definition of a name that counts.
raising a warning might be argued for, though

encoding
o  acceptVisitor: aCoder with: aParameter
(comment from inherited method)
double-dispatch via visitObject:with: into a Visitor.
Subclasses redefine this to pass their type in the message name (i.e. visitXXX:)

initialization
o  initialize
(comment from inherited method)
just to ignore initialize to objects which do not need it

private
o  completeValidationAgainst: aParser

o  warn: aString
Modified to unify warnings for SAX. REW



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:19:33 GMT