(Read 'XML' for 'SGML' throughout!)
This is exactly the sort of problem which adopting the 'grove plan'
approach is meant to deal with. In line with your suggestion, the SGML
property set starts with the class sgmldoc, or 'SGML document', which is
'the parsed SGML document. The root of the grove.'
This is _not_ the root element of the document instance: the 'document
element' is just one of the properties of the sgmldoc class. sgmldoc
has the following properties that might be relevant to XAPI:
- prolog (as per XML's 'prolog' - contains the internal and external
DTD subset);
- epilog (equivalent to the 'Misc*' which follows the document
element);
- docelem ('document element' - the root element of the document
instance);
- elements (all the elements in the document which have unique
identifiers - handy for processing XPointers, etc.);
- entities (the explicitly declared general entities, followed by the
defaulted entities)
(There are others!)
Putting it less formally, the SGML property set matches all the concepts
which are defined in XML. Thus the XML production [23] for 'document':
document ::= Prolog element Misc*
is equivalent to the sgmldoc class, which in turn has properties which
are equivalent to 'Prolog' (prolog), 'element' (docelem) and 'Misc*'
(epilog).
In my view, XAPI should be taking advantage of this existing framework
(and naming conventions) where it is relevant to XML's requirements.
Didn't someone do a summary of the relevant classes and properties a
couple of months back?
Richard Light
SGML and Museum Information Consultancy
richard@light.demon.co.uk
3 Midfields Walk
Burgess Hill
West Sussex RH15 8JA
U.K.
tel. (44) 1444 232067