|
Class: DocumentType (in XML)
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
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 initialization
-
initializePredefinedEntities
-
XML::DocumentType initializePredefinedEntities
instance creation
-
new
-
(comment from inherited method)
return an instance of myself without indexed variables
accessing
-
attributeFor: key subKey: k2
-
-
attributeFor: key subKey: k2 put: value
-
same as parameter entities, first definition counts, do not warn because modern dtds do this
all the time
-
attributesFor: key
-
-
declaredRoot
-
-
declaredRoot: something
-
-
elementDefinitions
-
-
elementFor: key
-
-
elementFor: key put: value
-
-
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.
-
generalEntityAt: key put: value
-
-
generalEntityAt: key put: value from: anErrorReporter
-
-
notationAt: name
-
-
notationAt: name ifAbsent: aBlock
-
-
notationAt: name put: notation
-
-
parameterEntityAt: key
-
-
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
-
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
-
initialize
-
(comment from inherited method)
just to ignore initialize to objects which do not need it
private
-
completeValidationAgainst: aParser
-
-
warn: aString
-
Modified to unify warnings for SAX. REW
|