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

Re: Standard interface for DOM building

  • From: Tyler Baker <tyler@i...>
  • To: Michael Kay <M.H.Kay@e...>
  • Date: Fri, 25 Sep 1998 09:18:49 -0400

dom build from sax
Michael Kay wrote:

> There are a number of DOM implementations now appearing,
> (for example a new one from SUN) and I have been trying to
> add support for them to SAXON. The thing that's missing is a
> standard interface to build the Document. Can XML-DEV step
> in to fill the gap?

This seems like a good idea.  One thing I do in the DOM implementation I have is
to pre-index all of the elements for each tag name into NodeLists and then store
them in a table.  The reason for this was that for some applications like XSL
Processors which need to be able to extract elements by name through
Element.getElementsByTagName(String name), this operation can be costly if done
repeatedly without any sort of indexing.  Even though the DOM interfaces are
standard, I think that some sort of context interface would help for application
developers so that they can make assumptions like: Are the values returned from
Node.getNodeName() internalised strings or not?  Other things application
programmers might want to know (that are not covered in the spec) are questions
like: can the DOM tree be indexed?

The two main solutions I have identified are:

(1) Have a DOM Document Factory and get initialization parameters via system
properties in a manner similiar to how SAX's Parser Factory looks up the value
returned from org.xml.sax.parser to get the class name for the SAX parser.

(2) Specify that particular DOM Document implementation look up certain
properties upon initialization and understand how to initialize themselves for
whatever environment they are configured for.

Right now the most standard way for DOM Document support that I can think of is
to make sure that you have at least one constructor be an empty constructor.

Regards,

Tyler


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto: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.