
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