RE: XForms WD 20011207 - Query consistency

From: JOHANSSON, Justin [mailto:Justin.JOHANSSON@baesystems.com]
> 
> 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.

I like inconsistency in examples because it demonstrates flexibility of
approach forcing the reader to better understand what is really going
on. In this example, the difference forces the reader to better
understand the context of the ref attribute's XPath. (Sometimes I see
XML newbies starting most XPath expressions with // because they do not
understand context!)

Received on Wednesday, 12 December 2001 09:19:58 UTC