Where does the expression “castle in the air (or in Spain)” come from and What does it mean?

Un château en Espagne has been the French expression since the fourteenth century, and as the Greeks and the Romans and the ancient Egyptians could build such marvelous yarns around the arrangement of stars in the constellations, Orion’s belt, Cassiopeia’s chair, the Great Bear (Ursa Major), and so on, and so on, it must be that they, too, had some equivalent for a castle in Spain or in the air.

Sometimes the early Gallic dream site was en Asie, or sometimes en Albanie, but always in some land or region where one could not conceivably acquire space for so impossible an edifice as a castle.

We first adopted the translation, “a castle in Spain,” which appears in The Romaunt of the Rose (c. 1400): “Thou shalt make castels thanne in Spayne, And dreme of Ioye (joy), alle but in vayne.”

Some dream architects of the sixteenth century began to design their structures for the skies or for the air, as we do today, and with a third site in Spain.