@User the square brackets enclose tcl commands so you can put multiple commands intermixed with text :
attribute="tcleval([command1] some_text [command2] some_other_text)".. the square brackets will br replaced by the result of the tcl command. You can create tcl procedures and use them in attributes....