A woman has collapsed after being lashed for having sex outside marriage, a violation of Sharia law in Indonesia.