Oooooooh annalinda. Bad advice. There is no right of silence in court (unlike PACE led police interviews). You do not have to answer barristers but if you refuse to answer the Judge, then he may try you for contempt as well. Tread carefully.
If issued with a witness summons, then yes you have to attend. If you fail to show then a warrant can be issued there and then by the Judge for your arrest. This is common practice due to the large amounts of public cash spent before the trial.
If you are the "victim" of the assault as the witness then I suggest you talk to a domestic violence officer at the local police station (sometimes called AVU, anti-victimisation unit)
If you witnessed another event, then in the name of justice you have a moral stand to take. If your husband did it then you must be prepared to stand against him. I am afraid our legal system and freedom (of which no doubt some of your family died for in the great wars) is greater than the love you have for your husband. Likewise if you testify to clear him due to his innocence, then again you must.