W3C home > Mailing lists > Public > www-forms@w3.org > September 2005

Re: Binding to nodes that do not exist

From: Vincent Berger <vincent.berger@afp.com>
Date: Fri, 09 Sep 2005 09:42:01 +0200
To: www-forms@w3.org
Message-Id: <1126251721.8693.173.camel@genepi>
<xf:group ref="if(string-length(name(/path/to/the/node)) >
0, /null, .)">
    <xf:trigger>
        <xf:label>
            Add New
        </xf:label>
   </xf:trigger>
</xf:group>

where /null is a node that never exists.

It´s not very nice but ... it works.

vinzo

Le jeudi 08 septembre 2005 à 11:32 -0400, Ogbuji, Chimezie a écrit :

> I have a scenario where I need to display action buttons to trigger a
> process for 'adding' nodes to an XForms instance (an 'Add New' button,
> for instance).  However, I'd like for these buttons to be displayed
> only if the node in question does *not* appear in the instance.  I
> can't figure how this could be done since the mechanism for binding to
> instance nodes depends on whether or not the binding XPath evaluates
> to a nodeset or not.  I could use the XPath 1.0 'not' function
> (wrapped around the path to the node), but that would only return a
> boolean value of 'true' which would cause any control/group bound to
> it to *not* appear (since it's not a nodeset with size).  Is there an
> easy solution to this problem that I'm overlooking?
> 
> Chimezie
> 
> 

-- 
Vincent Berger <vincent.berger@afp.com>
Agence France-Presse

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

This e-mail, and any file transmitted with it, is confidential and  intended solely for the use of the individual or entity to whom it is addressed. If you have received this email in error, please  contact the sender and delete the email from your system. If you are  not the named addressee you should not disseminate, distribute or copy  this email.

For more information on Agence France-Presse, please visit our web site at http://www.afp.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Received on Friday, 9 September 2005 07:41:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:01 GMT