RE: XForms how-to

> 1) How to put a constraint on a set of data elements at once?
> The problem is in that the xforms:bind element can have the
> attribute "ref"
> only, not "nodeset". Having e.g.:
> 	<xforms:instance>
> 		<employee name="Karl" income="12345" />
> 		<employee name="Mark" income="2345" />
> 		<employee name="Peter" income="3458" />
> 		<employee name="John" income="23456" />
> 	</xforms:instance>
> 	<xforms:bind ref="employee/@income" type="xsd:int" />
> this would put a constraint on Karl's @income only.

This is wrong assumption. The XPath expr 'employee/@income' will select all
four 'income' attributes. I admit that the attibute name 'ref' can be
misleading here, but the intent of XForms 'bind' element is the ability to
set multiple items' constraints at once.

-mikko

Received on Tuesday, 29 January 2002 03:41:07 UTC