RE: XForms WD 20011207 - Query consistency

Hi,
This is the first time I've contributed to this group.  I hope 
the following is worthy of consideration.

The following two examples have been pulled from the spec.

It seems inconsistent to me that in 1. the value of the ref 
attribute of the xforms:bind element has no leading slash
(i.e. "my:payment/my:cc") whereas in 2. it does 
(i.e. "/orderForm/shipTo/firstName").  Even if there is 
argument that there is no problem and that the leading slash 
in 2. is superfluous as the XPath expression is relative 
to the xforms:instance element taken as a root anyway, then 
it is at least confusing to the reader to have the slash in 
one case and not the other.

Also the implicit association of the xforms:instance element 
with the xforms:bind element doesn't seem to be a good idea.
It forces the xforms:instance element to be in a fixed place 
and doesn't allow for the possibility of there being more than 
one instance element.  Surely the xforms:bind element should 
explicitly reference the associated xforms:instance element 
in some way.

Example 1.

<xforms:model>
  <xforms:instance>
    <payment as="credit" xmlns="...">
      <cc/>
      <exp/>
    </payment>
  </xforms:instance>
  ...
  <xforms:bind ref="my:payment/my:cc"
      relevant="my:payment/@as == 'credit'"
      required="true" type="my:cc"/>
  ...
</xforms:model>


Example 2.

<xforms:model id="orders">
  <xforms:instance xmlns="">
    <orderForm>
      <shipTo>
        <firstName>John</firstName>
      </shipTo>
    </orderForm>
  </xforms:instance>
 <xforms:bind ref="/orderForm/shipTo/firstName"
          id="fn" type="xsd:string"
          required="true"/>
</xforms:model>

Regards,

Justin Johansson
Software Engineer,
BAE SYSTEMS
PO Box 1068
Salisbury, 
South Australia  5108
Ph:     +61 8 8480 7564
Email: justin.no-spam.johansson@baesystems.com

Remove ".no-spam" for my correct email address.

Received on Tuesday, 11 December 2001 19:00:42 UTC