Because those inside the city needed guidance and protection, the people had devised a thing called royalty, where some of their number would be exalted and obeyed. There was a king and a queen and a princess too. And because the goats outside had similar needs, there was a goatherd. But because goats are more manageable than people, there was only the one.
The goatherd was a small boy, and a lonely boy because after all goats make for poor company. But he loved his mother, and he was happy enough, because he knew a secret. He knew how to see a princess.
Every day, he would drive his goats to market, to sell or to buy or to simply wonder at the innumerable marvels and mysterious odds and ends that accumulated in the city from the ends of the earth. And every day, he knew, the beautiful princess in a pale white coat would travel the city. Sometimes she too would wander the market, never buying or selling - that’s what servants are for, after all - but always looking, and he imagined that her wonderment must be the same as his.
Because she was a beautiful princess and he was a lonely goatherd, he of course thought her better than all the treasures in all the cities in the world, and he would wait by the gates of the market, hoping to catch a glimpse of her. The citizens of the city would stream past him, watching him curiously, perhaps wondering why this boy was crouched on a crate and staring intently past them. But they did not wonder for long, because the market is more interesting than a goatherd.
Once - twice - three times did the goatherd speak to the princess in white. Each time he was charmed by her, and each time did she walk away smiling. In time, the boy sold his goats, and bought new goats. But times became difficult, and goats no longer sold at market as they had before. Wearily the boy put on his sandals, for his mother had commanded him to go out into the world and seek his fortune. He spoke not of his love and admiration for the princess in white, because he and his mother were poor and needed to eat before they could think of such fanciful things.
He went, and the goatherd became a traveler, and then a craftsman of his own. And he himself was responsible for many of the innumerable marvels and mysterious odds and ends that turn up at market. But he never looked for the princess again, because after all she was a princess and he was only a goatherd.