Lists Home |
Date Index |
- From: Tyler Baker <email@example.com>
- To: Michael Kay <M.H.Kay@eng.icl.co.uk>
- Date: Fri, 25 Sep 1998 09:18:49 -0400
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.
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)