[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Extensibility for enumerations
We have been corresponding with an individual at Objective Systems who
is working on the ASN.1 to XML Schema conversion tool we discussed in the last
conference call. I believe he may have joined the DSML group now
too. We discussed the extensibility of enumerations in XML Schema and he
said that through the use of xsd:union and the memberTypes attribute this could
be done. As far as I understand it, he said that the use of the
memberTypes attribute would render the xsd:restrictions listed in the
xsd:enumerations as the "known" values at the time but they would not limited to
those. It sounds reasonable to us but, as I think is well documented here,
we are no XML Schema experts. Can anyone corroborate this? Also, can
anyone suggest a good free XML Schema structure checker?
If this is correct, going back to the DsmlModification from DSML v.2, a 2.1
implementation might look something like this:
<xsd:complexType
name="DsmlModification">
<xsd:sequence> <xsd:element name="value" type="DsmlValue" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> <xsd:attribute name="name" type="AttributeDescriptionValue" use="required"/> <xsd:attribute name="operation" use="required"> <xsd:union
memberTypes="xsd:string">
<xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="add"/> <xsd:enumeration value="delete"/> <xsd:enumeration value="replace"/> </xsd:restriction> </xsd:simpleType> </xsd:union>
</xsd:attribute> </xsd:complexType> This, of course, doesn't solve the association of the operation types with
different "value" types as did my earlier example but it would allow additional
xsd:strings to be specified as the operation. If this construct achieves
extensibility for enumerations then XML attributes aren't as restrictive as we
thought and this would address some of the problems we had with the 2.0
specification. Comment? Questions? Insights?
Thanks,
Tom Doman
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]