Sweden has compulsory schooling (skolplikt), not compulsory education (läroplikt). Compulsory schooling means that the child is obliged to participate in school activities. Compulsory education (as exists in Finland, for example) instead means that the child must achieve a certain level of knowledge, regardless of how — which opens for homeschooling.
Consequence
Swedish compulsory schooling means that homeschooling is effectively not permitted without exceptional reasons. The child must attend school. The municipality has supervisory responsibility and can impose fines on guardians if the child does not fulfil the compulsory schooling requirement.