W3C home > Mailing lists > Public > www-dom@w3.org > April to June 1998

Re: xxxML on top of, embedded in XML

From: David Megginson <ak117@freenet.carleton.ca>
Date: Fri, 1 May 1998 12:52:54 -0400
Message-Id: <199805011652.MAA04743@unready.microstar.com>
To: Richard Cohn <cohn@Adobe.COM>
Cc: www-dom@w3.org
Richard Cohn writes:

 > >As I mentioned above, the DOM is a solution to a specific problem.
 > >Every XML document implies some kind of object model -- sometimes (as
 > >in the case of a technical manual, a poem, or a novel), the DOM will
 > >be a very good match; other times (as in the cases of serialised
 > >components, vector graphics, or an XSL stylesheet), the DOM will be
 > >too far from the optimal object model.
 > Agreed, but just as the HTML DOM builds on the Core DOM, it will be useful
 > for the PGML DOM to build on common functionality.

This could turn out to be a very good solution in some cases -- I do
not know PGML well enough to judge.

More generally, though, imagine a document consisting of, say, 50
million records like these (normally, the structure should be a little
more robust):

    <name>David Megginson</name>
    <education>Ph.D. (University of Toronto)</education>

It is fairly efficient to put these straight into a customised Contact

  public class Contact {
    public String name;
    public String email;
    public int nationality; // assuming constants defined somewhere
    public int birth-year;
    public int birth-month;
    public int birth-day;
    public String education;
Building a DOM as an intermediate step would make little sense, since
you would generate a painfully large number of nodes for each record
(instead of just one Contact object with a couple of strings).

All the best,


David Megginson                 ak117@freenet.carleton.ca
Microstar Software Ltd.         dmeggins@microstar.com
Received on Friday, 1 May 1998 12:53:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:03 UTC