If you were passing the parent of the Placemark elements to the function as the value of the $content parameter, your code would be fine. But it looks as if you're calling the function with some expression like local:fct(doc(...)//Placemark)
, which means the members of the $content sequence are themselves the Placemark elements. Your function then asks for their Placemark children; there are none, so the empty sequence is what you get.
The revised function suggested by wst is a fine way to fix the problem; passing in the parents of the Placemark elements as the value of $content would be another fine way.