document.getElementById

It is mentioned that 'id' needs to be of type ID but it is not explained how this is accomplished.
Typically the DTD will handle the typing but with XBL new elements are introduced which may not be mentioned in the DTD.