final Collection<Collection<AssertionSet>> alternativeSets = new LinkedList<Collection<AssertionSet>>();
final StringBuilder id = new StringBuilder();
NamespaceVersion mergedVersion = policies.iterator().next().getNamespaceVersion();
for (Policy policy : policies) {
alternativeSets.add(policy.getContent());
if (mergedVersion.compareTo(policy.getNamespaceVersion()) < 0) {
mergedVersion = policy.getNamespaceVersion();
}
final String policyId = policy.getId();
if (policyId != null) {
if (id.length() > 0) {