So we're coming back to the problem: probably it'd be better that the attributes referencing resources/templates/tags in constraints continue being IDREF, no? If so, we'd need to define tags with "id"  somewhere.