optional attributes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

optional attributes

Pierre-Julien VILLOUD
Hi everyone,

Just another little problem.

I have an instance "Element" and sometimes it has an attribute "name", and sometimes attributes "value" and "operator".
<Element name="year" operator="!=" value="1995"/> (how can i do if i want the operators > or <, there are reserved characters aren't they?)
or
<Element name="blabla"/>

Am I obliged do declare those attributes in <xforms:instance> because if I don't, I cannot set values (with <xforms:setvalue>) to these attributes.
So can I add attributes ?

Thanks !

Pierre-Julien



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: optional attributes

Erik Bruchez
Administrator
[hidden email] wrote:

> Hi everyone,
>
> Just another little problem.
>
> I have an instance "Element" and sometimes it has an attribute "name", and sometimes attributes "value" and "operator".
> <Element name="year" operator="!=" value="1995"/> (how can i do if i want the operators > or <, there are reserved characters aren't they?)
> or
> <Element name="blabla"/>
>
> Am I obliged do declare those attributes in <xforms:instance> because if I don't, I cannot set values (with <xforms:setvalue>) to these attributes.
> So can I add attributes ?
When you have to deal with attributes that must be added/removed, you
must use xforms:insert/xforms:delete and write a little bit more code to
handle this as XForms doesn't have an automatic way of handling optional
attributes.

-Erik

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws