Hi Craig,

I don't think sql2 has something like that.

could you be a bit more specific with your usecase? I can't figure out what
you are trying to do :)
are you looking for a certain parent of a node? or parents of node types?

wouldn't it be easier to have a property on the parent node to indicate the
presence of certain child node(s) / (types)?

alex

On Tue, Apr 12, 2011 at 9:02 PM, Craig S. Dickson <
[email protected]> wrote:

> Hi,
>
> I would like to query for nodes based on the presence of a descendant node.
> In psuedo code, something like:
>
> select * from nt:base where
> hasDescendant('./relative/path/to/descendant/node')
>
> I am trying to create the query with SQL2 and I can see the ischild() and
> isdescendant() constraints, but I am not clear how to use them to query for
> and return the parent/ancestor nodes, instead of the child/descendant nodes.
>
> Is this possible? I would prefer and SQL2 answer, but can use QOM or XPath
> if necessary.
>
> Thanks in advance.
>
> Craig
>
>

Reply via email to