[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Extensibility
Hi all, In relation to extensibility in the
"RelatedSymptoms" field and elsewhere, after looking around, I think
the following two approaches may be interesting: -
We have a field called
Extension which denotes a nonexistent relationship, and which is then defined
in an attribute: <xsd:simpleType name="RelatedSymptomsEnumType"> <xsd:restriction
base="xsd:string"> <xsd:enumeration
value="Causal"/> <xsd:enumeration
value="Supersedes"/> <xsd:enumeration
value="Repetition"/> <xsd:enumeration
value="Other"/> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="RelatedSymptomsType"> <xsd:simpleContent> <xsd:extension base="RelatedSymptomsEnumType"> <xsd:attribute name="other" type="xsd:string"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType>
<xsd:element name="RelatedSymptoms" type="RelatedSymptomsType"/>
This is my favorite approach but creates the need of
RelatedSymptoms relationship to be an element and not simply an attribute as we
have it in the proposal right now... -
Second approach uses a xsd:union, and pretty much makes
recommendations as to the values, but allows any kind of string to be used <xsd:simpleType name="SuggestedRelatedSymptomsType"> <xsd:restriction base="xsd:string">
<xsd:enumeration
value="Causal"/> <xsd:enumeration
value="Supersedes"/> <xsd:enumeration
value="Repetition"/> </xsd:restriction> </xsd:simpleType>
<xsd:simpleType name="RelatedSymptomsType"> <xsd:union memberTypes="SuggestedRelatedSymptomsType xsd:string"/> </xsd:simpleType>
<xsd:element name="RelatedSymptoms" type="RelatedSymptomsType"/>
This
works with the attributes as we have it now, but validation of enumeration
types cannot happen by the parser now (but only in a secondary step). I'm also
not sure whether the support for xsd:union is problematic or not. More on the call today. I have also added this in the issue
tracker. Regards, Stavros
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]