public void marshalParams(XMLStructure parent, XMLCryptoContext context)
throws MarshalException {
super.marshalParams(parent, context);
XPathFilterParameterSpec xp =
(XPathFilterParameterSpec) getParameterSpec();
Element xpathElem = DOMUtils.createElement
(ownerDoc, "XPath", XMLSignature.XMLNS,
DOMUtils.getSignaturePrefix(context));
xpathElem.appendChild(ownerDoc.createTextNode(xp.getXPath()));
// add namespace attributes, if necessary
Iterator i = xp.getNamespaceMap().entrySet().iterator();
while (i.hasNext()) {
Map.Entry entry = (Map.Entry) i.next();
xpathElem.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:"
+ (String) entry.getKey(), (String) entry.getValue());
}