Questions about generating new ids on insert

The specification of the instance element includes this sentence:
"In this process, nodes of type xsd:ID are modified to remain as
unique values in the instance data."
[http://www.w3.org/TR/2006/REC-xforms-20060314/slice9.html#action-insert]

To that, I have a few questions.

1) When exactly is this modification taking place?

It matters since nodes might have types associated through <xf:bind
type=""/>, so these needs to be processed before the nodes actually
are of type xsd:ID (I guess this takes place during xforms-rebuild.)

But should it take place before or after xforms-recalculate? Before,
since the form author might want to do calculations based on the
(possibly new) value? Or after, since the form author might want to
calculate a new id himself?

If it takes place as "part of" the RRR process, then it needs to be
deferred too, which might be tricky -- at least from an implementation
perspective.

2) Does it adhere to the readonly MIP, ie. does not change readonly nodes?

The form author might, for some reason, not want the nodes to be
changed, and could thus set readonly="true()" for those nodes to avoid
that.

3) Is it on purpose that it is stated as strict as "remain as unique
values in the instance data"?

Should it have been more like the generate-id() function from XSLT,
which includes:
"There is no guarantee that a generated unique identifier will be
distinct from any unique IDs specified in the source document."
[http://www.w3.org/TR/xslt#misc-func]

4) Does the modification follow the normal XForms rules of how to set values?

F.x. for an element, should it only set the first text node child?

-- 
... Allan

Received on Wednesday, 31 May 2006 10:38:17 UTC