You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Pete Robbins <ro...@googlemail.com> on 2007/08/03 10:15:18 UTC

SDO sequenced DataObject vs XSD

A Jira (https://issues.apache.org/jira/browse/TUSCANY-1504)  has been
raised against the SDO C++ implementation which is saying that for a
schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:letter="http://letterSchema"
  targetNamespace="http://letterSchema">
  <xs:element name="letters" type="FormLetter"/>
  <xs:complexType name="FormLetter">
      <xs:sequence>
      <xs:element name="date" type="xs:string"/>
      <xs:element name="firstName" type="xs:string"/>
      <xs:element name="lastName" type="xs:string"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>

the complex type "http://letterSchema#FormLetter" is not "sequenced"
in SDO terms. I believe this is correct as the SDO use of the term
"sequenced" is related to the order of the setting of the properties
and in the above case maxOccurs=1 on the sequence and each of the
contained elements.This means an instance of a FormLetter DataObject
returns NULL for getSequence() in our implementation.

So... is my interpretation of the spec correct?

Cheers,

-- 
Pete

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


Re: SDO sequenced DataObject vs XSD

Posted by kelvin goodson <ke...@gmail.com>.
Yes Pete,  you are correct.  The XML schema sequence concept fixes the
order of elements in that sequence.  The SDO Sequence concept is there
to preserve the instance ordering of elements when the metadata does
not fix it.

Regards, Kelvin.

On 03/08/07, Pete Robbins <ro...@googlemail.com> wrote:
> A Jira (https://issues.apache.org/jira/browse/TUSCANY-1504)  has been
> raised against the SDO C++ implementation which is saying that for a
> schema:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
>   xmlns:letter="http://letterSchema"
>   targetNamespace="http://letterSchema">
>   <xs:element name="letters" type="FormLetter"/>
>   <xs:complexType name="FormLetter">
>       <xs:sequence>
>       <xs:element name="date" type="xs:string"/>
>       <xs:element name="firstName" type="xs:string"/>
>       <xs:element name="lastName" type="xs:string"/>
>     </xs:sequence>
>   </xs:complexType>
> </xs:schema>
>
> the complex type "http://letterSchema#FormLetter" is not "sequenced"
> in SDO terms. I believe this is correct as the SDO use of the term
> "sequenced" is related to the order of the setting of the properties
> and in the above case maxOccurs=1 on the sequence and each of the
> contained elements.This means an instance of a FormLetter DataObject
> returns NULL for getSequence() in our implementation.
>
> So... is my interpretation of the spec correct?
>
> Cheers,
>
> --
> Pete
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

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