[cddlm] CDL q: what does this resolve to (cdl-2005-02-15.xml)

Guilherme M. G. Barbosa / Grad. DSC guiga at dsc.ufcg.edu.br
Tue Jan 24 15:01:26 CST 2006


On Tue, 24 Jan 2006, Steve Loughran wrote:

> 
> This is the test #cdl-2005-02-15, and it is failing on my system
> 
>          <cdl:cdl >
>            <cdl:configuration >
>              <node>
>                <value cdl:ref="newvalue" />
>              </node>
>              <toplevel cdl:extends="node">
>                <newvalue>newvalue</newvalue>
>              </toplevel>
>            </cdl:configuration>
>            <cdl:system >
>              <app>
>                <user cdl:ref="value" cdl:refroot="toplevel"/>
>              </app>
>            </cdl:system>
>          </cdl:cdl>
> 
> 
> The reason it is failing is that the reference under <node> only 
> resolves once the thing has been extended; that is,
> cdl:configuration/node is itself unresolvable. , though 
> cdl:configuration/toplevel is resolveable.
> 
> My implementation tries to resolve everything under cdl:configuration, 
> and fails because it is not possible here. It would work, if I marked 
> the ref as lazy
> 
>              <node>
>                <value cdl:ref="newvalue" cdl:lazy="true" />
>              </node>
> 
> because then the deref would not take place.
> 
> What do other people's implementations do with this test?
> -steve
> 

Our implementation works just like yours - tries to resolve everything, 
even if it is not used under the 'cdl:system' element. But I think that 
like in any language to be compiled, a 
method/expression/command must be 
according to the language even if it is not invoked in the main program. 
As every reference must be valid (point to somewhere that exists), the reference in 
'node' element is invalid, so this cdl.

Maybe there's two ways to fix this test:

1. As you did, using the 'lazy' attribute.
2. Or put an empty 'newvalue' element that should be overriden when any 
element inherits it.

Guilherme

  





More information about the cddlm-wg mailing list