Apply attributes to generated documents so that they can be accessed in subclass getComponents() method.