You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Ron Gavlin <rg...@yahoo.com> on 2007/04/04 23:14:10 UTC
Problem deserializing element with attribute and xsi:nil="true"
Greetings,
I have the following global element in a schema:
<xsd:element name="query">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="intRange" type="IntegerRange" nillable="true/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="IntegerRange">
<xsd:attribute name="min" type="xsd:integer" />
<xsd:attribute name="max" type="xsd:integer" />
</xsd:complexType>
When I use Tuscany SDO to deserialize the instance document below, the intRange min property does not appear to be set. Is this expected behavior or a bug?
- Ron
<query>
<intRange min="1" xsi:nil="true"/>
</query>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org
Re: Problem deserializing element with attribute and xsi:nil="true"
Posted by Frank Budinsky <fr...@ca.ibm.com>.
It sounds like xsi:nil is taking precedence and the attribute is getting
lost. It still sounds like a bug. This is the standard EMF loader, so it
sounds like it may be an EMF bug. Maybe you could ask the question on the
EMF newsgroup and report back your findings?
Thanks,
Frank.
Ron Gavlin <rg...@yahoo.com> wrote on 04/04/2007 06:40:38 PM:
> No, get("intRange") returns null and ((IntegerRange)
> get("intRange")).get("min") returns an error.
>
> - Ron
>
> Frank Budinsky wrote:
> > It sounds like a bug. Are you saying that get("intRange") is not null,
but
> > get("min") on the intRange is 0 (unset)?
> >
> > Frank
> >
> > Ron Gavlin <rg...@yahoo.com> wrote on 04/04/2007 05:14:10 PM:
> >
> >
> >> Greetings,
> >>
> >> I have the following global element in a schema:
> >>
> >> <xsd:element name="query">
> >> <xsd:complexType>
> >> <xsd:sequence>
> >> <xsd:element name="intRange" type="IntegerRange"
nillable="true/>
> >> </xsd:sequence>
> >> </xsd:complexType>
> >> </xsd:element>
> >>
> >> <xsd:complexType name="IntegerRange">
> >> <xsd:attribute name="min" type="xsd:integer" />
> >> <xsd:attribute name="max" type="xsd:integer" />
> >> </xsd:complexType>
> >>
> >> When I use Tuscany SDO to deserialize the instance document below,
> >> the intRange min property does not appear to be set. Is this
> >> expected behavior or a bug?
> >>
> >> - Ron
> >>
> >> <query>
> >> <intRange min="1" xsi:nil="true"/>
> >> </query>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: tuscany-user-help@ws.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-user-help@ws.apache.org
> >
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org
Re: Problem deserializing element with attribute and xsi:nil="true"
Posted by Ron Gavlin <rg...@yahoo.com>.
No, get("intRange") returns null and ((IntegerRange)
get("intRange")).get("min") returns an error.
- Ron
Frank Budinsky wrote:
> It sounds like a bug. Are you saying that get("intRange") is not null, but
> get("min") on the intRange is 0 (unset)?
>
> Frank
>
> Ron Gavlin <rg...@yahoo.com> wrote on 04/04/2007 05:14:10 PM:
>
>
>> Greetings,
>>
>> I have the following global element in a schema:
>>
>> <xsd:element name="query">
>> <xsd:complexType>
>> <xsd:sequence>
>> <xsd:element name="intRange" type="IntegerRange" nillable="true/>
>> </xsd:sequence>
>> </xsd:complexType>
>> </xsd:element>
>>
>> <xsd:complexType name="IntegerRange">
>> <xsd:attribute name="min" type="xsd:integer" />
>> <xsd:attribute name="max" type="xsd:integer" />
>> </xsd:complexType>
>>
>> When I use Tuscany SDO to deserialize the instance document below,
>> the intRange min property does not appear to be set. Is this
>> expected behavior or a bug?
>>
>> - Ron
>>
>> <query>
>> <intRange min="1" xsi:nil="true"/>
>> </query>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>
>
Re: Problem deserializing element with attribute and xsi:nil="true"
Posted by Frank Budinsky <fr...@ca.ibm.com>.
It sounds like a bug. Are you saying that get("intRange") is not null, but
get("min") on the intRange is 0 (unset)?
Frank
Ron Gavlin <rg...@yahoo.com> wrote on 04/04/2007 05:14:10 PM:
> Greetings,
>
> I have the following global element in a schema:
>
> <xsd:element name="query">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="intRange" type="IntegerRange" nillable="true/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>
> <xsd:complexType name="IntegerRange">
> <xsd:attribute name="min" type="xsd:integer" />
> <xsd:attribute name="max" type="xsd:integer" />
> </xsd:complexType>
>
> When I use Tuscany SDO to deserialize the instance document below,
> the intRange min property does not appear to be set. Is this
> expected behavior or a bug?
>
> - Ron
>
> <query>
> <intRange min="1" xsi:nil="true"/>
> </query>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org