distinct in Xpath? June 12, 2023 by Tarik A pure XPath 1.0 — one-liner: Use: count(/*/group/user[not(. = ../following-sibling::group/user)])