RE: Proposed Issue 173 Resolution (Hierarchical Fault Codes)

So, if we are going with elements then the schema will look like this:

<xs:simpleType name="faultcodeEnum">
   <xs:restriction base="xs:QName">
     <xs:enumeration value="tns:DataEncodingUnknown" />
     <xs:enumeration value="tns:MustUnderstand" />
     <xs:enumeration value="tns:VersionMismatch" />
     <xs:enumeration value="tns:Sender" />
     <xs:enumeration value="tns:Receiver" />
   </xs:restriction>
</xs:simpleType>

<xs:complexType name="subcodeType" >
   <xs:sequence>
     <xs:element name="value" type="xs:QName" minOccurs="1" />
     <xs:element name="subcode" type="tns:subcodeType" minOccurs="0" />
   </xs:sequence>
</xs:complexType>

<xs:complexType name="faultcodeType" >
   <xs:sequence>
     <xs:element name="value" type="tns:faultcodeEnum" minOccurs="1" />
     <xs:element name="subcode" type="tns:subcodeType" minOccurs="0" />
   </xs:sequence>
</xs:complexType>

Where faultcodeType and subcodeType are to be compared with the previous
model proposed in [20]:

<xs:complexType name='faultcodeType' >
  <xs:sequence>
    <xs:element name='value' type='tns:faultcodeEnum' />
    <xs:element name='sub' type='xsd:QName' minOccurs='0'
minOccurs='unbounded'/>
  </xs:sequence>
</xs:complexType>

Henrik Frystyk Nielsen
mailto:henrikn@microsoft.com

[20] http://lists.w3.org/Archives/Public/xml-dist-app/2001Dec/0000.html

>I could live with that. I prefer attributes because they are generally 
>easier to process since you don't have to worry about their content 
>being broken up into sub-strings by the parser...

Received on Monday, 17 December 2001 12:59:47 UTC