[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: Issue: duplicate attributes
> the intersection of the set of attribute names possible in p1 and the set of > attribute names possible in p2 must be empty. Is it always possible to > determine whether the intersection of two name classes is empty? (I think > so, but I would need to do some work to be sure.) I don't think we can determine whether the intersection of two classes is empty or not in some cases especially with the presence of <difference>. Other primitives can be solved inductively. but not <difference>. boolean isEmpty( NameClass nc1, NameClass nc2 ) { if( nc1 is SimpleNameClass ) return nc2.accept(nc1.namespace, nc1.local); ... if( nc1 is ChoiceNameClass(c1,c2) ) return isEmpty(c1,nc2) && isEmpty(c2,nc2); if( nc1 is ConcurNameClass(c1,c2) ) return isEmpty(c1,nc2) || isEmpty(c2,nc2); if( nc1 is DifferenceNameClass(c1,c2) ) ???? } -- Kohsuke KAWAGUCHI +1 650 786 0721 Sun Microsystems kohsuke.kawaguchi@eng.sun.com
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC