leptris 1.9.403.1-arm-linux → 1.9.405.0-arm-linux
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/ext/leptris/native/native.c +60 -0
- data/lib/leptris/version.rb +1 -1
- data/lib/leptris/xml/native.so +0 -0
- data/lib/leptris/xml/native_3_3.so +0 -0
- data/lib/libleptris.so +0 -0
- data/vendor-src/README.md +1 -1
- data/vendor-src/libleptris/CHANGELOG.md +147 -8
- data/vendor-src/libleptris/CMakeLists.txt +1 -1
- data/vendor-src/libleptris/src/leptris/descriptor/plan.c +98 -7
- data/vendor-src/libleptris/src/leptris/xsd/compile.c +200 -13
- data/vendor-src/libleptris/src/leptris/xsd/validate.c +133 -24
- data/vendor-src/libleptris/src/leptris/xsd/xsd_internal.h +15 -0
- data/vendor-src/libleptris/test/CMakeLists.txt +6 -0
- data/vendor-src/libleptris/test/abi/test_descriptor.cpp +232 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/i1957/instance.xml +2 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/i1957/schema.xsd +16 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/i1958/schF1.xml +14 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/i1958/schF1_a.xsd +28 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/i1958/schF1_b.xsd +14 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/i1958/schP2.xml +2 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/i1958/schP2_a.xsd +27 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/i1958/schP2_b.xsd +12 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_fixed_empty/isdefault005.xml +1 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_fixed_empty/isdefault005.xsd +9 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_list_default/stZ072.xml +1 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_list_default/stZ072.xsd +12 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_mixed_particleless/ctA033.xml +1 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_mixed_particleless/ctA033.xsd +4 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_redefine_ext/idF025.red +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_redefine_ext/idF025.xml +15 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_redefine_ext/idF025.xsd +30 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_redefine_ext/idF025_base.xsd +7 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/addB104.xml +6 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/addB104.xsd +19 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/attO006.xml +4 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/attO006.xsd +15 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/ctA033.xml +2 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/ctA033.xsd +5 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/ctA035.xml +2 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/ctA035.xsd +5 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF025.red +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF025.xml +15 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF025.xsd +30 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF033.xml +12 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF033.xsd +23 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF033a.xsd +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF034.red +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF034.xml +15 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idF034.xsd +30 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG018.xml +12 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG018.xsd +23 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG018a.xsd +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG019.red +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG019.xml +15 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG019.xsd +30 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG027.xml +12 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG027.xsd +23 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG027a.xsd +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG028.red +8 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG028.xml +15 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/idG028.xsd +30 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/isdefault002.xsd +12 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/isdefault004.xsd +12 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/isdefault005.xml +5 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/isdefault006.xml +5 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/isdefault025.xml +5 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/isdefault026.xml +5 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/stZ072.xml +1 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/stZ072.xsd +20 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/test95960_1.xml +4 -0
- data/vendor-src/libleptris/test/xsd/libxml2-cases/rs35_w3c/test95960_1.xsd +12 -0
- data/vendor-src/libleptris/test/xsd/test_i1957_1958.cpp +90 -0
- data/vendor-src/libleptris/test/xsd/test_rs35_regression.cpp +127 -0
- data/vendor-src/libleptris/vcpkg.json +1 -1
- metadata +60 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="idF033.xsd" xmlns:import="importNS">
|
|
3
|
+
<t val="1">
|
|
4
|
+
<import:r val2="a"> 1 </import:r>
|
|
5
|
+
</t>
|
|
6
|
+
<t val="2">
|
|
7
|
+
<import:r val2="b"> 2 </import:r>
|
|
8
|
+
</t>
|
|
9
|
+
<t val="3">
|
|
10
|
+
<import:r val2="c"> 3 </import:r>
|
|
11
|
+
</t>
|
|
12
|
+
</root>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="importNS">
|
|
3
|
+
<xsd:import namespace="importNS" schemaLocation="idF033a.xsd"/>
|
|
4
|
+
<xsd:element name="root">
|
|
5
|
+
<xsd:complexType>
|
|
6
|
+
<xsd:sequence>
|
|
7
|
+
<xsd:element ref="t" maxOccurs="unbounded"/>
|
|
8
|
+
</xsd:sequence>
|
|
9
|
+
</xsd:complexType>
|
|
10
|
+
<xsd:unique name="tableu">
|
|
11
|
+
<xsd:selector xpath=".//t/import:r"/>
|
|
12
|
+
<xsd:field xpath="@import:val2"/>
|
|
13
|
+
</xsd:unique>
|
|
14
|
+
</xsd:element>
|
|
15
|
+
<xsd:element name="t">
|
|
16
|
+
<xsd:complexType>
|
|
17
|
+
<xsd:sequence>
|
|
18
|
+
<xsd:element ref="import:r"/>
|
|
19
|
+
</xsd:sequence>
|
|
20
|
+
<xsd:attribute name="val" type="xsd:string"/>
|
|
21
|
+
</xsd:complexType>
|
|
22
|
+
</xsd:element>
|
|
23
|
+
</xsd:schema>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="importNS" targetNamespace="importNS">
|
|
3
|
+
<xsd:element name="r">
|
|
4
|
+
<xsd:complexType mixed="true">
|
|
5
|
+
<xsd:attribute name="val2" type="xsd:string"/>
|
|
6
|
+
</xsd:complexType>
|
|
7
|
+
</xsd:element>
|
|
8
|
+
</xsd:schema>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="idF034.xsd">
|
|
3
|
+
<t>
|
|
4
|
+
<r> 1 </r>
|
|
5
|
+
<c val="1"> 1 </c>
|
|
6
|
+
</t>
|
|
7
|
+
<t>
|
|
8
|
+
<r> 2 </r>
|
|
9
|
+
<c val="2"> 2 </c>
|
|
10
|
+
</t>
|
|
11
|
+
<t>
|
|
12
|
+
<r> 3 </r>
|
|
13
|
+
<c val="3"> 3 </c>
|
|
14
|
+
</t>
|
|
15
|
+
</root>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
3
|
+
<xsd:redefine schemaLocation="idF034.red">
|
|
4
|
+
<xsd:complexType name="tabletype">
|
|
5
|
+
<xsd:complexContent>
|
|
6
|
+
<xsd:extension base="tabletype">
|
|
7
|
+
<xsd:sequence>
|
|
8
|
+
<xsd:element name="c">
|
|
9
|
+
<xsd:complexType mixed="true">
|
|
10
|
+
<xsd:attribute name="val" type="xsd:string"/>
|
|
11
|
+
</xsd:complexType>
|
|
12
|
+
</xsd:element>
|
|
13
|
+
</xsd:sequence>
|
|
14
|
+
</xsd:extension>
|
|
15
|
+
</xsd:complexContent>
|
|
16
|
+
</xsd:complexType>
|
|
17
|
+
</xsd:redefine>
|
|
18
|
+
<xsd:element name="root">
|
|
19
|
+
<xsd:complexType>
|
|
20
|
+
<xsd:sequence>
|
|
21
|
+
<xsd:element ref="t" maxOccurs="unbounded"/>
|
|
22
|
+
</xsd:sequence>
|
|
23
|
+
</xsd:complexType>
|
|
24
|
+
<xsd:unique name="tableu">
|
|
25
|
+
<xsd:selector xpath=".//t/c"/>
|
|
26
|
+
<xsd:field xpath="@val"/>
|
|
27
|
+
</xsd:unique>
|
|
28
|
+
</xsd:element>
|
|
29
|
+
<xsd:element name="t" type="tabletype"/>
|
|
30
|
+
</xsd:schema>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="idG018.xsd" xmlns:import2="importNS">
|
|
3
|
+
<t val="1">
|
|
4
|
+
<import2:r val="1"> 1 </import2:r>
|
|
5
|
+
</t>
|
|
6
|
+
<t val="2">
|
|
7
|
+
<import2:r val="2"> 2 </import2:r>
|
|
8
|
+
</t>
|
|
9
|
+
<t val="3">
|
|
10
|
+
<import2:r val="3"> 3 </import2:r>
|
|
11
|
+
</t>
|
|
12
|
+
</root>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import2="importNS">
|
|
3
|
+
<xsd:import namespace="importNS" schemaLocation="idG018a.xsd"/>
|
|
4
|
+
<xsd:element name="root">
|
|
5
|
+
<xsd:complexType>
|
|
6
|
+
<xsd:sequence>
|
|
7
|
+
<xsd:element ref="t" maxOccurs="unbounded"/>
|
|
8
|
+
</xsd:sequence>
|
|
9
|
+
</xsd:complexType>
|
|
10
|
+
<xsd:key name="tableu">
|
|
11
|
+
<xsd:selector xpath=".//t/import2:r"/>
|
|
12
|
+
<xsd:field xpath="@val"/>
|
|
13
|
+
</xsd:key>
|
|
14
|
+
</xsd:element>
|
|
15
|
+
<xsd:element name="t">
|
|
16
|
+
<xsd:complexType>
|
|
17
|
+
<xsd:sequence>
|
|
18
|
+
<xsd:element ref="import2:r" minOccurs="0"/>
|
|
19
|
+
</xsd:sequence>
|
|
20
|
+
<xsd:attribute name="val" type="xsd:string"/>
|
|
21
|
+
</xsd:complexType>
|
|
22
|
+
</xsd:element>
|
|
23
|
+
</xsd:schema>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="importNS">
|
|
3
|
+
<xsd:element name="r">
|
|
4
|
+
<xsd:complexType mixed="true">
|
|
5
|
+
<xsd:attribute name="val" type="xsd:string"/>
|
|
6
|
+
</xsd:complexType>
|
|
7
|
+
</xsd:element>
|
|
8
|
+
</xsd:schema>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="idG019.xsd">
|
|
3
|
+
<t>
|
|
4
|
+
<r> 1 </r>
|
|
5
|
+
<c val="1"> 1 </c>
|
|
6
|
+
</t>
|
|
7
|
+
<t>
|
|
8
|
+
<r> 2 </r>
|
|
9
|
+
<c val="2"> 2 </c>
|
|
10
|
+
</t>
|
|
11
|
+
<t>
|
|
12
|
+
<r> 3 </r>
|
|
13
|
+
<c val="3"> 3 </c>
|
|
14
|
+
</t>
|
|
15
|
+
</root>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
3
|
+
<xsd:redefine schemaLocation="idG019.red">
|
|
4
|
+
<xsd:complexType name="tabletype">
|
|
5
|
+
<xsd:complexContent>
|
|
6
|
+
<xsd:extension base="tabletype">
|
|
7
|
+
<xsd:sequence>
|
|
8
|
+
<xsd:element name="c">
|
|
9
|
+
<xsd:complexType mixed="true">
|
|
10
|
+
<xsd:attribute name="val" type="xsd:string"/>
|
|
11
|
+
</xsd:complexType>
|
|
12
|
+
</xsd:element>
|
|
13
|
+
</xsd:sequence>
|
|
14
|
+
</xsd:extension>
|
|
15
|
+
</xsd:complexContent>
|
|
16
|
+
</xsd:complexType>
|
|
17
|
+
</xsd:redefine>
|
|
18
|
+
<xsd:element name="root">
|
|
19
|
+
<xsd:complexType>
|
|
20
|
+
<xsd:sequence>
|
|
21
|
+
<xsd:element ref="t" maxOccurs="unbounded"/>
|
|
22
|
+
</xsd:sequence>
|
|
23
|
+
</xsd:complexType>
|
|
24
|
+
<xsd:key name="tableu">
|
|
25
|
+
<xsd:selector xpath=".//t/c"/>
|
|
26
|
+
<xsd:field xpath="@val"/>
|
|
27
|
+
</xsd:key>
|
|
28
|
+
</xsd:element>
|
|
29
|
+
<xsd:element name="t" type="tabletype"/>
|
|
30
|
+
</xsd:schema>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="idG027.xsd" xmlns:import="importNS">
|
|
3
|
+
<t val="1">
|
|
4
|
+
<import:r import:val2="a"> 1 </import:r>
|
|
5
|
+
</t>
|
|
6
|
+
<t val="2">
|
|
7
|
+
<import:r import:val2="b"> 2 </import:r>
|
|
8
|
+
</t>
|
|
9
|
+
<t val="3">
|
|
10
|
+
<import:r import:val2="c"> 3 </import:r>
|
|
11
|
+
</t>
|
|
12
|
+
</root>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="importNS">
|
|
3
|
+
<xsd:import namespace="importNS" schemaLocation="idG027a.xsd"/>
|
|
4
|
+
<xsd:element name="root">
|
|
5
|
+
<xsd:complexType>
|
|
6
|
+
<xsd:sequence>
|
|
7
|
+
<xsd:element ref="t" maxOccurs="unbounded"/>
|
|
8
|
+
</xsd:sequence>
|
|
9
|
+
</xsd:complexType>
|
|
10
|
+
<xsd:key name="tableu">
|
|
11
|
+
<xsd:selector xpath=".//t/import:r"/>
|
|
12
|
+
<xsd:field xpath="@import:val2"/>
|
|
13
|
+
</xsd:key>
|
|
14
|
+
</xsd:element>
|
|
15
|
+
<xsd:element name="t">
|
|
16
|
+
<xsd:complexType>
|
|
17
|
+
<xsd:sequence>
|
|
18
|
+
<xsd:element ref="import:r"/>
|
|
19
|
+
</xsd:sequence>
|
|
20
|
+
<xsd:attribute name="val" type="xsd:string"/>
|
|
21
|
+
</xsd:complexType>
|
|
22
|
+
</xsd:element>
|
|
23
|
+
</xsd:schema>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import="importNS" targetNamespace="importNS">
|
|
3
|
+
<xsd:element name="r">
|
|
4
|
+
<xsd:complexType mixed="true">
|
|
5
|
+
<xsd:attribute name="val2" type="xsd:string" form="qualified"/>
|
|
6
|
+
</xsd:complexType>
|
|
7
|
+
</xsd:element>
|
|
8
|
+
</xsd:schema>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="idG028.xsd">
|
|
3
|
+
<t>
|
|
4
|
+
<r> 1 </r>
|
|
5
|
+
<c val="1"> 1 </c>
|
|
6
|
+
</t>
|
|
7
|
+
<t>
|
|
8
|
+
<r> 2 </r>
|
|
9
|
+
<c val="2"> 2 </c>
|
|
10
|
+
</t>
|
|
11
|
+
<t>
|
|
12
|
+
<r> 3 </r>
|
|
13
|
+
<c val="3"> 3 </c>
|
|
14
|
+
</t>
|
|
15
|
+
</root>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
3
|
+
<xsd:redefine schemaLocation="idG028.red">
|
|
4
|
+
<xsd:complexType name="tabletype">
|
|
5
|
+
<xsd:complexContent>
|
|
6
|
+
<xsd:extension base="tabletype">
|
|
7
|
+
<xsd:sequence>
|
|
8
|
+
<xsd:element name="c">
|
|
9
|
+
<xsd:complexType mixed="true">
|
|
10
|
+
<xsd:attribute name="val" type="xsd:string"/>
|
|
11
|
+
</xsd:complexType>
|
|
12
|
+
</xsd:element>
|
|
13
|
+
</xsd:sequence>
|
|
14
|
+
</xsd:extension>
|
|
15
|
+
</xsd:complexContent>
|
|
16
|
+
</xsd:complexType>
|
|
17
|
+
</xsd:redefine>
|
|
18
|
+
<xsd:element name="root">
|
|
19
|
+
<xsd:complexType>
|
|
20
|
+
<xsd:sequence>
|
|
21
|
+
<xsd:element ref="t" maxOccurs="unbounded"/>
|
|
22
|
+
</xsd:sequence>
|
|
23
|
+
</xsd:complexType>
|
|
24
|
+
<xsd:key name="tableu">
|
|
25
|
+
<xsd:selector xpath=".//t/c"/>
|
|
26
|
+
<xsd:field xpath="@val"/>
|
|
27
|
+
</xsd:key>
|
|
28
|
+
</xsd:element>
|
|
29
|
+
<xsd:element name="t" type="tabletype"/>
|
|
30
|
+
</xsd:schema>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
2
|
+
|
|
3
|
+
<xsd:element name="root">
|
|
4
|
+
<xsd:complexType>
|
|
5
|
+
<xsd:sequence>
|
|
6
|
+
<xsd:element name="str" type="xsd:string" fixed="abc"/>
|
|
7
|
+
<xsd:element name="number" type="xsd:integer" fixed="123"/>
|
|
8
|
+
<xsd:element name="bool" type="xsd:boolean" fixed="true"/>
|
|
9
|
+
</xsd:sequence>
|
|
10
|
+
</xsd:complexType>
|
|
11
|
+
</xsd:element>
|
|
12
|
+
</xsd:schema>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
2
|
+
|
|
3
|
+
<xsd:element name="root">
|
|
4
|
+
<xsd:complexType>
|
|
5
|
+
<xsd:sequence>
|
|
6
|
+
<xsd:element name="str" type="xsd:string" default="abc"/>
|
|
7
|
+
<xsd:element name="number" type="xsd:integer" default="123"/>
|
|
8
|
+
<xsd:element name="bool" type="xsd:boolean" default="true"/>
|
|
9
|
+
</xsd:sequence>
|
|
10
|
+
</xsd:complexType>
|
|
11
|
+
</xsd:element>
|
|
12
|
+
</xsd:schema>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<root/>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
2
|
+
|
|
3
|
+
<xs:element name="root" default="1" type="mylist"/>
|
|
4
|
+
|
|
5
|
+
<xs:simpleType name="mylist">
|
|
6
|
+
<xs:restriction base="list">
|
|
7
|
+
<xs:enumeration value="1"/>
|
|
8
|
+
<xs:enumeration value="2"/>
|
|
9
|
+
</xs:restriction>
|
|
10
|
+
</xs:simpleType>
|
|
11
|
+
|
|
12
|
+
<xs:simpleType name="list">
|
|
13
|
+
<xs:list itemType="union"/>
|
|
14
|
+
</xs:simpleType>
|
|
15
|
+
|
|
16
|
+
<xs:simpleType name="union">
|
|
17
|
+
<xs:union memberTypes="xs:int xs:string xs:boolean"/>
|
|
18
|
+
</xs:simpleType>
|
|
19
|
+
|
|
20
|
+
</xs:schema>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
2
|
+
|
|
3
|
+
<xs:complexType name="Employees">
|
|
4
|
+
<xs:sequence>
|
|
5
|
+
<xs:element name="Employee" type="xs:int" default="1"/>
|
|
6
|
+
</xs:sequence>
|
|
7
|
+
<xs:attribute name="Dept" type="xs:int" default="9"/>
|
|
8
|
+
</xs:complexType>
|
|
9
|
+
|
|
10
|
+
<xs:element name="Employees" type="Employees"/>
|
|
11
|
+
|
|
12
|
+
</xs:schema>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// leptris#1957 + leptris#1958 — two XSD component-resolution defects.
|
|
2
|
+
//
|
|
3
|
+
// #1957: nested attributeGroup refs — the level-2 members of a group
|
|
4
|
+
// referenced from inside another attributeGroup are rejected by
|
|
5
|
+
// strict admission (the pre-pass captures group defs in document
|
|
6
|
+
// order, so an inner ref that names a LATER group expands empty);
|
|
7
|
+
// and a complexType whose content model is only an attributeGroup
|
|
8
|
+
// ref + mixed="true" reported "the content model is empty".
|
|
9
|
+
//
|
|
10
|
+
// #1958: multi-document component resolution — an imported
|
|
11
|
+
// no-targetNamespace same-named complexType shadowed the importing
|
|
12
|
+
// namespace's own declaration, and xs:redefine'd simpleTypes were
|
|
13
|
+
// not registered ("type not found in the schema").
|
|
14
|
+
#include <gtest/gtest.h>
|
|
15
|
+
|
|
16
|
+
#include <cstdio>
|
|
17
|
+
#include <cstring>
|
|
18
|
+
#include <string>
|
|
19
|
+
|
|
20
|
+
#include "leptris.h"
|
|
21
|
+
|
|
22
|
+
namespace {
|
|
23
|
+
|
|
24
|
+
#ifndef LEPTRIS_XSD_CASES_DIR
|
|
25
|
+
#define LEPTRIS_XSD_CASES_DIR "libxml2-cases"
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
std::string cases_path(const char* sub) {
|
|
29
|
+
return std::string(LEPTRIS_XSD_CASES_DIR) + "/" + sub;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
int validate_case(const std::string& schema, const std::string& doc) {
|
|
33
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
34
|
+
LeptrisXsdSchema s =
|
|
35
|
+
leptris_xsd_compile_file(schema.c_str(), &st);
|
|
36
|
+
if (!s) return -1;
|
|
37
|
+
LeptrisDocument d = leptris_parse_file(doc.c_str(), &st);
|
|
38
|
+
if (!d) {
|
|
39
|
+
leptris_xsd_free(s);
|
|
40
|
+
return -1;
|
|
41
|
+
}
|
|
42
|
+
int ok = leptris_xsd_validate(s, d);
|
|
43
|
+
if (getenv("I1958_VERBOSE"))
|
|
44
|
+
for (size_t i = 0; i < leptris_xsd_error_count(s); i++)
|
|
45
|
+
printf(" err: %s\n", leptris_xsd_error_at(s, i));
|
|
46
|
+
leptris_document_free(d);
|
|
47
|
+
leptris_xsd_free(s);
|
|
48
|
+
return ok;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
} // namespace
|
|
52
|
+
|
|
53
|
+
TEST(I1957, NestedAttrGroupLevel2AdmitsAndMixedAdmitsText) {
|
|
54
|
+
EXPECT_EQ(validate_case(cases_path("i1957/schema.xsd"),
|
|
55
|
+
cases_path("i1957/instance.xml")),
|
|
56
|
+
1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
TEST(I1958, ImportedSameNameTypeDoesNotShadow) {
|
|
60
|
+
EXPECT_EQ(validate_case(cases_path("i1958/schF1_a.xsd"),
|
|
61
|
+
cases_path("i1958/schF1.xml")),
|
|
62
|
+
1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
TEST(I1958, RedefinedSimpleTypeRegistered) {
|
|
66
|
+
EXPECT_EQ(validate_case(cases_path("i1958/schP2_a.xsd"),
|
|
67
|
+
cases_path("i1958/schP2.xml")),
|
|
68
|
+
1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
TEST(I1958, RedefinedSimpleTypeFacetEnforced) {
|
|
72
|
+
/* "abc" is 3 chars — the redefined minLength 4 rejects it (the
|
|
73
|
+
* facet proves the REDEFINED type, not the original, resolved). */
|
|
74
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
75
|
+
LeptrisXsdSchema s = leptris_xsd_compile_file(
|
|
76
|
+
cases_path("i1958/schP2_a.xsd").c_str(), &st);
|
|
77
|
+
ASSERT_NE(s, (LeptrisXsdSchema)0);
|
|
78
|
+
const char too_short[] =
|
|
79
|
+
"<e1 xmlns=\"ns-a\">abc</e1>";
|
|
80
|
+
LeptrisDocument d = leptris_parse_string(too_short,
|
|
81
|
+
strlen(too_short), &st);
|
|
82
|
+
ASSERT_NE(d, nullptr);
|
|
83
|
+
EXPECT_EQ(leptris_xsd_validate(s, d), 0)
|
|
84
|
+
<< "minLength 4 rejected nothing";
|
|
85
|
+
size_t errs = leptris_xsd_error_count(s);
|
|
86
|
+
for (size_t i = 0; i < errs; i++)
|
|
87
|
+
printf(" err: %s\n", leptris_xsd_error_at(s, i));
|
|
88
|
+
leptris_document_free(d);
|
|
89
|
+
leptris_xsd_free(s);
|
|
90
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// leptris-rs#35 — the 1.9.403.0 regression wave: the #25/#1936
|
|
2
|
+
// strictness fixes introduced or exposed four defects against the
|
|
3
|
+
// W3C suite. All cases expected VALID; all passed on 1.9.402.0.
|
|
4
|
+
//
|
|
5
|
+
// 1. fixed + empty CHILD elements in a sequence (isDefault005/006/
|
|
6
|
+
// 025/026/060_1) — §4.3.1.2: empty content satisfies the fixed
|
|
7
|
+
// facet; only the bare-element leg was fixed.
|
|
8
|
+
// 2. mixed="true" on a particle-less complexType admits character
|
|
9
|
+
// data (ctA033, ctA035).
|
|
10
|
+
// 3. xs:redefine composition compiles the redefined body's
|
|
11
|
+
// particles (idF025/033/034, idG018/019/027/028).
|
|
12
|
+
// 4. the default value supplies content on an empty list-typed
|
|
13
|
+
// element (stZ072).
|
|
14
|
+
#include <gtest/gtest.h>
|
|
15
|
+
|
|
16
|
+
#include <cstdio>
|
|
17
|
+
#include <cstring>
|
|
18
|
+
#include <string>
|
|
19
|
+
|
|
20
|
+
#include "leptris.h"
|
|
21
|
+
|
|
22
|
+
namespace {
|
|
23
|
+
|
|
24
|
+
#ifndef LEPTRIS_XSD_CASES_DIR
|
|
25
|
+
#define LEPTRIS_XSD_CASES_DIR "libxml2-cases"
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
std::string cases_path(const char* sub) {
|
|
29
|
+
return std::string(LEPTRIS_XSD_CASES_DIR) + "/" + sub;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Returns 1 (valid), 0 (invalid), -1 (other).
|
|
33
|
+
int validate_case(const std::string& base) {
|
|
34
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
35
|
+
LeptrisXsdSchema s = leptris_xsd_compile_file(
|
|
36
|
+
(base + ".xsd").c_str(), &st);
|
|
37
|
+
if (!s) return -1;
|
|
38
|
+
LeptrisDocument d = leptris_parse_file((base + ".xml").c_str(), &st);
|
|
39
|
+
if (!d) {
|
|
40
|
+
leptris_xsd_free(s);
|
|
41
|
+
return -1;
|
|
42
|
+
}
|
|
43
|
+
int ok = leptris_xsd_validate(s, d);
|
|
44
|
+
leptris_document_free(d);
|
|
45
|
+
leptris_xsd_free(s);
|
|
46
|
+
return ok;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
} // namespace
|
|
50
|
+
|
|
51
|
+
TEST(Rs35Regression, FixedEmptyChildElementsValidate) {
|
|
52
|
+
EXPECT_EQ(validate_case(cases_path("rs35_fixed_empty/isdefault005")), 1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
TEST(Rs35Regression, MixedParticlelessTypeAdmitsText) {
|
|
56
|
+
EXPECT_EQ(validate_case(cases_path("rs35_mixed_particleless/ctA033")), 1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
TEST(Rs35Regression, RedefineExtensionKeepsParticles) {
|
|
60
|
+
EXPECT_EQ(validate_case(cases_path("rs35_redefine_ext/idF025")), 1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
TEST(Rs35Regression, DefaultSuppliesListContent) {
|
|
64
|
+
EXPECT_EQ(validate_case(cases_path("rs35_list_default/stZ072")), 1);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* The FULL rs#35 wave: every W3C case named in the issue (expected
|
|
68
|
+
* VALID, all passing on 1.9.402.0). Real msData fixtures verbatim. */
|
|
69
|
+
namespace {
|
|
70
|
+
struct Rs35Case {
|
|
71
|
+
const char* schema;
|
|
72
|
+
const char* instance;
|
|
73
|
+
};
|
|
74
|
+
// The msMeta manifest's own schema assignment per instance (the
|
|
75
|
+
// isDefault family shares schemas: 005/006 → isdefault002,
|
|
76
|
+
// 025/026 → isdefault004, 060_1 → test95960_1).
|
|
77
|
+
int validate_pair(const Rs35Case& c) {
|
|
78
|
+
LeptrisStatus st = LEPTRIS_OK;
|
|
79
|
+
std::string base = cases_path("rs35_w3c");
|
|
80
|
+
LeptrisXsdSchema s =
|
|
81
|
+
leptris_xsd_compile_file((base + "/" + c.schema).c_str(), &st);
|
|
82
|
+
if (!s) return -1;
|
|
83
|
+
LeptrisDocument d =
|
|
84
|
+
leptris_parse_file((base + "/" + c.instance).c_str(), &st);
|
|
85
|
+
if (!d) {
|
|
86
|
+
leptris_xsd_free(s);
|
|
87
|
+
return -1;
|
|
88
|
+
}
|
|
89
|
+
int ok = leptris_xsd_validate(s, d);
|
|
90
|
+
leptris_document_free(d);
|
|
91
|
+
leptris_xsd_free(s);
|
|
92
|
+
return ok;
|
|
93
|
+
}
|
|
94
|
+
} // namespace
|
|
95
|
+
|
|
96
|
+
TEST(Rs35Regression, TheAttributeLegCasesValidate) {
|
|
97
|
+
/* leptris-rs#36: fixed + whitespace-variant lexicals — the
|
|
98
|
+
* fixed constraint holds on the TYPE value (§4.3.1.2), so
|
|
99
|
+
* integer attributes whose lexical differs only in
|
|
100
|
+
* whitespace validate. */
|
|
101
|
+
EXPECT_EQ(validate_pair({"attO006.xsd", "attO006.xml"}), 1);
|
|
102
|
+
EXPECT_EQ(validate_pair({"addB104.xsd", "addB104.xml"}), 1);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
TEST(Rs35Regression, AllFifteenW3cCasesValidate) {
|
|
106
|
+
static const Rs35Case cases[] = {
|
|
107
|
+
{"isdefault002.xsd", "isdefault005.xml"},
|
|
108
|
+
{"isdefault002.xsd", "isdefault006.xml"},
|
|
109
|
+
{"isdefault004.xsd", "isdefault025.xml"},
|
|
110
|
+
{"isdefault004.xsd", "isdefault026.xml"},
|
|
111
|
+
{"test95960_1.xsd", "test95960_1.xml"},
|
|
112
|
+
{"ctA033.xsd", "ctA033.xml"},
|
|
113
|
+
{"ctA035.xsd", "ctA035.xml"},
|
|
114
|
+
{"idF025.xsd", "idF025.xml"},
|
|
115
|
+
{"idF033.xsd", "idF033.xml"},
|
|
116
|
+
{"idF034.xsd", "idF034.xml"},
|
|
117
|
+
{"idG018.xsd", "idG018.xml"},
|
|
118
|
+
{"idG019.xsd", "idG019.xml"},
|
|
119
|
+
{"idG027.xsd", "idG027.xml"},
|
|
120
|
+
{"idG028.xsd", "idG028.xml"},
|
|
121
|
+
{"stZ072.xsd", "stZ072.xml"},
|
|
122
|
+
{"attO006.xsd", "attO006.xml"},
|
|
123
|
+
{"addB104.xsd", "addB104.xml"},
|
|
124
|
+
};
|
|
125
|
+
for (const auto& c : cases)
|
|
126
|
+
EXPECT_EQ(validate_pair(c), 1) << c.schema << " / " << c.instance;
|
|
127
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
|
3
3
|
"name": "leptris",
|
|
4
|
-
"version": "1.9.
|
|
4
|
+
"version": "1.9.405",
|
|
5
5
|
"description": "High-performance XML parser and XPath 1.0 engine in C (libleptris)",
|
|
6
6
|
"homepage": "https://github.com/leptris/leptris",
|
|
7
7
|
"license": "MIT",
|