doc function

Define and obtain the doc or tit attribute