Creating Attributes and Entries

The 'most proper' way to create a new attribute or entry during execution seems to be along these lines:

work.newAttributeName =  new;

And a combination

mailConfig = new;
mailConfig.from = new;

You can also do it with the work.createElement, though the work.createAttribute method seems to be working though a less direct model.