NamespaceResolver nsr = new NamespaceResolver();
nsr.setDefaultNamespaceURI(XMLConstants.XMLNS_URL);
XMLField field = new XMLField();
field.setNamespaceResolver(nsr);
field.setXPath("@" + XMLConstants.XMLNS);
mapping.addFieldTransformer(field, new NamespaceURITransformer());
mapping.setAttributeAccessor(accessor);
aDescriptor.addMapping(mapping);
} else {
XMLDirectMapping mapping = new XMLDirectMapping();