Appends the attribute set ctx as a context to the string s, see getContext for details on the format of the context.