tuscany-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Budinsky <fra...@ca.ibm.com>
Subject Re: [C++] SDO overlapping annonymous types problem
Date Mon, 30 Apr 2007 15:11:30 GMT
This is an open issue against the SDO specification. In Tuscany SDO-Java 
we automatically rename such duplicates: e.g., the second type would be 
named "Overlapping1". The next version of the spec needs to define a 
"standard" way to handle this.

Frank.

"Pete Robbins" <robbinspg@googlemail.com> wrote on 04/30/2007 09:30:34 AM:

> Is this a specification problem? I'm fairly sure the SDO spec states 
that
> the Type name for an anonymous type is taken from the enclosing element. 
In
> your example you have 2 types with the same name in the same namespace.
> 
> Cheers,
> 
> 
> On 27/04/07, Simon Laws <simonslaws@googlemail.com> wrote:
> >
> > I talking to a user of the PHP SDO implementatio about a problem they 
have
> > where SDO fails to parse an XML file with the error:
> >
> > SDO_DAS_XML_ParserException  - unknown element errors...
> >
> > Looking at the code what seems to be going on is that annonymous types 
are
> > being overwritten when the annonymous types have the same element 
name,
> > for
> > example, If I have the schema:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <schema xmlns="http://www.w3.org/2001/XMLSchema"
> >        targetNamespace="http://www.example.org/AnnonTypes"
> >        xmlns:tns="http://www.example.org/AnnonTypes"
> > elementFormDefault="qualified">
> >
> >        <element name="Top">
> >          <complexType>
> >            <sequence>
> >              <element name="ElementA">
> >                  <complexType>
> >                     <sequence>
> >                        <element name="Overlapping">
> >                          <complexType>
> >                            <sequence>
> >                              <element name="ValueA" type="string"/>
> >                            </sequence>
> >                          </complexType>
> >                        </element>
> >                     </sequence>
> >                  </complexType>
> >              </element>
> >              <element name="ElementB">
> >                  <complexType>
> >                     <sequence>
> >                        <element name="Overlapping">
> >                          <complexType>
> >                            <sequence>
> >                              <element name="ValueB" type="string"/>
> >                            </sequence>
> >                          </complexType>
> >                        </element>
> >                     </sequence>
> >                  </complexType>
> >              </element>
> >            </sequence>
> >          </complexType>
> >        </element>
> > </schema>
> >
> > And the XML
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <tns:Top xmlns:tns="http://www.example.org/AnnonTypes"
> >         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >         xsi:schemaLocation="http://www.example.org/AnnonTypes
> > AnnonTypes.xsd ">
> > <tns:ElementA>
> >    <tns:Overlapping>
> >      <tns:ValueA>tns:ValueA</tns:ValueA>
> >    </tns:Overlapping>
> > </tns:ElementA>
> > <tns:ElementB>
> >    <tns:Overlapping>
> >      <tns:ValueB>tns:ValueB</tns:ValueB>
> >    </tns:Overlapping>
> > </tns:ElementB>
> > </tns:Top>
> >
> > I looked to see if this had been raised as a bug and It didn't look 
like
> > it
> > had. I'll go and do that but was just wondering if that was by design 
for
> > some reason? To fix this we would have to construct a scoping 
mechanism
> > for
> > annonymous types based on the context in which they appear.
> >
> > Regards
> >
> > Simon
> >
> 
> 
> 
> -- 
> Pete


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


Mime
View raw message