@Override
public boolean preProcessSerialise(XMLNamespaceContext namespaces, Object item,
String xpath, Element parent, Document xmldoc, Field field, Payload payload) {
Payload p = (Payload)item;
// See if we have an xpath with a variable in that needs replacing
//String xpath = definition.getXpath();
xpath = XPaths.replaceVariableInXPath(p, xpath);
Element e = PayloadSerialiser.createNode(namespaces, xpath, parent, xmldoc, null, this, field, payload);
// If there are some namespaces defined within this subclass, output them now and add them to the
// collection of namespaces passed into the child payload object
PayloadSerialiser.addNamespaceDeclarations(payload.getNamespaceContext(), e);
namespaces.inheritNamespaces(p.getNamespaceContext());
PayloadSerialiser.serialiseFieldsInPayload(namespaces, p, e, xmldoc);
return false;
}