add factory attribute in Resource element
Merge remote-tracking branch 'origin/bugfix-#241' into release-0.2.0