Use 'resource' attribute if it exists