W3C home > Mailing lists > Public > www-forms@w3.org > December 2003

RE: xforms for inhomogenous collections

From: Borgrink, Susan <sborgrink@progeny.net>
Date: Thu, 18 Dec 2003 14:10:39 -0500
Message-ID: <FB041607EAE6DF4697B73E29142D1C4B01554E@es3.progeny.net>
To: "Oliver Scholz" <alkibiades@gmx.de>, <www-forms@w3.org>
Mark was pointing you in the right direction, the relevant attribute is used within the bind element rather than the in form control.  However, what may not have been evident before and what may help to tie some of this all together is that the relevant attribute is inheritable.  Therefore, whatever is a child of the group element would be tied to its relevance.

As Mark's example showed:

<xforms:group ref="page[1]">
  <h2><xforms:output ref="@title" /></h2>
  I'm the first page ...

the output would be tied to the parent goup element.


-----Original Message-----
From: Oliver Scholz [mailto:alkibiades@gmx.de]
Sent: Wednesday, December 17, 2003 1:00 PM
To: www-forms@w3.org
Cc: Borgrink, Susan
Subject: Re: xforms for inhomogenous collections

"Borgrink, Susan" <sborgrink@progeny.net> writes:

> Oliver, 
> 	In response to your first question, you should be able to
> 	achieve what you are thinking by using the group element with
> 	relevance. It would be very similar to the idea you had with
> 	the switch, but it would be based on the "XPath predicate".

Thank you, Susan. I have not thought of the group element. Though I do
not yet understand how exactly I should solve this first point. I do
not yet understand the standard in every detail. The way I see it,
"relevance" in the context of the group element refers to the
"relevant" attribute of a bind element in the model. Is that correct?
If so, I do not yet understand how I (as a user of my application)
could specify a bind element that would lead to the desired
effect. Could you give me a hint?

I guess, the simplest thing for my purpose would be something like the
following (with the example data in my last message). But as far as I
can see, this would be an extension.  Is that what you suggest?

    <xforms:repeat ref="/record-set/record">

      <xforms:group relevant="@type = 'author'">
	<h2>An Author</h2>
	<xforms:input ref="name">
	  <xforms:label>Author Name</xforms:label>

      <xforms:group relevant="@type = 'book'">
	<h2>A Book</h2>
	<xforms:input ref="title">
	  <xforms:label>Book Title</xforms:label>


> 	In response to your second question, the repeat element has an
> 	attribute called "number" that tells the processor how many of
> 	the collections to display at a time. [...]
> 	How you choose to design it, is up to you.

Thank you. This "number" attribute is exactly what I was looking for.

27 Frimaire an 212 de la Révolution
Liberté, Egalité, Fraternité!

Received on Thursday, 18 December 2003 14:10:41 UTC

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