|
|
Re: Primitive Domains in Top Relations [message #1081824 is a reply to message #1081503] |
Wed, 07 August 2013 18:44 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
HI
QVTr is multi-directional.
One or more domains are input, one is output, others may be used/ignored
as appropriate.
Regards
Ed Willink
On 07/08/2013 10:54, Goood Guy wrote:
> Hi,
>
> I wonder what should happen if a top relation has a primitive domain.
> As far as I understand, if the relation is not called in a when
> clause, the primitive domain cannot be bound.
>
> For example I have the following relation:
>
>
> transformation source2target(source:simplesource, target:simpletarget){
>
> top relation AtoA {
>
> varSourceB:simplesource::B;
> varTargetB:simpletarget::B;
> varStr:String;
> enforce domain source aLeft: simplesource::A{
> b=varSourceB, str=varStr
> };
>
>
>
> enforce domain target aRight: simpletarget::A{
> b=varTargetB
>
>
> };
>
> when{
>
> BtoB(varSourceB,varTargetB, varStr);
> }
>
> }
>
> top relation BtoB{
>
> varStr:String;
> enforce domain source bLeft: simplesource::B{
> };
>
>
>
> enforce domain target bRight: simpletarget::B{
>
> str=varStr
> };
>
> primitive domain pd:String;
>
> when{
> varStr = pd;
> }
> }
> }
>
|
|
|
Powered by
FUDForum. Page generated in 0.03720 seconds