For the query "PROJECT[1]/PROPOSAL[1]/SOLUTION[1]/UNIT[1]/distinct-values(LANDING_DOOR_FRAME_FINISH_FRONT/LANDING_DOOR_FRAME_FINISH_FRONT_VALUE)" this appears to work if distinct-values() returns exactly one value, but throw an exception otherwise. (And by the way, this query is not my idea).
Is it a bad idea to have an atomic value as a node name in a query? Or is it ok? And if ok, is it ok only if it returns exactly one value?
Calling Saxon from Java for this.