From: Heiko B. <hb...@jb...> - 2006-06-23 20:58:10
|
User: hbraun Date: 06/06/23 16:58:08 Modified: src/main/org/jboss/xb/binding/sunday/marshalling MarshallerImpl.java Log: revert xmime:contentType. this needs to be reconsidered Revision Changes Path 1.8 +2 -8 jboss-common/src/main/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java (In the diff below, changes in quantity of whitespace are not shown.) Index: MarshallerImpl.java =================================================================== RCS file: /cvsroot/jboss/jboss-common/src/main/org/jboss/xb/binding/sunday/marshalling/MarshallerImpl.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- MarshallerImpl.java 21 Jun 2006 08:19:18 -0000 1.7 +++ MarshallerImpl.java 23 Jun 2006 20:58:08 -0000 1.8 @@ -69,7 +69,7 @@ /** * @author <a href="mailto:al...@jb...">Alexey Loubyansky</a> - * @version <tt>$Revision: 1.7 $</tt> + * @version <tt>$Revision: 1.8 $</tt> */ public class MarshallerImpl extends AbstractMarshaller @@ -364,12 +364,10 @@ if(xopMarshaller != null && isXopOptimizable(type)) { String cid = null; - String contentType = null; if(xopMarshaller.isXOPPackage()) { Object o = stack.peek(); DataHandler dataHandler = getDataHandler(o); - contentType = dataHandler.getContentType(); cid = xopMarshaller.addMtomAttachment(dataHandler, elementNs, elementLocal); } @@ -393,19 +391,15 @@ } else { - AttributesImpl attrs = new AttributesImpl(3); + AttributesImpl attrs = null; String prefix = getPrefix(elementNs); boolean genPrefix = prefix == null && elementNs != null && elementNs.length() > 0; if(genPrefix) { prefix = "ns_" + elementLocal; + attrs = new AttributesImpl(1); declareNs(attrs, prefix, elementNs); } - if(contentType!=null) - { - attrs.add(Constants.NS_XML_SCHEMA, "xmime", "xmlns:xmime", "CDATA", "http://www.w3.org/2005/05/xmlmime"); - attrs.add(null, "contentType", "xmime:contentType", "CDATA", contentType); - } String qName = prefixLocalName(prefix, elementLocal); content.startElement(elementNs, elementLocal, qName, attrs); |