if (fragment != null) {
/*
* In RFC 112 the Fragment-Host is represented as a "<extend/>" element
* not a "<require extend="true"/>" element.
*/
Require require = new Require();
require.setExtend(true);
require.setMultiple(false);
require.setOptional(false);
require.setName(CAPABILITY_BUNDLE);
require.setContent("Required Host: " + fragment.getName());
VersionRange range = fragment.getVersionRange();
String versionExpression = getVersionFilter(range);
require.setFilter("(&(symbolicname=" + fragment.getName() + ")" + versionExpression + ")");
resource.getRequire().add(require);
// Add "fragment" capability
Capability cap = new Capability();