[wsf-dev] lu:Status

Asa Hardcastle asa.openliberty at zenn.net
Tue Dec 18 18:24:28 PST 2007


In the idwsf utility v2.0 schema (urn:liberty:util:2006-08) the Status  
type appears to be defined so that it can have itself as a child  
element making this a completely legal XML fragment:

...
<Status code="Failed">
   <Status code="MissingSecurityMechIDElement"/>
   <Status code="MissingSelect"/>
</Status>
...

and actually:

<Status code="Failed">
   <Status code="MissingSecurityMechIDElement">
     <Status code="NoFunWithoutSechMechId"/>
     <Status code="BigTimeFailed">
         <Status code="ForSure" comment="Totally for sure"/>
     </Status>
   </Status>
   <Status code="MissingSelect"/>
</Status>



Am I reading this XSD properly?


     <xs:complexType name="StatusType">
         <xs:annotation>
             <xs:documentation>
                 A type that may be used for status codes.
             </xs:documentation>
         </xs:annotation>
         <xs:sequence>
             <xs:element ref="Status" minOccurs="0"  
maxOccurs="unbounded"/>
         </xs:sequence>
         <xs:attribute name="code" type="xs:string" use="required"/>
         <xs:attribute name="ref" type="IDReferenceType"  
use="optional"/>
         <xs:attribute name="comment" type="xs:string" use="optional"/>
     </xs:complexType>

     <xs:element name="Status" type="StatusType">
         <xs:annotation>
             <xs:documentation>
                 A standard Status type
             </xs:documentation>
         </xs:annotation>
     </xs:element>


If I'm reading this properly, why was this decision made?


thanks in advance,

asa



--
Asa Hardcastle, Technical Lead, openLiberty ID-WSF ClientLib
Tel: +1.413.429.1044 Skype: subsystem7




More information about the Wsf-dev mailing list