- From: by way of <purple_surfer2000@yahoo.fr>
- Date: Fri, 15 Mar 2002 06:27:33 -0700
- To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>
- Message-Id: <5.1.0.14.1.20020315062725.00b11c78@localhost>
You may use a union of an enumeration and a string instead:
<xsd:simpleType name="DeviceEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="b"/>
<xsd:enumeration value="f"/>
...
</xsd:restriction >
</xsd:simpleType>
<xsd:element name="DeviceDataType">
<xsd:simpleType>
<xsd:union memberTypes="DeviceEnum xsd:string" />
</xsd:simpleType>
</xsd:element>
Regards--
mk
> Is it possible to add a wildcard in the following XML schema enumeration
> example?
>
> <xsd:element name="DeviceDataType">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="b"/>
> <xsd:enumeration value="f"/>
> <xsd:enumeration value="flag"/>
> <xsd:enumeration value="h"/>
> <xsd:enumeration value="i"/>
> <xsd:enumeration value="s"/>
> <xsd:enumeration ! value="*"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:element>
>
> Will the enumeration line that contains: value="*" match any value that
> wasn't equal to
> b, f, flag, h, i, or s? Does a wildcard feature exist in XML Schemas?
>
> Thank you for your help,
>
> Maureen C. Harig
<http://fr.mail.yahoo.com>Yahoo! Mail -- Une adresse @yahoo.fr gratuite et
en français !
Received on Friday, 15 March 2002 09:31:22 UTC