You are free to copy, distribute, transmit and adapt our data, as long as you credit OpenStreetMap and its contributors.
...
How to credit OpenStreetMap
We require that you use the credit “© OpenStreetMap contributors”.
You must also make it clear that the data is available under the Open Database License, and if using our map tiles, that the cartography is licensed as CC BY-SA. You may do this by linking to this copyright page.
...
For a browsable electronic map, the credit should appear in the corner of the map.
So we should add a proper copyright item to the xml format and display it on the map:
<?xml version="1.0" encoding="UTF-8"?>
<map>
<name>Open Street Map</name>
<url>http://tile.openstreetmap.org/$z/$x/$y.png</url>
<copyright>Map data: © OpenStreetMap contributors, ODbL | Rendering: © OpenStreetMap, CC-BY-SA</copyright>
</map>
<?xml version="1.0" encoding="UTF-8"?>
<map>
<name>Open Topo Map</name>
<url>https://a.tile.opentopomap.org/$z/$x/$y.png</url>
<zoom max="17"/>
<copyright>Map data: © OpenStreetMap contributors, ODbL | Rendering: © OpenTopoMap, CC-BY-SA</copyright>
</map>