What is the exact relationship? The history as I remember it is:
1. SGML (Simple Generalised Markup Language) came first. 2. HTML was a specialisation of SGML, it took off because of the web, and is probably the only reason for SGML to become famous. 3. XML was then invented as a generalisation of HTML, perhaps by people who had never heard of SGML.
And I seem to remember DocBook is an SGML thing, it was invented between steps 2 and 3.