Fry the onions in the
olive oil on very low heat for half an hour. Now add the rest of the
ingredients, and simmer for 15 minutes. Put the mixture in a glass jar,
and keep refrigerated.
You can even leave
the sugar out, if you manage to lower the heat to very very low and
simmer for an 45 minutes or so.
See also a delicious
recipe for endive marmalade.