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

 


Help: OASIS Mailing Lists Help | MarkMail Help

wss message

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


Subject: Use of Open Enumerations in XSD for WSS


I have an action to revive discussion of so-called 'open enumerations'
in the WSS XSD. This was first raised by Rich Salz earlier this year[1]

As noted in that mail, the technique is fairly straightforward. To pick
an example based on the existing WSS spec, we could take the existing
PasswordString type:

<xsd:complexType name="PasswordString">
 <xsd:annotation>
  <xsd:documentation>This type is used for password elements per Section
4.1.</xsd:documentation> 
 </xsd:annotation>
 <xsd:simpleContent>
  <xsd:extension base="wsse:AttributedString">
   <xsd:attribute name="Type" type="xsd:anyURI" /> 
  </xsd:extension>
 </xsd:simpleContent>
</xsd:complexType>

and make the Type attribute into an open enumeration:

<xs:simpleType name='PasswordTypes' >
 <xs:restriction base='xs:anyURI' >
  <xs:enumeration
value='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-
token-profile-1.0#PasswordText' />
  <xs:enumeration
value='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-
token-profile-1.0#PasswordDigest' />
 </xs:restriction>
</xs:simpleType>

<xs:simpleType name='PasswordTypeOpenEnum' >
 <xs:union memberTypes='wsse:PasswordTypes xs:anyURI' />
</xs:simpleType>

<xsd:complexType name="PasswordString">
 <xsd:annotation>
  <xsd:documentation>This type is used for password elements per Section
4.1.</xsd:documentation> 
 </xsd:annotation>
 <xsd:simpleContent>
  <xsd:extension base="wsse:AttributedString">
   <xsd:attribute name="Type" type="wsse:PasswordTypeOpenEnum" /> 
  </xsd:extension>
 </xsd:simpleContent>
</xsd:complexType>

Hope this makes sense, if anyone has any questions, fire away!

Cheers

Gudge


[1] http://lists.oasis-open.org/archives/wss/200402/msg00011.html


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