markup: separate out cecking of valid name from Context

Signed-off-by: Peter Williams <pwil3058@gmail.com>