[Home] [By Thread] [By Date] [Recent Entries]
Hi Kurt, On Thu, Feb 17, 2022 at 11:09 AM Kurt Cagle <kurt.cagle@g...> wrote:
Nice thought. The schema you've posted, would allow the XML element <airportType>active active civil permanent</airportType> to be reported as valid (i.e, duplicate strings are permitted). It seems that, a modification like following (with XSD 1.1 needed) could fix that, <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="airportType"> <xsd:simpleType> <xsd:restriction base="AirportType"> <xsd:assertion test="count($value) = count(distinct-values($value))"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:simpleType name="AirportType"> <xsd:list> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:enumeration value="civil"/> <xsd:enumeration value="military"/> <xsd:enumeration value="active"/> <xsd:enumeration value="inactive"/> <xsd:enumeration value="permanent"/> <xsd:enumeration value="temporary"/> </xsd:restriction> </xsd:simpleType> </xsd:list> </xsd:simpleType> </xsd:schema> Regards, Mukul Gandhi
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |

Cart



