[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Xapi-J: proposed interface to Document

  • From: Richard Light <richard@l...>
  • To: xml-dev@i...
  • Date: Mon, 21 Jul 1997 09:36:06 +0100

xapi interface
In message <33D19C41.41E547CD@d...>, John Tigue
<jtigue@d...> writes
>I would like to propose an addition to Xapi-J which would be the start
>of the interface to a document.
>
>The current definition of Xapi-J focuses on the interface IXMLProcessor
>and its method readXML() which returns a reference to an IElement which
>represents the root element of the processed document. This choice was
>made simply because it reflected the lowest common denominator of the
>currently available XML processors. The results are proving to be
>awkward.
>
>For example, a processor might construct a representation of the entire
>document including any internal DTD. As Xapi-J currently stands, the DTD
>representation would not be accessible because only the root element is
>returned from readXML() rather than a reference to the entire document.
>
>Perhaps it would be better to return a reference to the document. The
>root would then be available through, say, IDocument.getRoot(). As such
>I would like to propose the following beginning to IDocument:
>...

(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@l...
3 Midfields Walk 
Burgess Hill
West Sussex RH15 8JA
U.K.
tel. (44) 1444 232067

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo@i... the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.