Add support for resource as <item type=string.

Closes #1009.