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/08/09 10:41:43 UTC

svn commit: r429992 - /incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp

Author: robbinspg
Date: Wed Aug  9 01:41:43 2006
New Revision: 429992

URL: http://svn.apache.org/viewvc?rev=429992&view=rev
Log:
TUSCANY-569 Apply Ed's patch. Temporary solution to support Unions

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

Modified: incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp?rev=429992&r1=429991&r2=429992&view=diff
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp (original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/SDOSchemaSAX2Parser.cpp Wed Aug  9 01:41:43 2006
@@ -399,12 +399,19 @@
                         // Handle <import> of other schema
                         else if (localname.equalsIgnoreCase("union"))
                         {
-                            // TODO - unions not yet supported
+                            // TODO - unions not yet properly supported - for now, whatever the
+                            // enclosing thing is, we will make it an extended primitive based on
+                            // String.
                             bInInvalidContent = true;
-                            if (setter)
-                            {
-                                setter->setError("Schema contains a union which is not yet implemented");
-                            }
+                            //if (setter)
+                            //{
+                            //    setter->setError("Schema contains a union which is not yet implemented");
+                            //}
+
+                            currentType.parentTypeUri = "commonj.sdo";
+                            currentType.parentTypeName = "String";
+                            currentType.isRestriction = true;
+
                         }
                     }
                 }
@@ -513,7 +520,9 @@
                 {
                     bInInvalidContent = false;
                     // the enclosing element is not useful
-                    bInvalidElement = true; 
+                    // TODO - Instead of making the union invalid, we make it an
+                    // extended primitive based on string - so its no longer invalid.
+                    //bInvalidElement = true; 
                 }
             } 
 



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