Error while sorting

Hi there, Anybody know why this happens?
This is what I write for the query

{ for $a in document(“mondial-3.0.xml”)/mondial/country[@name = “Peru”]//city
order by $a/name/text()
return {$a/name/text()}
}


There is a city name with value like this:
“Cuzco
,
Cusco” or something, Is there a way to get this straight?

Prints out:
Type Error: Type declaration failed. Type of value:
Cuzco
,
Cusco
does not match type:
atomic?.
[File “q1i.xq”, line 2, characters 3-150: ]

Any help will be very appreciated, thanks!!

-Overdatop

Hello there,

could you please post the schema for the document being queried?

Thanks,
Trevor.