check transact = text ->
  alarm = . ..

  parse text . '<title>' title '</title>' .

  if title ->
    parse text . '<charset>' charset '</charset>' .

    if (charset != `TS_DOC_CHARSET) ->
      alarm = ERR_CHARSET
    else
      ...
    ;
  else
    alarm = ERR_NO_TITLE
  ;

  if alarm ->
    <<- alarm
  else
    <>
  ;
;