[cddlm] CDL Tests
Steve Loughran
steve_loughran at hpl.hp.com
Wed Mar 8 09:01:05 CST 2006
Guilherme Germoglio wrote:
> Hello,
>
> Our test results regarding the cdl parser can be viewed in:
> http://lsd.ufcg.edu.br/~guiga/cddlm/test_results/index.html
>
> From these tests we have changed test cddlm-cdl-2005-09-0005, from
> import_namespace set because its resolution expected is not correct.
>
> The expected must be the following:
>
> <cdl:system xmlns:test1="http://cddlm.org/test1.cdl"
> xmlns:t2="http://cddlm.org/test2.cdl">
> <MyServer>
> <hostname>www.cddlm.org <http://www.cddlm.org></hostname>
> <port>80</port>
> </MyServer>
> </cdl:system>
>
> As hostname property was redefined to www.cddlm.org
> <http://www.cddlm.org> in MyServer , which extends test1:WebServer, this
> property cannot be the same of test1:WebServer (data/hostname).
you are right. fixed.
>
> As you can see in the results, 2 required tests remained failing:
> cddlm-cdl-2005-02-0021 and cddlm-cdl-06-0001
> They regard the resolution of references to lazy properties. We think
> the tests are not according to the specification, that says in sections
> 7.3.3 and 7.5.2, respectively:
>
> "A value reference at /n/ referring to /n'/ is resolvable if and only if:
>
> (...)
>
> *
>
> The node /n'/ and its descendants do not have any @cdl:ref and
> @cdl:lazy attribute. Otherwise, the resolution is deferred until
> these @cdl:ref and @cdl:lazy attributes are resolved."
>
>
> "A reference to an property with a @cdl:lazy attribute MUST NOT be
> resolved before the @cdl:lazy attribute is resolved."
>
> What does the specification mean by "be resolved"? When it states that
> the reference MUST NOT be resolved, does it mean that the reference must
> remain unchanged? If so, the tests must be changed. If not, what is the
> expected behavior?
>
the cddlm-cdl-2005-02-0021 actually tests that the presence of a
cdl:lazy attribute is harmless if you have no reference, it just gets
kept along. There's no reason for it not to be dropped, except that the
specification explicitly says that only cdl:ref and cdl:refroot
attributes get stripped when copying references.
The way my implementation works. I am fussy during resolving about
resolving a lazy reference, that is something with both cdl:ref and
cdl:lazy. But I just ignore cdl:lazy. I believe this is the correct
interpretation, but I see from your point that it is unclear; we are
referring to a property with a cdl:lazy attribute, it just lacks any
reference.
Personally, I'd like to view cdl:lazy without cdl:ref or cdl:refroot as
an error, rather than a no-op. But I dont think that is in the spec.
cddlm-cdl-06-0001 looks wrong to me.
As full processing lazy refs are not part of the parse-time spec, we
could move 02-0021 over to the 06- package and mark all of them as
informative. But then we do need to come up with some good values for
production testing, which is where cmp: testing fits in, I hope.
-steve
More information about the cddlm-wg
mailing list