7.2 XForms DOM interfaces are specified strangely

Greetings,

Upon review of the DOM interfaces defined in 7.2, there are some
seeming inconsistencies, or at least oddities. As currently specified,
code such as this (JavaScript in this case) would be needed to modify
instance data through script:

var modelElem = document.getElementById("id_of_model_element");
var instDoc = modelElem.getInstanceDocument("id_of_instance_element"); 

// Perform operations on instDoc

modelElem.rebuild();
modelElem.recalculate();
modelElem.revalidate();
modelElem.refresh();

The strange part is that the interface is based on the model element,
so another idref is needed in the parameter of getInstanceDocument to
say _which_ instance is needed, within the model. If my recollection
serves, this goes back to the time when each model had only a single
instance.

Further, the four r* methods will cause *all* instances on the given
model to be rebuilt/recalculated/revalidated/refreshed, which is a
different level of granularity than getInstanceDocument.

Request: If the implementers agree, I request that the interface be
specified as part of the instance element instead, removing the need
for a parameter on getInstanceData. The previous code would then look
like:

var instElem = document.getElementById("id_of_instance_element");
var instDoc = modelElem.getInstanceDocument(); 

// Perform operations on instDoc

instElem.rebuild();
instElem.recalculate();
instElem.revalidate();
instElem.refresh();

Thanks,

.micah

=====
Find out what the fuss about XForms is all about. Full text of my book in-progress online at http://dubinko.info/writing/xforms/

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Received on Wednesday, 1 January 2003 19:16:37 UTC