boolean declareXsiType)
{
String elementNs = elementQName.getNamespaceURI();
String elementLocal = elementQName.getLocalPart();
XOPMarshaller xopMarshaller = schema.getXopMarshaller();
if(xopMarshaller == null)
{
xopMarshaller = type.getXopMarshaller();
}
if(xopMarshaller != null && isXopOptimizable(type))
{
if(xopMarshaller.isXOPPackage())
{
// XOPMarshaller callback will create the attachment part
Object o = stack.peek();
String cid = xopMarshaller.addMtomAttachment(new XOPObject(o), elementNs, elementLocal);
// Create the xopInclude element from CID and exit
AttributesImpl attrs = null;
String prefix = getPrefix(elementNs);
boolean genPrefix = prefix == null && elementNs != null && elementNs.length() > 0;