The taxi driver cheerfully explained that the king wanted a son, to inherit the throne (Salic law and all that), and then a daughter, to marry another king and extend alliances. I suspect, mortality rates being what they were, he probably wanted at least an heir and a spare before the daughter. . . .
But I was looking to wrap up the tale and considering that the king and queen would also want the king's choice -- not so much for the throne, because they could always offer their daughter and half the kingdom to a handy hero, but because they know the tropes: when you have children of both sexes, there's less sibling rivalry. Not invariably, mind you, if you had more than one of either sexes. And sometimes two siblings of the same sex get along just fine.
Still, they're going to be happy about the king's choice at the end, before I tie up the last thread with the story that actually began before the story.