You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2006/12/15 08:42:24 UTC

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

Author: robbinspg
Date: Thu Dec 14 23:42:23 2006
New Revision: 487477

URL: http://svn.apache.org/viewvc?view=rev&rev=487477
Log:
Don't write element prefix for commonj.sdo namespace

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=487477&r1=487476&r2=487477
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOXMLWriter.cpp Thu Dec 14 23:42:23 2006
@@ -653,6 +653,7 @@
             SDOXMLString s_true("true");
             SDOXMLString s_xsiNS("http://www.w3.org/2001/XMLSchema-instance");
             SDOXMLString s_xmlns("xmlns");
+            SDOXMLString s_commonjsdo("commonj.sdo");
 
             int rc;
 
@@ -671,9 +672,16 @@
             // First we need to write the startElement                      
             if (isRoot)
             {
-                tnsURI = elementURI;
+                if (elementURI.equals(s_commonjsdo))
+                {
+                    tnsURI = "";
+                }
+                else
+                {
+                    tnsURI = elementURI;
+                }
 
-                if (elementURI.equals("")) {
+                if (tnsURI.equals("")) {
                     rc = xmlTextWriterStartElementNS(writer, NULL, elementName, NULL);
                 }
                 else
@@ -699,7 +707,10 @@
                 // Write the startElement for non-root object
                 SDOXMLString theName=elementName;
 
-                if (!elementURI.isNull() && !elementURI.equals(tnsURI) && !elementURI.equals(""))
+                if (!elementURI.isNull() 
+                    && !elementURI.equals("")
+                    && !elementURI.equals(s_commonjsdo)
+                    && !elementURI.equals(tnsURI))
                 {
                     // Locate the namespace prefix
                     std::map<SDOXMLString,SDOXMLString>::iterator it = namespaceMap.find(elementURI);



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