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.23 date: 2019/07/18 18:55:48
user: cg
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  initialize
XML::DocumentType initialize

instance creation
o  new


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

initialization
o  initialize

private
o  completeValidationAgainst: aParser

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



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 27 Apr 2024 00:22:24 GMT