The designator nextSibling describes the sibling note in $OutlineOrder after the note in current focus; the next note on the same level, i.e. excluding children.
Designators don't allow offset references as with attributes. Thus $Name("Some note") works but child("Some note") doesn't. If an offset designator is needed use find() instead.