Do DPIDs have hyphens?

It depends.

The canonical form of a DPID is without a hyphen. Hence DPIDs should be used, in DDEX messages, without hyphens:

Do this

<PartyId>PADPIDA3897722461G</PartyID>

Do not do this

<PartyId>PA-DPIDA-3897722461-G</PartyID>

However, for human consumption hyphens may be added. Therefore, the HTML/PDF export of the DPID registry contains hyphens whereas the XML export does not.