Re: Unfortunate choice of attribute name in XForms 1.1: xforms:submission/@target

Hi Erik,

>  As already discussed, I don't like that reuse of the @target attribute for
> replace="all". It mostly comes down to not being good language design, IMO,
> to have a given attribute perform functions which are that different. This
> for me rules out, in the future, reusing @target for specifying a target
> window/frame if @target is already used for specifying a destination node in
> an instance.

I disagree with you here, and think it is quite acceptable to have an
attribute play a 'general' role (provide the target for some action),
with the specific interpretation of that role (target a node, target a
frame, etc.) being derived from the context.

However, the problem we have here is that to be completely consistent
we would need @target to contain XPath *in both contexts*. In other
words, we would need XPath for *both* replacing an instance, and
replacing a frame:

  <submission action="url" replace="instance" target="node/to/replace" />

  <submission action="url" replace="all" target="node/with/frame/name" />

and then we'd need strings for specifying the frame directly (spaces
added for emphasis):

  <submission action="url" replace="all" target="     'frame-name'    " />

Which unfortunately means that this ceases to be aligned with the
XHTML M12N target attribute, which will then make it difficult to
import XForms into M12N.

(You could argue that we don't need to be consistent here, since when
doing a replace="instance" the node is the target, whereas with
replace="all" the node is an indirection for obtaining the
target...but I think that makes it potentially more confusing.)

It's a pain, but I think we might need a name change.

Regards,

Mark

-- 
 Mark Birbeck

 mark.birbeck@x-port.net | +44 (0) 20 7689 9232
 http://www.x-port.net | http://internet-apps.blogspot.com

 x-port.net Ltd. is registered in England and Wales, number 03730711
 The registered office is at:

 2nd Floor
 Titchfield House
 69-85 Tabernacle Street
 London
 EC2A 4RR

Received on Wednesday, 16 April 2008 08:22:42 UTC