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

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsrp message

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


Subject: xsi:type usage for Extensions


WRRP v1/v2 has a conformance statement that requires all extensions to 
explicitly declare their type using the xsi:type attribute.

Can someone clarify why this is required? In general, the type 
information can be derived by using the element name and namespace 
information, as in

<v1:extensions>
   <ext:foo xmlns:ext="foo:ext:namespace">
     <ext:bar/>
   </ext:foo>
</v1:extension>

When added, an xsi:type would essentially carry the same information, e.g.

<v1:extensions>
   <ext:foo xmlns:ext="foo:ext:namespace" xsi:type="ext:FooType">
     <ext:bar/>
   </ext:foo>
</v1:extension>

The only time xsi:type is required when the XML is using polymorphism as in

<v1:extensions>
   <ext:foo xmlns:ext="foo:ext:namespace" xsi:type="ext:FooSubType">
     <ext:bar/>
   </ext:foo>
</v1:extension>

where FooSubType is extending FooType. In other cases, xsi:type is not 
required for processing the XML.

Moreover, the xsi:type attribute cannot be set when the type is 
anonymous (i.e. when the element declares the type inline).

IMO, this conformance statement is not required. Any comments?

Regards,
Subbu



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