OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

sdo message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [sdo] Oracle Proposal: SDO 99 - ISSUE 99: Error in allocating SDOType for elements with nillable=true


Good point Blaise. In retrospect, using a primitive base type is a bad idea, period.

I think I'm warming up to your proposal, but let's just go with Proposal 1 then. Forget about Proposal 2, since it makes no sense to force a default value on a restricted type, which may or may not even be in the value set of the type.

Frank.

Inactive hide details for Blaise Doughan ---08/26/2010 11:18:52 AM---If the base type was SDO Int the default value would stillBlaise Doughan ---08/26/2010 11:18:52 AM---If the base type was SDO Int the default value would still be 0 :). -Blaise


From:

Blaise Doughan <blaise.doughan@oracle.com>

To:

Frank Budinsky/Toronto/IBM@IBMCA

Cc:

"sdo@lists.oasis-open.org" <sdo@lists.oasis-open.org>

Date:

08/26/2010 11:18 AM

Subject:

Re: [sdo] Oracle Proposal: SDO 99 - ISSUE 99: Error in allocating SDO Type for elements with nillable=true





If the base type was SDO Int the default value would still be 0 :).

-Blaise

Frank Budinsky wrote:
      One other thing with this part:

      Proposal 2 - Set the default default value for properties corresponding to extended primitive types to the base primitive types default value

      What would happen if the base type's default value is not in the value set of the restricted subtype. For example, a default value of 0 for type OddInt would be "odd" :-)

      Frank.

      Inactive hide details for Frank Budinsky---08/26/2010 10:47:23 AM---Hi Blaise, Your proposal is clean and does work nicely, butFrank Budinsky---08/26/2010 10:47:23 AM---Hi Blaise, Your proposal is clean and does work nicely, but it has one serious

      From:

      Frank Budinsky/Toronto/IBM@IBMCA

      To:

      Blaise Doughan <blaise.doughan@oracle.com>

      Cc:

      "sdo@lists.oasis-open.org" <sdo@lists.oasis-open.org>

      Date:

      08/26/2010 10:47 AM

      Subject:

      Re: [sdo] Oracle Proposal: SDO 99 - ISSUE 99: Error in allocating SDO Type for elements with nillable=true





      Hi Blaise,

      Your proposal is clean and does work nicely, but it has one serious disadvantage IMO.

      From what I've seen, user defined simple types seem to be rarely (almost never) nillable. The reason, I presume, is because the purpose of the subtype is to specify a restricted subset of the values allows by the type. It seems to be uncommon to combine such a restriction of the value set with an extension of the value set to allow null.

      If this is the case, your proposal is penalizing all restricted type users (i.e., forcing them to work with Object instead of the simpler primitive type) just to accommodate a very rare use case.

      Frank.

      Inactive hide details for Blaise Doughan ---08/26/2010 10:18:20 AM---Hello All, Below is a more detailed description of the OraBlaise Doughan ---08/26/2010 10:18:20 AM---Hello All, Below is a more detailed description of the Oracle proposal for SDO 99.

      From:

      Blaise Doughan
      <blaise.doughan@oracle.com>

      To:

      "sdo@lists.oasis-open.org" <sdo@lists.oasis-open.org>

      Date:

      08/26/2010 10:18 AM

      Subject:

      [sdo] Oracle Proposal: SDO 99 - ISSUE 99: Error in allocating SDO Type for elements with nillable=true




      Hello All,

      Below is a more detailed description of the Oracle proposal for SDO 99.


      Section 7.4.2 of the Core Spec regarding nillable simple elements


      "If the type of the element has Simple Content without attributes, a Java Type with an Object instance class is assigned. For example, IntObject instead of Int.

      In an XML document, xsi:nil="true" corresponds to a null value for this property."


      Current Issue - What to do with derived simple types?

      If oddInt extends xsd:int currently


      Section 7.3.2 of the Core Spec regarding extended simple types

      Simple Type with name

      <simpleType name=[NAME]>
      <restriction base=[BASE]/>
      </simpleType>

      corresponds to:

      Type name=[NAME]
      base=[BASE]
      dataType=true
      uri=[URI]

      Meaning that our "oddInt" type will have the super type of Int. THIS is where I think the spec is wrong. Instead of extending Int, it should extend IntObject since this type may be used by a nillable element.


      Proposal 1 - Change Section 7.3.2

      base="[BASE]" if base is capable or represented null, other wise the base corresponds to the corresponding object type

      Proposal 2 - Set the default default value for properties corresponding to extended primitive types to the base primitive types default value


      Consequences

      With the above proposals the impact on the user should be minimal:

                    • The user would see a different super type on their extended simple type
                    • Null would become a valid value on that property, but user would still have to explicitly set a null value.
      Advantages
                    • There is only one SDO type that corresponds to an extended simple type in an XML schema:
                                    • Useful if you want to regenerate the XML Schema from the types
                                    • Useful if you want to have an editor or validator associated with that type
                                    • Having one type requires less memory than having multiple copies of that type
                    • Simpler to implement (logic is restricted to type definition, and only when an extended simple type is encountered).
                    • Simpler to write the description in the specification
      -Blaise




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]