Hi everybody. I have a question about this particular query hack that I have been using for quite a while. This is something of an advance esoteric query.
This is the hack I use within my exceptions.
//@tag_name/ancestor::*
When I use it with the following,
(task//@tag_name/ancestor::* union @tag_name///*)
It removes the projects from the results that have projects that only have tasks with that particular tag. For example in the following example,
task except (task//@private/ancestor::* union @private///*)
using the following file
First project:
- One
- Two
- Three
Second project: @private
- One
- Two
- Three
Third project:
- One
- Two @private
- Three
Fourth project:
- One @private
- Two @private
- Three @private
This is the result I get
First project:
- One
- Two
- Three
Third project:
- One
- Three
Can someone explain why? I would like to know because I have a script that uses evaluateItemPath
and that hack doesn’t work there.
For extra points, is there a query using evaluateItemPath
that returns the same results?