I've recently started seeing the value Type::OpenDataObjectType returned from a getTypeEnum(). I was a bit surprised to see this - I know it was introduced some months back internally to Tuscany, but my understanding was that it is not part of the API, or indeed of the specification.

The circumstance is when an element which is not a known type is created in the graph. An attempt to introspect the model then results in this type being returned. For example, a schema like:

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema";
       targetNamespace="http://www.example.org/test";
       xmlns:tns="http://www.example.org/test";>

   <complexType name="TestType" mixed="true">
       <sequence>
           <element name="jim" type="string"/>
<any namespace="##any" processContents="lax"/> </sequence>
   </complexType>
<element name="test" type="tns:TestType"/> </schema>

and a document like:
<?xml version="1.0" encoding="UTF-8"?>
<tns:test xmlns:tns="http://www.example.org/test";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://www.example.org/test cdata2.xsd ">
 <jim>jim_value</jim>
 <entry>entry_value</entry>
</tns:test>

will provoke this problem when I try to get the type of <entry>.

Unfortunately for me, the SDO for PHP code is littered with big switches whose discriminator is the TypeEnum, and the valid cases end with TextType :-( . I can go and revisit them all to add OpenDataObjectType, but first I'd like to understand whether it was your intention to expose this type to the user of the API, or if it is showing through where it shouldn't.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to