Improve variable names and add warning in case doctype parsing fails.
Improve variable names and add warning in case doctype parsing fails.

indirectlylit/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,learningequality/kolibri,mrpau/kolibri,mrpau/kolibri