Simon, I'll take a look at this. It may be fairly simple to mirror what the
Tuscany Java implementation does.

On 01/05/07, Simon Laws <[EMAIL PROTECTED]> wrote:

On 4/30/07, Frank Budinsky <[EMAIL PROTECTED]> wrote:
>
> 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" <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> Ok thanks Frank/Pete. I checked the C++ spec and it does just say that
the
name of the annonymous type is the same as the name of the enclosing
element
declaration. So it's working as specified but we need to fix the spec.  I
recorded this as TUSCANY-1238 lest we forget.

Regards

Simon




--
Pete

Reply via email to