A useful post on the MS SharePoint developer blog – “Tokenization in the SharePoint 2010 Server Ribbon“. I always find it a little tricky remembering what token works in which place; this explains it.
In general, and as a reference for myself:
Location | ListUrlDir | ItemId | ItemUrl | RecurrenceId | SiteUrl | ListId | Source | SelectedListId | SelectedItemId |
List View | Yes | No | No | No | Yes | Yes | Yes | Yes | Yes |
List Form | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No |