Element identifierElement = doc
.createElement(SignerConstants.SIGNATURE_PROPERTY_ID_IDENTIFIER_TAG_NAME);
identifierElement.setTextContent(name);
identifier.appendChild(identifierElement);
SignatureProperties props = new SignatureProperties(doc);
props.setXPathNamespaceContext(SignerConstants.XMLNS_DSP,
SignerConstants.SIGNATURE_PROPERTIES_NAMESPACE);
props.addSignatureProperty(profile);
props.addSignatureProperty(role);
props.addSignatureProperty(identifier);
ObjectContainer object = new ObjectContainer(doc);
object.setId("prop");
object.appendChild(doc.createTextNode("\n"));
object.appendChild(props.getElement());
object.appendChild(doc.createTextNode("\n"));
//Refer the properties section of the signature which needs
//to be signed too, that include role information.
sig.appendObject(object);