diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-07 03:01:06 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-12-07 03:01:06 +0100 |
commit | b714eeba4163c03532ac9cd017095dba8932a81c (patch) | |
tree | a0f3a238b4097ef0907bfe9ea44c7f954551c1e8 /tests/auto/qxmlschemavalidator/testdata | |
parent | 4c155d94a294ace4a402f135272f04bcd73f4732 (diff) | |
parent | 089bdc0fcc1d87c6f5fe0835a4f723a6677e9a01 (diff) | |
download | qtxmlpatterns-b714eeba4163c03532ac9cd017095dba8932a81c.tar.gz |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I967a3678e5791457e25618e46611f6327e182c70
Diffstat (limited to 'tests/auto/qxmlschemavalidator/testdata')
-rw-r--r-- | tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xml | 6 | ||||
-rw-r--r-- | tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xsd | 36 |
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xml b/tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xml new file mode 100644 index 0000000..1bde466 --- /dev/null +++ b/tests/auto/qxmlschemavalidator/testdata/QTBUG-77620.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<root> + <item key="KEY1" /> + <item key="KEY2" /> + <item key="CUSTOM_KEY1" /> +</root> 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> |