// Get the current request context
MarinerRequestContext requestContext =
marlinContext.getInitialRequestContext();
IAPIElement element = elementStackEntry.element;
IAPIAttributes attributes = elementStackEntry.attributes;
try {
// Invoke the PAPIElement's elementEnd method.
int result = element.elementEnd(requestContext, attributes);
// Reset the element, make sure that it uses the same context as
//was passed to the elementStart and elementEnd methods.
element.elementReset(requestContext);
// Reset the attributes.
if (attributes != null) {
attributes.reset();
}