The SGML class library package
This is a set of generic classes for dealing with normalised
document instances for any SGML DTD. They do not include a
validating parser yet, though I am moving towards being able to validate
XML. (Jan 1997)
An application (or possibly an applet) built with these classes will
read a normalised SGML file , such as proposed by the XML project.
It decides what the DTD is and downloads
a corresponding class library. If one DTD 'includes' another it can
cater for that.
The advantage of this approach is that it is simple to write postprocessing
('rendering') software for each DTD and to load this dynamically. This
has already been done for CML - Chemical Markup Language - where most of
the SGML ELEMENTs ('tags') have a Java class. (Alternatively it is
possible to use a generic class for a group of ELEMENTS). These act
rather like style-sheets - but much more powerful - for applications
which are non-textual.
Some key components of the package are
- DTD
Represents a generic DTD - all DTDs are subclassed from this
- GI
Represents a generic Identifier. Corresponds roughly to the
ELEMENT declaration in the DTD.
- SGMLNode
An SGML ELEMENT (represented as a node in an tree). SGMLNodes can
contain content, which is a mixture of other nodes and PCDATA
- SGMLNodeIndexSet
A list of nodes; useful for representing searches
- SGMLAttribute
An SGML Attribute. Contains a name and an value.
- SGMLAttlist
A list of attributes (corresponds to ATTLIST)
- SGMLTree
The parse tree of an SGML document, consists of nodes.
- SGMLTOC
The graphics representation of an SGMLTree (as a dynamically configurable
TableOfContents).
- SGMLStream
Input to the SGML parser. Must be well-formed SGML - does not validate yet.
- ESISStream
Alternative input to the SGML parser. Produced by tools such as sgmls.
- DrawableSGMLNode
The graphical representation of a node. Nodes have a display() method
and can have icons, etc.
- PCDATA
Embryonic class for PCDATA
- EntitySet
Manages character Entity sets.
- SGMLApplet
Manages the SGMLTree as an applet.
- SGMLUserClass
An embryonic tool for supporting searches
- BookmarkWindow
A visual history of browsing the SGMLTOC.
In addition there are embryonic containers for the ELEMENTS in the HTML DTD.
Here are
the classes in the package
Up to index
©
Peter Murray-Rust, 1996, 1997