I haven't really found on the internet much examples of these types of XPath and the actual "name" for this type of XPath functionality. Can someone clarify for me, some W3C or other standard online resource that defines these?
(//someXPathThatReturnsMultipleMatches)[n]
where it returns the nth match in the set
//div[span[a[@title='foo']]]
where we match & return the div (not the hyperlink) which contains a span which in turn contains a hyperlink with title of "foo"
Update: I guess there is no specific name to these XPath examples then? Both the current answers are good, wish I can accept them both though. But first an update to the question:
The basis to asking this question is also a way to easily inform a user some additional types of XPath queries that can not be done in CSS, beyond the more simple examples of accessing parent/ancestor and preceding-siblings and text contains() (which is only a pseudo selector not part of CSS3) that are not available with CSS. Because to those not so well familiar with XPath, and only know basics of CSS, they think you can do most of XPath with CSS, when in fact not (for the complex/unique cases). So I wonder, how would one in essence, summarize effectively what you can not do in CSS that you can with XPath that includes the examples I first mentioned along with the easier examples one would have heard of?