Era-medieval. Lovers meet with each other in their dreams

Maybe medieval era. Vaguely remember the plot. The woman is married and falls in love with another man. They are caught by her husband who fights him with a sword. The lover is imprisoned. When he sleeps, he can visit her in his dreams, and she does as well. Can someone tell me the name of this movie?

Just a wild guess, maybe?:
“Sorellina e il principe del sogno” (1996), also known as “Alisea and the Dream Prince”