RE: Question about form design with optional elements

<quote of="Ulrich Nicolas Lissé">
this is only part of the trick, because when the relevant MIP is false, 
"associated form controls (and any children) and group and switch 
elements (including content) must be made unavailable, removed from the 
navigation order, and not allowed focus. Typically, non-relevant content 
is not presented, or it may be styled as disabled."
</quote>

<cut summary="trick for delaying relevance checking"/>

Yes, this is just the sort of creativity that I had in mind.

So you two are generally in favor of the approach of pruning the maximal base instance, eh?  I like this approach, but I think I'll continue to do it after form submission, with some XSLT at the receiving end.  I'm already concerned with performance issues in the form itself, and I don't want to burden the multi dependency graph with a large set of additional relevance MIPs.

Anyone have any additional input?

Thanks,

    John L. Clark

Swithun Crowe wrote:
> Hello
> 
> CJ Another approach is to start with a maximal base instance,
> CJ 
> CJ   <xf:instance id="maximal-base">
> CJ     <X>
> CJ       <a/>
> CJ       <b/>
> CJ       <c/>
> CJ     </X>
> CJ   </xf:instance>
> CJ 
> CJ and then remove any of the optional elements that are "empty" when the 
> CJ instance is submitted.  This approach requires expanding the starting 
> CJ state of the instance data to its maximal form before editing, and then 
> CJ pruning it back again after editing.  Our experiments have performed 
> CJ both expanding and pruning on the server side, although it may be 
> CJ possible to do these operations using XForms itself.  For example, 
> CJ pruning could be implemented using some creative "relevance" MIPs.  
> 
> This is what relevance is for. It needn't be very creative. Something 
> like:
> 
> <xf:bind nodeset="instance('maximal-base')/*" relevant=".!=''"/>
> 
> would do it. You might need to use CSS to ensure that elements are still 
> visible and editable while they are empty. But relevance will remove the 
> empties before the instance is submitted.
> 
> Swithun.
> 

-- 
Ulrich Nicolas Lissé






===================================

P Please consider the environment before printing this e-mail

Cleveland Clinic is ranked one of the top hospitals
in America by U.S. News & World Report (2007).  
Visit us online at http://www.clevelandclinic.org for
a complete listing of our services, staff and
locations.


Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.

Received on Thursday, 17 July 2008 14:17:34 UTC