- From: Paul Prescod <paul@prescod.net>
- Date: Tue, 08 Oct 2002 16:33:09 -0700
- To: Micah Dubinko <MDubinko@cardiff.com>, "'www-forms-editor@w3.org'" <www-forms-editor@w3.org>
Micah Dubinko wrote: > ... > In repeating nodesets, at least one of the repeated nodes MUST exist > initially, as a template. This allows a bind expression to exist, > which will refer to however many nodes exist during form execution, > including newly-inserted nodes. I'm not sure if the specification says clearly that the template node must exist. I presumed not but I now see some strong implications that it must. What if the instance data I am initializing the form with simply doesn't have an "item"? Do I need to just add a dummy one to the template anyways? Do I have to filter out the dummy one when I get the data back? > The <bind> selects the nodeset of "all my:item elements" and attaches the > minOccurs and maxOccurs properties. With a <repeat>/<insert>/<delete> > involved, the number of my:item elements can change, but the nodeset on the > bind continues to select all my:item elements. I think you are trying to take a Schematron-style assertion mechanism and merge it with a property-assignment mechanism. maxOccurs and minOccurs is a property of a nodeset, whereas (e.g. maxLength and minLength) are properties of nodes. Associating properties of nodes with nodes, is logical to me. It seems odd to associate properties of node sets with the individual nodes. What prevents me from having a "bind rule" like this: <instance> <my:order> <my:item foo="bar"> <my:amount /> <my:discount /> <my:item> <my:item foo="nobar"> <my:amount /> <my:discount /> <my:item> <my:item foo="bar"> <my:amount /> <my:discount /> <my:item> </my:order> </instance> <bind ref="my:item[@foo='bar']" minOccurs="0" maxOccurs="4" /> I think you mean to disallow that but I don't see anything to that effect in the spec. Paul Prescod
Received on Tuesday, 8 October 2002 19:33:52 UTC