W3C home > Mailing lists > Public > www-forms@w3.org > May 2006

Questions about generating new ids on insert

From: Allan Beaufour <beaufour@gmail.com>
Date: Wed, 31 May 2006 12:37:46 +0200
Message-ID: <90d6cb0e0605310337j32e1ff59ob80941abf4eebec8@mail.gmail.com>
To: www-forms <www-forms@w3.org>

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."

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

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

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."

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:17 UTC