This situation has never arisen, but if I'm confronted by a police officer and enough evidence that I'm sure they could get a court order, I'd rather be cooperative than force them to go through the courts. This doesn't mean that I'd give them any more data than they would get from a court order -- in fact, quite the opposite, since police tend to err on the side of requesting more than they need when going through the courts, and cooperating could change "seize a server" into "get a copy of the required data".
Beyond that, it's a judgement call. Lots of countries have agreements to assist each others' police forces in obtaining evidence.
If swedish police comes to you directly, you don't have to comply, but if they go through the proper channels, the request to you, comes from canadian police.