I have inherited a data type that's a simple token enumeration:
<xsd:simpleType name="OFF_SEVERITY_TYPE">
<xsd:annotation>
<xsd:documentation>Offense Severity</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:token">
<xsd:enumeration value="F">
<xsd:annotation>
<xsd:documentation>Felony</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="M">
<xsd:annotation>
<xsd:documentation>Misdemeanor</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="I">
<xsd:annotation>
<xsd:documentation>Infraction</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="V">
<xsd:annotation>
<xsd:documentation>Violation</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
I now need to attach this same enum to a statute as "possible severities that a statute can have". So where the offense can only have one of the tokens, statute must be able to have multiples. Anybody know how I can specify that in an XSD? I looked at <xsd:group>, but I couldn't see a way to use it.
Thanks, Dan
<xsd:simpleType name="OFF_SEVERITY_TYPE">
<xsd:annotation>
<xsd:documentation>Offense Severity</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:token">
<xsd:enumeration value="F">
<xsd:annotation>
<xsd:documentation>Felony</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="M">
<xsd:annotation>
<xsd:documentation>Misdemeanor</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="I">
<xsd:annotation>
<xsd:documentation>Infraction</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="V">
<xsd:annotation>
<xsd:documentation>Violation</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
I now need to attach this same enum to a statute as "possible severities that a statute can have". So where the offense can only have one of the tokens, statute must be able to have multiples. Anybody know how I can specify that in an XSD? I looked at <xsd:group>, but I couldn't see a way to use it.
Thanks, Dan