xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Hallvard Tr�tteberg" <hal AT idi.ntnu.no>
- To: "Xom-Interest" <xom-interest AT lists.ibiblio.org>
- Subject: [XOM-interest] Tracking changes to a document
- Date: Thu, 19 Sep 2002 11:58:48 +0200
Hi,
As mentioned in a previous posting, I'm trying to reimplement several JDOM
sub-classes as subclasses of corresponding XOM-classes. Two of these efforts
rely on tracking changes in the parent / child relationsship, to keep track
of all IDs in a document and to notify listeners of changes in general.
The Element.checkAttribute and Attribute.checkType and Attribute.checkValue
can be used for this purpose at the attribute level. However, I haven't
found a way of doing this at the TreeNode/Element level. In particular, the
Element class makes the TreeNode.insertChild(int position, Node node) final
so I cannot hook into the child insertion process by subclassing Element! I
cannot utilise setParent either (as I did for JDOM) since it is package
private.
I suggest adding a TreeNode.checkChild(Node node) or
Element.checkChildElement(Element e) to make such tracking possible in
general.
Hallvard Trætteberg, 1. amanuensis ved IDI, NTNU
http://www.idi.ntnu.no/~hal, mailto:hal AT idi.ntnu.no, phone:+47 7359 3443
-
[XOM-interest] Tracking changes to a document,
Hallvard Trætteberg, 09/19/2002
- Re: [XOM-interest] Tracking changes to a document, Elliotte Rusty Harold, 09/19/2002
Archive powered by MHonArc 2.6.24.