RE: scope of id() (was: recalculating several models)

I'll take shot at some of these.

> So:
> 1/ This means that function id() is almost useless in XForms, right ?

No. Elements in the instance document may have id's and the id() function
may be used to look them up.

> 2/ What's the point of the first sentence of chapter 4.2 ?

The sentence: "For cases when a particular element needs to be referred to
from another context, every element in the XForms namespace has declared an
attribute id of type xsd:ID in the Schema for XForms."

I think this sentence is geared more towards binding attributes, the toggle
action, things like that. For instance, bind elements have an id and they
can be referenced via the form control bind attribute. 

> 3/ I'm affraid this also means that you can't have any kind of
dependencies
> between instances, which is a must IMHO.

I agree, this should be a must. The implementation I'm working on has a
proprietary model() function which is used in exactly the same way you have
used id() in examples. The model function takes the id of a model and
returns a nodeset containing the document element of the respected models
instance document. I also feel very strongly that XForms loses quite a bit
of functionality without this ability.

- Ryan


-----Original Message-----
From: Jérôme Nègre [mailto:jerome.negre@e-xmlmedia.fr]
Sent: Tuesday, January 08, 2002 3:59 AM
To: www-forms@w3.org
Subject: Re: scope of id() (was: recalculating several models)


> The XPath expressions apply to instance data, not the containing document.
> Since the instance data, which is a copy of everything between
> <xforms:instance>...</xforms:instance>, doesn't contain an id of "i1",
> there's no match on the function id().

So:
1/ This means that function id() is almost useless in XForms, right ?
2/ What's the point of the first sentence of chapter 4.2 ?
3/ I'm affraid this also means that you can't have any kind of dependencies
between instances, which is a must IMHO.

Is this correct ?

> P.P.S. If the recalculate event applied to all models, to which element
> would the event be targeted?

As I suggested, this event could be targeted:

1/ to the head section of the containing document (where is supposed to be
the model elements, see chapter 4.3.1), but I don't like this idea very much
cause it's very dependent on the presence of such a section and the type of
the document (XHTML, ...);

2/ or to a new element that could be called models:
<xsd:element name="models">
  <xsd:complexType>
    <xsd:sequence maxOccurs="unbounded">
      <xsd:element ref="xforms:model"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>

Jérôme

Received on Tuesday, 8 January 2002 10:07:22 UTC