Hello,
Looking at the implementation of Model Documents, if you drag-n-drop a package onto a «model document» class, the resulting attribute has its Type property set to "Package" and, behind the scenes, its Classifier set to the Object_ID of the package element.
This is clearly a kludge, since you can't select a package if you bring up the attribute's Select Type dialog (you must select a non-package classifier).
Since it is a kludge, it might not be beyond the pale to suggest it is changed to set the attribute's Classifier to the package's Package_ID instead.
Clearly the intent is to reference a package, not an element. So probably the first thing EA does when generating a document (HTML or RTF) out of a «model document» is to look up the package that corresponds to the referenced element Object_ID, whether by matching the GUID or PDATA1, and then proceeding with that package.
If that is the case, changing that snippet of code to directly look up the package instead of going through the element should be easy.
Now EA doesn't allow you to drag-n-drop a root node onto a diagram, and presumably allowing that would bring a host of other problems that Sparx would prefer not to deal with.
But if they can change the handling of the «model document»s' "Package" attributes, you could then write a script which adds such an attribute, referencing a root node, to a «model document».
If there are backward-compatibility issues with this solution, they could just add a new type of attribute for proper package references; call it "PackageRef" or some such (since "Package" is already taken).
/Uffe