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] ISSUE 157: Support for Facets. Proposed Partial Resolution


Hi Ron,

What's missing from the core spec are what SDO types each facet pertains to.  For example it was not immediately clear to me why MinInclusive was a String property, until I remembered that it can apply to both numerical and date/time XML schema types.  Will these XML schema based facets only apply to their SDO counterparts or will I be able to state for a string property MinInclusive="apple" MaxInclusive="car", where "banana' would be a valid value while "dog" would not be?

Also should Enumeration be limited to List<String>?  I could have an enumeration of other XML schema types:

    <xs:simpleType name="prime-enum">
        <xs:restriction base="xs:int">
            <xs:enumeration value="2"/>
            <xs:enumeration value="3"/>
            <xs:enumeration value="5"/>
            <xs:enumeration value="7"/>
        </xs:restriction>
    </xs:simpleType>

This proposal introduces a backwards compatibility issue, prior to SDO 3.0 when the following XML schema was converted to SDO metadata then the "user-id" property would have been of type "{commonj.sdo}String", with this new proposal the type of the "user-id" property will now be an anonymous subtype of {commonj.sdo}String.

    <xs:complexType name="customer">
        <xs:sequence>
            <xs:element name="user-id">
                <xs:simpleType>
                    <xs:restriction base="xs:string">
                        <xs:minLength value="8"/>
                        <xs:maxLength value="10"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>

-Blaise


4B55CA8D.60009@oracle.com" type="cite">Barack, Ron wrote:
1BC7B594EE497146B0CFF2F493B682340722D670E4@DEWDFECCR02.wdf.sap.corp" type="cite">
Hi,
 
Here are the modifications to the core spec.  I’m still working on the modifications to the Java spec.
 
 
Ron
 
 
 
Remove the end of section 4.4.8, starting at around line 867, the paragraph beginning In addition to the open content properties…”
 
 
Add a section 5.4, as follows:
 
  1. Representation of DataType Facets
SDO defines an open content property and a set of types that can be used to express the constraints on the values given to properties.  The manner in which these constraints are expressed is intended to support a straightforward mapping with facets expressed using XML schema.
Figure 5.4-1 shows the structure of the open content property and the associated facet types. The open content “facets” property, the abstract “Facet” type, and all the concrete subclasses of Facet are in the http://docs.oasis-open.org/ns/opencsa/sdo/facet/200911 namespace.  Note that, as with XML, the constraints (or “facets”) are associated not directly with a property, but rather with a type.  That is, to specify that a property can accept only strings of length 4, a type defining strings of length 4 has to be defined, and used as the type of the property.
 
 
 
 
Individal languages can extend some of the constructs defined by this core specification.  For instance, the Java specification adds a “validator” property to the abstract Facet type.  Many of the concrete facet types defined here follow the pattern that each is characterized by a single property named “value”.  The type of the value property varies, depending on the concrete facet.
An implementation of SDO MUST define the facets property, the abstract Facet type, and all the concrete types defined in table 5.4 -1 [COR05040001]
http://docs.oasis-open.org/ns/opencsa/sdo/facet/200911 type Definition of value property
MinLength Int value
MaxLength Int value
Length Int value
MinInclusive String value
MaxInclusive String value
MinExclusive String value
MaxExclusive String value
TotalDigits Int value
FractionDigits Int value
Enumeration String value
    many = true
Pattern String value
 
Table 5.4‑1
Note that the set of facets defined by this spec is extensible.  Implementations and users can define additional facet types.  There is of course no requirement that all facet types follow the single “value” property pattern.
The SDO 3.0 core specification does not define any implicit validation of values given to properties.  Whether or not to perform “fail-fast” validation is left to the language specific specifications.
 
Add a row to the table in section 7.3.2
 
XML Simple Types SDO Type
   
   
   
   
   
Simple Type with facet
 
<simpleType name=[NAME]>
   <restriction base=[BASE]>
         <[FACET-TYPE] value=[VALUE]/>
    </restriction>
</simpleType>
Type name=[NAME]
  dataType=true
  uri=[URI]
  base=[BASE]
  facets=[FACET]
 
where [FACET] is a DataObject
   type=[FACET-TYPE]
   properties = {
          value = [VALUE]
   }
 
the open content “facets” property and the different FACET-TYPEs are described in section 5.4.
 
 
Add the corresponding compliance point to the appendix:
 
COR05040001 An implementation of SDO MUST define the facets property, the abstract Facet type, and all the concrete types defined in table 5.4 -1
 
 
 


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