COLOGNE, Germany — On a street corner in the old part of Cologne, a boy of 9 or 10 approximates Christmas songs on his trumpet. Around him, the elaborate huts of the Altstadt Christmas market play a siren song audible only to ladies of a certain age and their long-suffering husbands.

Booths selling the usual beeswax candles, Russian dolls and kitchen utensils made of olive wood you can find at any market are interspersed with those offering Battenberg lace, lamps made of wood veneer and various other hand-crafted items. One booth sells only crèche figurines. Whatever your children broke last Christmas, no matter how obscure (elephant, $96) can be replaced.

Christmas markets in Germany date to the 15th century and although their original function was as a sort of medieval mall, over the years they have become an important part of the country's social fabric.

During the daytime, the crowd is mostly tourists, hausfrauen and children on school trips. At night, when the market is at its most magical, couples of all ages stroll arm in arm, stopping to sample the Viennese coffee, chocolate from Belgium and Switzerland, and pork and marjoram sausage from the state of Thuringia.

An enormous Christmas tree rises up, towering above the booths. Strings of white lights running from its waist to the nearby rooftops resemble a giant, glowing hoop skirt. The hulking, gothic permanence of the cathedral, now visible only in silhouette, is almost menacing in the face of the temporary frivolity of the season.

The area around Cologne is heavily Catholic. Major church feast days are holidays here, but public displays aren't really the done thing. The only nod to religion at the market is a Nativity scene of figures carved from logs with a chain saw — one way to make sure no one steals the baby Jesus.

The other thing that is missing is a place to visit Santa. In Germany, St. Nikolaus and his devilish counterpart Krampus come on Dec. 6. Any Santa paraphernalia for sale in the market is for English tourists.

In the spaces between the booths, people stand in groups of three or four, laughing and enjoying one another's company, much like you would find at a neighborhood barbecue. "This is typical of Cologne and the Rhine area," said Bernd Niemann, a local psychotherapist. "Everybody is very social. They love to come together and have a party. It's not like that everywhere in Germany."

The lubrication for all this conviviality is a mulled wine flavored with cinnamon, cloves and star aniseed called glühwein.

The market in Rudolfplatz, a square about a mile away, is not intended so much for tourists. Much of the Black Forest old worldly charm of the Altemarkt booths has been dispensed with in favor of what appear to be prefab garden sheds. Glühwein and the urge to socialize is bigger than any aesthetic objections, and even on a Monday night the place is packed. With men.

Engineer Fernando Pizer, 33, is meeting with friends. "Monday is unofficial gay night at the market, but only here in Rudolfplatz. You see people you see online in real life."

The locals may keep the glühwein vendors in business, but they don't tend to buy the rest of the goods on offer. "I've never shopped for a gift here," said Peter Stamm. "Usually you only get something here if you are desperate for a last-minute gift."

Pascal Raviol, 43, has been working in Christmas markets for years. A canny businessman, he knows exactly what the market is selling.

"People can access the modern world so easily," he said outside his chocolate stall, "but what they really want is what is in their heart. What they remember from being a child. We give the people that come here a feeling. We are like actors on the stage."

For the most part, the locals find tourists' fascination with the city perplexing. "I don't understand it because there are much better places in Germany [than Cologne] to visit," said Niemann. "They bring in a lot of money though, so it's fine."

Germany, via Queen Victoria's German husband, Prince Albert, is responsible for many American Christmas traditions (the tree, ornaments, lights, tinsel, Advent calendars, gingerbread houses and candy canes), and German immigrants have brought Christmas markets to places like Chicago, Cincinnati and Pennsylvania.

Peter Stamm has been to one and found it lacking in one important aspect, "It was very nice, but the glühwein was non-alcoholic. How can you have fun with that?"