You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/10/02 06:20:16 UTC

svn commit: r451874 - /incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp

Author: jsdelfino
Date: Sun Oct  1 21:20:13 2006
New Revision: 451874

URL: http://svn.apache.org/viewvc?view=rev&rev=451874
Log:
Added a test to suppress the writing of xsi:type for DataObjects of type commonj.sdo#OpenDataObject

Modified:
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp?view=diff&rev=451874&r1=451873&r2=451874
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp Sun Oct  1 21:20:13 2006
@@ -130,8 +130,8 @@
                     elementName = rootTypeName;
                     elementName = elementName.toLower(0,1);
                 }
-
-                // If the element name is not defined as a global element then we
+                
+                // If the element name is defined as a global element then we
                 // can supress the writing of xsi:type according to the spec
                 bool writeXSIType = true;
 
@@ -151,6 +151,14 @@
                 }
                 catch(SDORuntimeException&)
                 {
+                }
+                
+                // Supress the writing of xsi:type as well for DataObjects of type
+                // commonj.sdo#OpenDataObject
+                if (writeXSIType &&
+                    string(rootTypeURI) == "commonj.sdo" && string(rootTypeName) == "OpenDataObject")
+                {
+                    writeXSIType = false;
                 }
 
                 writeDO(root, elementURI, elementName, writeXSIType, true);



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org