You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2013/08/23 19:15:30 UTC
svn commit: r1516935 -
/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
Author: fmui
Date: Fri Aug 23 17:15:30 2013
New Revision: 1516935
URL: http://svn.apache.org/r1516935
Log:
avoid invalid XML
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java?rev=1516935&r1=1516934&r2=1516935&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java Fri Aug 23 17:15:30 2013
@@ -389,6 +389,10 @@ public final class XMLConverter {
writer.writeStartElement(namespace, TAG_TYPE);
writer.writeNamespace(PREFIX_XSI, NAMESPACE_XSI);
+ String prefix = writer.getPrefix(namespace);
+ if (prefix != null) {
+ writer.writeNamespace(prefix, namespace);
+ }
if (source.getBaseTypeId() == BaseTypeId.CMIS_DOCUMENT) {
writer.writeAttribute(PREFIX_XSI, NAMESPACE_XSI, "type", PREFIX_CMIS + ":" + ATTR_DOCUMENT_TYPE);