Re: <control/> with instance mirroring

>
> On the other hand, it ought not need to be a whole instance. Perhaps @ref
> is better:
>
>    <control resource="game.xml" ref="instance('values')"/>
>    <control resource="histogram.xml" ref="x[. > 0]"/>
>

I don't see why we wouldn't use `ref`, but it could have constraints, such
as "must bind to a single element".

The remaining question is how to indicate in the embedded XForm which
> instance is mirrored.
>
> The simplest solution would be to say that the first instance is the
> mirrored one; on the other hand, it is nice to be able to decide yourself
> which the default instance is, to make authoring easier, and your default
> instance always has to be the first.
>
> The @src and @resource attributes on <instance/> usually signify the
> source of the data for an instance, though I am allergic to using special
> schemes for URLs to signify special sources; maybe we could mark an
> instance in some special way... I think it would be a bad idea to specify
> the target instance from the embedding form, since that creates an extra
> dependency between embedder and embeddee: better for the embedded XForm
> specify it.
>

Agreed. And the way we do it for mirroring is to use an extension attribute
(`xxbl:mirror="true"` on the given `instance`).

-Erik

Received on Wednesday, 14 November 2018 01:13:50 UTC