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

Can xforms add attributes to elements in instance data?

From: jason <jeacott@hardlight.com.au>
Date: Mon, 14 Feb 2005 14:55:26 +1030
To: <www-forms@w3.org>
Message-Id: <20050214042502.2B5CD26FA0C@mail.igateway.com.au>

Hi All,
	I was recently trying to use xforms to manipulate a pretty basic bit
of xml.
I needed the ability to dynamically add elements AND attributes.
The elements bit was ok, I can do that with an xf:insert, but what about
I am loath to merely create a superset of all the attributes needed in my
initial instance data and just leave the unused ones blank - would result in
very poor xml and an awful hack.
I don't really want to restructure the data and use elements instead of
attributes since the data makes good sense to have the attributes as they
Ideally I'd have my submittable instance data completely empty too, but that
seems impossible with xforms. How could I create a new element with
attributes in this case?
Is there a pure x-forms solution to this problem?

While I'm here I'm struck by the number of workarounds & hacks required to
get an xform working.
Eg, to have a form that can dynamically add sub elements that vary depending
on the data in the parent element seems incredibly difficult.

I hope someone can help.
Thanks in advance.
Received on Monday, 14 February 2005 07:02:13 UTC

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