Add support for <item> elements in dimension resource files.

Closes #987. Closes #977.