\chapter{Animals}
instead of
== Animals
or should that be:
=== Animals
I think an xml or html like approach is better:
<chapter>Animals</chapter>
One of the big issue is modal states for structure or styling.
I've often found trouble in latex because you are in some state that you didn't expect and somehow have to get out of.
Nested XML would hopefully be more obvious about what your state is.
Docbook probably got this right, but it was too verbose for most.