Simmer onion in water in a 3- to 4-quart heavy saucepan, uncovered, until tender, 10 to 15 minutes.
Add cranberries and zest and simmer, uncovered, until berries are collapsed, about 10 minutes. Discard zest. Purée berries in a food processor, then force through a large sieve into saucepan and discard solids.
Stir in sugars, five-spice powder, and salt and simmer, stirring occasionally, 5 minutes, then cool completely.
• Cranberry ketchup keeps, chilled in an airtight container, 1 month.