Hi

There is no XML loading error, except that the AuditTable element does not
display any data.. rest of the elements which are defined as basic types are
being displayed (Also as Simon pointed out, it was my mistake to quickly
type in the sample xml for this mailing list.. which has the wrong
definition of the AuditTable  element)


It seems that the SDO SAX parser (SDOSchemaSAX2Parser.CPP) does not like 2
levels of derivations? (Any type below the first level in the derivation
hierarchy is not recognized as a descendant of a basic type?)

--------------------------------
 Re: SDO and Complex Content / extension base not working

from tuscany-user@ws.apache.org
Archives<http://www.google.com/reader/view/feed/http%3A%2F%2Fmail-archives.apache.org%2Fmod_mbox%2Fws-tuscany-user%2F%3Fformat%3Datom>by
"Simon
Laws" <[EMAIL PROTECTED]>

On Tue, Apr 22, 2008 at 10:59 AM, Prashanth Rao <[EMAIL PROTECTED]>
wrote:

>  Hi
>
> Can you help me in resoving a issue i am facing with SDO C++
> implementation.
>
> 1. I have 2 xsd's and I am loading the main XSD (Audit) along with the xml
> in the SDO C++ program
> 2. However, when the xml load is done (using xmlhelper) I dont see the
> data
> for "AuditTable" element , I see the data only for "AuditID" element
>
> 3. When i change the type for "AuditTable" element as below, The xml
> loading
> happens
>  <xs:element name="AuditTable" type="stype:ENUM" minOccurs="0"/>
>
> 4. What could be the reason for this behaviour? Is it that SDO C++ does
> not
> support <complexContent>?
> I have tried even changing that to <simpleContent> as well.. but still no
> luck
>
>
> Please help me out.
>
>
>
>
> AUDIT.XSD
> -------------
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:tns="http://www.xyz.com/cash"; xmlns:xs="
> http://www.w3.org/2001/XMLSchema"; xmlns:stype="http://www.xyz.com/stype";
> targetNamespace="http://www.xyz.com/cash"; elementFormDefault="qualified">
>  <xs:import namespace="http://www.xyz.com/stype";
> schemaLocation="stype.xsd"/>
>  <xs:element name="AUDIT">
>  <xs:complexType>
>   <xs:sequence>
>    <xs:element name="AuditId" type="stype:STRING" minOccurs="0"/>
>    <xs:element name="AuditTable" type="tns:sTable" minOccurs="0"/>
>   </xs:sequence>
>  </xs:complexType>
>  </xs:element>
>  <xs:complexType name="AuditTable">
>   <xs:complexContent>
>    <xs:extension base="stype:ENUM"/>
>   </xs:complexContent>
>  </xs:complexType>
> </xs:schema>
>
>
>
> ----------------------------------------------------------------------------------------------
>
> STYPE.XSD
> --------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:sutype="
> http://www.xyz.com/stype"; targetNamespace="http://www.xyz.com/stype";
> elementFormDefault="qualified">
>  <xs:complexType name="ENUM">
>  <xs:simpleContent>
>   <xs:extension base="xs:string">
>    <xs:attribute name="TYPE" fixed="ENUM"/>
>    <xs:attribute name="derived" use="optional"/>
>    <xs:attribute name="readonly" use="optional"/>
>    <xs:attribute name="required" use="optional"/>
>   </xs:extension>
>  </xs:simpleContent>
>  </xs:complexType>
>  <xs:complexType name="STRING">
>   <xs:simpleContent>
>    <xs:extension base="xs:string">
>     <xs:attribute name="TYPE" use="optional"/>
>     <xs:attribute name="derived" use="optional"/>
>     <xs:attribute name="readonly" use="optional"/>
>     <xs:attribute name="required" use="optional"/>
>    </xs:extension>
>   </xs:simpleContent>
>  </xs:complexType>
>
>
> ---------------------------------------------------------------------------
> AUDIT.XML
>
> <?xml version="1.0" encoding="UTF-8"?>
> <tns:AUDIT xsi:schemaLocation="http://www.xyz.com/cash AUDIT.xsd"
> xmlns:tns="http://www.xyz.com/cash"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance";>
><tns:Audit_Id>AUDITID</tns:Audit_Id> //should be <tns:AuditId>
><tns:Audit_Table>AD</tns:Audit_Table>// should be <tns:AuditTable>
> </tns:AUDIT>
> -----------------------------------
>

Hi Prashanth

Are you seeing any errors reported when you load the XML?

Looking at it purely manually you have elements, for example, called
<tns:Audit_Table>ABCD</tns:Audit_Table> but defined as <xs:element
name="AuditTable" type="tns:sTable" minOccurs="0"/>.

Regards

Simon

Reply via email to