[Mulgara-dev] xsd resolver

Alex Hall alexhall at revelytix.com
Wed Nov 12 17:18:57 UTC 2008


Alex Hall wrote:
[snip]
>> Hmm, I think the DefinablePrefixAnnotation can be used to determine
>> whether the variables have been bound or not, i.e. that could be used
>> to trigger whether to filter or generate. However, I think one piece
>> is still missing: a way to the query planner that it should use other
>> resolvers to resolve the variables _if possible_ (the
>> MandatoryBindingAnnotation doesn't cut it because that's a hard
>> requirement rather than a soft please-but-only-if-you-can). So maybe a
>> new annotation is needed here.
> 
> I don't think that what you want to accomplish can even be done with
> annotations.  Keep in mind that, even if the variable in an XSD constraint is
> bound elsewhere in the query, there's no way for the XSD resolver to see these
> bound values from the QueryEvaluationContext that it is given.

Upon further consideration...  Scratch that last statement.  I forgot that
Tuples can be prefixed, which would give you the necessary insight into whether
the variable has been bound.  So the XSD resolver would need to make its own
resolution class which will determine based on the prefix whether to filter or
match.  I think that the approach I suggested would still work, and would not
rely on the query engine getting the ordering right, but I make no claims to the
superiority of one approach to the other :-)

Regards,
Alex



More information about the Mulgara-dev mailing list