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

 


Help: OASIS Mailing Lists Help | MarkMail Help

provision message

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


Subject: AddRequestType#container won't work.


Along the lines of "element ref won't work", it seems to me that the 
"container" element of AddRequestType is another place where we expect 
polymorphic acceptance of PSOIdentifierType as IdentifierType.  Although 
PSOIdentifierType is derived from IdentiferType, I believe that these 
are two different types.

Here I see two approaches (of which I think Option 2 is better).

Option 1: XSI-TYPE - XSD specifies base type, doc element specifies a 
derived type.
PRO(?): Extensible (will accept custom identifier types).
CON:   Fancy (some tools may not understand this feature.)

For example,  AddRequestType would contain
    <sequence>
         <element name="containerId" type="spml:IdentifierType" 
minOccurs="0"/>
         <element name="data" type="spml:ExtensibleType" minOccurs="0" />
         <element name="capabilityData" type="spml:CapabilityDataType" 
minOccurs="0" maxOccurs="unbounded" />
   </sequence>

The requestor must specify the derived type of containerId (if it's not 
IdentifierType):
<addRequest>
    <containerId xsi:type="PSOIdentifierType" ...>...</containerId>
    <data>...</data>
</addRequest>
Option 2: CHOICE - Specify a choice of derived types.
PRO:  Explicit (and therefore validated by parser).
PRO?CON?: Not extensible (won't accept custom identifier types).

For example,  AddRequestType would contain
    <sequence>
         <choice minOccurs="0">
            <xsd:element name="targetId" type="IdentifierType"/>
            <xsd:element name="psoId" type="PSOIdentifierType"/>
         </choice>
         <element name="data" type="spml:ExtensibleType" minOccurs="0" />
         <element name="capabilityData" type="spml:CapabilityDataType" 
minOccurs="0" maxOccurs="unbounded" />
   </sequence>





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