Skip to content

Question about xpath // #26

@bitparity

Description

@bitparity

So at 11:42 of "Advanced Digital Editing: Introduction to XPath II", it says ./descendent::head is the same as //head which I do find to be the case. But in the book XQuery for Humanists (p.62) it says A double slash (//) stands for /descendant-or-self::node()/.

I know from having debugged a problematic query that /descendant-or-self::node()/head is not the same as /descendent-or-self::head (particularly when it comes to looking for attributes within /head which I think are technically siblings, not descendents), but I don't know why, especially since functionally it seems to just make // equivalent to, as mentioned in the video, ./descendent::head.

Can you possibly explain the difference between the two definitions (yours and XQH's) for // ?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions