[Bug 4639] Allow cycle checking on element graphs as well as document graphs

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4639





------- Comment #9 from virginia.smith@hp.com  2007-10-31 23:11 -------
Proposal 2 covers the first item (keeping the sml:acyclic on the ref). I think
that proposal 2 in the doc degenerates into your example (with no xpath
expression) when the xpath expression refers to "itself", meaning that <e
sml:acyclic="./e"/>. (I think this will be the most common use case.)

Also, with regard to a ref hierarchy, I don't remember that discussion but
consider the following:
If a Person has a ref to both Child and Friend and these 2 refs are both
derived from PersonRef, that would be a problem when detecting Child or Friend
cycles since they are distinct cycles but have the refs have same type. If I
understand the 2 point (considering ref hierarchy), then the cycle test says "a
ref of type A or a type derived from it". But if you put the acyclic on child,
then if A is the type "personRef", the cycle would look at both friend and
child and consider them both part of the same cycle which is not the intent. 
For example, consider that e1 in doc1 has a friend e2 in doc2 and e2  has a
child e3 in doc3 and e3 has a friend e1 in doc 1. This is not a cycle but would
look like one if you consider all refs of the same type to define a cycle.

Received on Wednesday, 31 October 2007 23:11:22 UTC