[cddlm] Sourceforge and a new CDL resolution bug in my implementation.
Guilherme Mauro Germoglio Barbosa / Projeto Ourgrid - Projeto Ourgrid/LSD
guiga at dsc.ufcg.edu.br
Thu May 18 06:33:09 CDT 2006
Hi Steve,
I think your implementation is correct (not the test). In the
specification, the inheritance of elements algorithm (7.2.2.1) states:
/7.2.2.1 Inheritance of Elements
Inheritance of elements from a node n' to a node n is defined as
follows:
1 Let N an empty node list.
2 For each child element e' of n' from the first element to the
last element:
2.1 If the node n has child elements E = {e1, e2,...} that
have the same name as e'
2.1.1 If N does not contain an element that has the same
name as e':
*2.1.1.1 For each element ei in E in the document
order, append ei to the end
of N. _Inherit attributes from e' to ei._*
2.2 Otherwise, append e' to the end of N.
3 For each child element e of the node n from the first element
to the last element:
3.1 if the element e' does not have a child element that has
the same name as e,
append e to the end of N.
4 Replace n's children with the nodes in N./
And your code, based on what you said on the e-mail, does what was
underlined above.
Guilherme
Steve Loughran wrote:
> Sourceforge is back up, but you need to check out everything again in
> a new directory tree.
>
>
> Incidenally I just found a little thing my CDL impl. can't resolve
>
>
> <cdl:cdl>
> <cdl:configuration>
>
> <component>
> <entry cdl:ref="todo"/>
> </component>
>
> <c2 cdl:extends="component">
> <entry>something</entry>
> </c2>
>
> </cdl:configuration>
> <cdl:system>
> <example cdl:extends="c2" />
> </cdl:system>
> </cdl:cdl>
>
> This fails on my impl, with the entry being undefined.
>
> <example xmlns="">
> <entry cdl:ref="todo">something</entry>
> </example>
>
> I'm clearly not scrubbing cdl:ref stuff when I extend an element, when
> in reality I should strip that and cdl:refroot.
>
> This is now a new test:
> /org/ggf/cddlm/files/cdl/valid/set_02_references/cddlm-cdl-2005-02-0023.xml
>
>
> Its interesting to see that I can still find problems in my code while
> writing more CDL files. If anyone has more example CDL Files,
> especially those that work on their system, please add them as CDL
> tests just to give us as broad a set of
> tests as possible.
>
> -Steve
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ogf.org/pipermail/cddlm-wg/attachments/20060518/756b3dce/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3253 bytes
Desc: S/MIME Cryptographic Signature
Url : http://www.ogf.org/pipermail/cddlm-wg/attachments/20060518/756b3dce/attachment.bin
More information about the cddlm-wg
mailing list