summaryrefslogtreecommitdiff
path: root/tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xsd
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-10 03:02:04 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-12-10 03:02:04 +0100
commitfd98985f82cd6a6bb71f4653455d2709c3da5b82 (patch)
treeac9845eaf48231ed615e571da4cf81c15db7f2ed /tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xsd
parent5caf6d31f90a502ad0ca7cd1e222d84e67b77259 (diff)
parentb714eeba4163c03532ac9cd017095dba8932a81c (diff)
downloadqtxmlpatterns-fd98985f82cd6a6bb71f4653455d2709c3da5b82.tar.gz
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I3eb54f906dc1ee8fedf64a4cde67edb3f8ce5460
Diffstat (limited to 'tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xsd')
-rw-r--r--tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xsd36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xsd b/tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xsd
new file mode 100644
index 0000000..33657c7
--- /dev/null
+++ b/tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xsd
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:simpleType name="pattern_type">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="CUSTOM_[0-9a-zA-Z]+" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="enum_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="KEY1" />
+ <xs:enumeration value="KEY2" />
+ <!-- Note: *no* matching entry for key "CUSTOM_KEY1" -->
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="union_type">
+ <xs:union memberTypes="enum_type pattern_type" />
+ </xs:simpleType>
+
+ <xs:element name="root">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="item" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:attribute name="key" type="union_type" use="required" />
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:key name="primary_key">
+ <xs:selector xpath="./item" />
+ <xs:field xpath="@key" />
+ </xs:key>
+ </xs:element>
+</xs:schema>