Skip to content

Commit 8b30280

Browse files
committed
Merge branch 'develop' into DANS-external_exporters #9175
Conflicts (just imports): src/test/java/edu/harvard/iq/dataverse/export/DDIExporterTest.java
2 parents 7566c63 + e22d6be commit 8b30280

27 files changed

Lines changed: 12056 additions & 1 deletion

src/test/java/edu/harvard/iq/dataverse/export/DDIExporterTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import org.junit.jupiter.api.Test;
4545
import org.mockito.Mockito;
4646
import org.xmlunit.assertj3.XmlAssert;
47+
import org.xmlunit.builder.Input;
4748

4849
public class DDIExporterTest {
4950

@@ -92,7 +93,7 @@ public void testExportDataset() throws JsonParseException, IOException, ExportEx
9293
// then
9394
String xml = XmlPrinter.prettyPrintXml(byteArrayOutputStream.toString(StandardCharsets.UTF_8));
9495
logger.fine(xml);
95-
XmlAssert.assertThat(xml).isValid();
96+
XmlAssert.assertThat(xml).isValidAgainst(Input.fromPath(Path.of("src/test/resources/xml/xsd/ddi-codebook-2.5/ddi_codebook_2_5.xsd")).build());
9697
logger.severe("DDIExporterTest.testExportDataset() creates XML that should now be valid, since DDIExportUtil has been fixed.");
9798
}
9899

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
3+
targetNamespace="http://www.w3.org/1999/xhtml"
4+
xmlns="http://www.w3.org/1999/xhtml">
5+
6+
<xs:annotation>
7+
<xs:documentation>
8+
This is the XML Schema common attributes module for XHTML
9+
$Id$
10+
</xs:documentation>
11+
<xs:documentation source="xhtml-copyright-1.xsd"/>
12+
<xs:documentation
13+
source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_commonatts"/>
14+
</xs:annotation>
15+
16+
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../xml.xsd">
17+
<xs:annotation>
18+
<xs:documentation>
19+
This import brings in the XML namespace attributes
20+
The module itself does not provide the schemaLocation
21+
and expects the driver schema to provide the
22+
actual SchemaLocation.
23+
</xs:documentation>
24+
</xs:annotation>
25+
</xs:import>
26+
27+
<xs:attributeGroup name="id">
28+
<xs:attribute name="id" type="xs:ID"/>
29+
</xs:attributeGroup>
30+
31+
<xs:attributeGroup name="class">
32+
<xs:attribute name="class" type="xs:NMTOKENS"/>
33+
</xs:attributeGroup>
34+
35+
<xs:attributeGroup name="title">
36+
<xs:attribute name="title" type="xs:string"/>
37+
</xs:attributeGroup>
38+
39+
<xs:attributeGroup name="Core.attrib">
40+
<xs:attributeGroup ref="id"/>
41+
<xs:attributeGroup ref="class"/>
42+
<xs:attributeGroup ref="title"/>
43+
<xs:attributeGroup ref="Core.extra.attrib"/>
44+
</xs:attributeGroup>
45+
46+
<xs:attributeGroup name="I18n.attrib">
47+
<xs:attribute ref="xml:lang"/>
48+
<xs:attributeGroup ref="I18n.extra.attrib"/>
49+
</xs:attributeGroup>
50+
51+
<xs:attributeGroup name="Common.attrib">
52+
<xs:attributeGroup ref="Core.attrib"/>
53+
<xs:attributeGroup ref="I18n.attrib"/>
54+
<xs:attributeGroup ref="Common.extra"/>
55+
</xs:attributeGroup>
56+
57+
58+
<!-- Global attributes -->
59+
<xs:attribute name="id" type="xs:ID"/>
60+
<xs:attribute name="class" type="xs:NMTOKENS"/>
61+
<xs:attribute name="title" type="xs:string"/>
62+
63+
<xs:attributeGroup name="Global.core.attrib">
64+
<xs:attribute ref="id"/>
65+
<xs:attribute ref="class"/>
66+
<xs:attribute ref="title"/>
67+
<xs:attributeGroup ref="Global.core.extra.attrib"/>
68+
</xs:attributeGroup>
69+
70+
<xs:attributeGroup name="Global.i18n.attrib">
71+
<xs:attribute ref="xml:lang"/>
72+
<xs:attributeGroup ref="Global.I18n.extra.attrib"/>
73+
</xs:attributeGroup>
74+
75+
<xs:attributeGroup name="Global.common.attrib">
76+
<xs:attributeGroup ref="Global.core.attrib"/>
77+
<xs:attributeGroup ref="Global.i18n.attrib"/>
78+
<xs:attributeGroup ref="Global.Common.extra"/>
79+
</xs:attributeGroup>
80+
81+
82+
</xs:schema>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema targetNamespace="http://www.w3.org/1999/xhtml"
3+
xmlns="http://www.w3.org/1999/xhtml"
4+
xmlns:xs="http://www.w3.org/2001/XMLSchema">
5+
<xs:annotation>
6+
<xs:documentation>
7+
Bidirectional Override (bdo) Element
8+
This is the XML Schema BDO Element module for XHTML
9+
10+
This modules declares the element 'bdo' and 'dir' attributes,
11+
Used to override the Unicode bidirectional algorithm for selected
12+
fragments of text.
13+
Bidirectional text support includes both the bdo element and
14+
the 'dir' attribute.
15+
16+
$Id$
17+
</xs:documentation>
18+
<xs:documentation source="xhtml-copyright-1.xsd"/>
19+
<xs:documentation
20+
source="http://www.w3.org/TR/2001/REC-xhtml-modularization-20010410/abstract_modules.html#s_bdomodule"/>
21+
</xs:annotation>
22+
23+
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../xml.xsd">
24+
<xs:annotation>
25+
<xs:documentation>
26+
This import brings in the XML namespace attributes
27+
The module itself does not provide the schemaLocation
28+
and expects the driver schema to provide the
29+
actual SchemaLocation.
30+
</xs:documentation>
31+
</xs:annotation>
32+
</xs:import>
33+
34+
<xs:attributeGroup name="bdo.attlist">
35+
<xs:attribute ref="xml:lang"/>
36+
<xs:attributeGroup ref="Core.attrib"/>
37+
<xs:attribute name="dir" use="required">
38+
<xs:simpleType>
39+
<xs:restriction base="xs:NMTOKEN">
40+
<xs:enumeration value="ltr"/>
41+
<xs:enumeration value="rtl"/>
42+
</xs:restriction>
43+
</xs:simpleType>
44+
</xs:attribute>
45+
</xs:attributeGroup>
46+
47+
<xs:group name="bdo.content">
48+
<xs:sequence>
49+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
50+
</xs:sequence>
51+
</xs:group>
52+
53+
<xs:complexType name="bdo.type" mixed="true">
54+
<xs:group ref="bdo.content"/>
55+
<xs:attributeGroup ref="bdo.attlist"/>
56+
</xs:complexType>
57+
58+
<xs:element name="bdo" type="bdo.type"/>
59+
60+
<xs:attributeGroup name="dir.attrib">
61+
<xs:attribute name="dir">
62+
<xs:simpleType>
63+
<xs:restriction base="xs:NMTOKEN">
64+
<xs:enumeration value="ltr"/>
65+
<xs:enumeration value="rtl"/>
66+
</xs:restriction>
67+
</xs:simpleType>
68+
</xs:attribute>
69+
</xs:attributeGroup>
70+
71+
<!-- Global dir attribute -->
72+
<xs:attribute name="dir">
73+
<xs:simpleType>
74+
<xs:restriction base="xs:NMTOKEN">
75+
<xs:enumeration value="ltr"/>
76+
<xs:enumeration value="rtl"/>
77+
</xs:restriction>
78+
</xs:simpleType>
79+
</xs:attribute>
80+
81+
<xs:attributeGroup name="Global.bdo.attrib">
82+
<xs:attribute ref="dir"/>
83+
</xs:attributeGroup>
84+
85+
</xs:schema>
Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<xs:schema targetNamespace="http://www.w3.org/1999/xhtml"
3+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
4+
xmlns="http://www.w3.org/1999/xhtml">
5+
6+
7+
<xs:annotation>
8+
<xs:documentation>
9+
This is the XML Schema Block Phrasal support module for XHTML
10+
$Id$
11+
</xs:documentation>
12+
<xs:documentation source="xhtml-copyright-1.xsd"/>
13+
</xs:annotation>
14+
15+
<xs:annotation>
16+
<xs:documentation>
17+
Block Phrasal
18+
This module declares the elements and their attributes used to
19+
support block-level phrasal markup.
20+
This is the XML Schema block phrasal elements module for XHTML
21+
22+
* address, blockquote, pre, h1, h2, h3, h4, h5, h6
23+
</xs:documentation>
24+
<xs:documentation source="http://www.w3.org/TR/xhtml-modularization/abstract_modules.html#s_textmodule"/>
25+
</xs:annotation>
26+
27+
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="../xml.xsd">
28+
<xs:annotation>
29+
<xs:documentation>
30+
This import brings in the XML namespace attributes
31+
The module itself does not provide the schemaLocation
32+
and expects the driver schema to provide the
33+
actual SchemaLocation.
34+
</xs:documentation>
35+
</xs:annotation>
36+
</xs:import>
37+
38+
<!-- address -->
39+
<xs:attributeGroup name="address.attlist">
40+
<xs:attributeGroup ref="Common.attrib"/>
41+
</xs:attributeGroup>
42+
43+
<xs:group name="address.content">
44+
<xs:sequence>
45+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
46+
</xs:sequence>
47+
</xs:group>
48+
49+
<xs:complexType name="address.type" mixed="true">
50+
<xs:group ref="address.content"/>
51+
<xs:attributeGroup ref="address.attlist"/>
52+
</xs:complexType>
53+
54+
<xs:element name="address" type="address.type"/>
55+
56+
<!-- blockquote -->
57+
<xs:attributeGroup name="blockquote.attlist">
58+
<xs:attributeGroup ref="Common.attrib"/>
59+
<xs:attribute name="cite" type="URI"/>
60+
</xs:attributeGroup>
61+
62+
<xs:group name="blockquote.content">
63+
<xs:sequence>
64+
<xs:group ref="Block.mix" maxOccurs="unbounded"/>
65+
</xs:sequence>
66+
</xs:group>
67+
68+
<xs:complexType name="blockquote.type">
69+
<xs:group ref="blockquote.content"/>
70+
<xs:attributeGroup ref="blockquote.attlist"/>
71+
</xs:complexType>
72+
73+
<xs:element name="blockquote" type="blockquote.type"/>
74+
75+
<!-- pre -->
76+
<xs:attributeGroup name="pre.attlist">
77+
<xs:attribute ref="xml:space"/>
78+
<xs:attributeGroup ref="Common.attrib"/>
79+
</xs:attributeGroup>
80+
81+
<xs:group name="pre.content">
82+
<xs:sequence>
83+
<xs:group ref="InlinePre.mix" minOccurs="0" maxOccurs="unbounded"/>
84+
</xs:sequence>
85+
</xs:group>
86+
87+
<xs:complexType name="pre.type" mixed="true">
88+
<xs:group ref="pre.content"/>
89+
<xs:attributeGroup ref="pre.attlist"/>
90+
</xs:complexType>
91+
92+
<xs:element name="pre" type="pre.type"/>
93+
94+
<!-- Heading Elements -->
95+
<xs:attributeGroup name="heading.attlist">
96+
<xs:attributeGroup ref="Common.attrib"/>
97+
</xs:attributeGroup>
98+
99+
<xs:complexType name="heading.type" mixed="true">
100+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
101+
<xs:attributeGroup ref="heading.attlist"/>
102+
</xs:complexType>
103+
104+
<xs:attributeGroup name="h1.attlist">
105+
<xs:attributeGroup ref="Common.attrib"/>
106+
</xs:attributeGroup>
107+
108+
<xs:group name="h1.content">
109+
<xs:sequence>
110+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
111+
</xs:sequence>
112+
</xs:group>
113+
114+
<xs:complexType name="h1.type" mixed="true">
115+
<xs:group ref="h1.content"/>
116+
<xs:attributeGroup ref="h1.attlist"/>
117+
</xs:complexType>
118+
119+
<xs:element name="h1" type="h1.type"/>
120+
121+
<xs:attributeGroup name="h2.attlist">
122+
<xs:attributeGroup ref="Common.attrib"/>
123+
</xs:attributeGroup>
124+
125+
<xs:group name="h2.content">
126+
<xs:sequence>
127+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
128+
</xs:sequence>
129+
</xs:group>
130+
131+
<xs:complexType name="h2.type" mixed="true">
132+
<xs:group ref="h2.content"/>
133+
<xs:attributeGroup ref="h2.attlist"/>
134+
</xs:complexType>
135+
136+
<xs:element name="h2" type="h2.type"/>
137+
138+
<xs:attributeGroup name="h3.attlist">
139+
<xs:attributeGroup ref="Common.attrib"/>
140+
</xs:attributeGroup>
141+
142+
<xs:group name="h3.content">
143+
<xs:sequence>
144+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
145+
</xs:sequence>
146+
</xs:group>
147+
148+
<xs:complexType name="h3.type" mixed="true">
149+
<xs:group ref="h3.content"/>
150+
<xs:attributeGroup ref="h3.attlist"/>
151+
</xs:complexType>
152+
153+
<xs:element name="h3" type="h3.type"/>
154+
155+
<xs:attributeGroup name="h4.attlist">
156+
<xs:attributeGroup ref="Common.attrib"/>
157+
</xs:attributeGroup>
158+
159+
<xs:group name="h4.content">
160+
<xs:sequence>
161+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
162+
</xs:sequence>
163+
</xs:group>
164+
165+
<xs:complexType name="h4.type" mixed="true">
166+
<xs:group ref="h4.content"/>
167+
<xs:attributeGroup ref="h4.attlist"/>
168+
</xs:complexType>
169+
170+
<xs:element name="h4" type="h4.type"/>
171+
172+
<xs:attributeGroup name="h5.attlist">
173+
<xs:attributeGroup ref="Common.attrib"/>
174+
</xs:attributeGroup>
175+
176+
<xs:group name="h5.content">
177+
<xs:sequence>
178+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
179+
</xs:sequence>
180+
</xs:group>
181+
182+
<xs:complexType name="h5.type" mixed="true">
183+
<xs:group ref="h5.content"/>
184+
<xs:attributeGroup ref="h5.attlist"/>
185+
</xs:complexType>
186+
187+
<xs:element name="h5" type="h5.type"/>
188+
189+
<xs:attributeGroup name="h6.attlist">
190+
<xs:attributeGroup ref="Common.attrib"/>
191+
</xs:attributeGroup>
192+
193+
<xs:group name="h6.content">
194+
<xs:sequence>
195+
<xs:group ref="Inline.mix" minOccurs="0" maxOccurs="unbounded"/>
196+
</xs:sequence>
197+
</xs:group>
198+
199+
<xs:complexType name="h6.type" mixed="true">
200+
<xs:group ref="h6.content"/>
201+
<xs:attributeGroup ref="h6.attlist"/>
202+
</xs:complexType>
203+
204+
<xs:element name="h6" type="h6.type"/>
205+
206+
</xs:schema>

0 commit comments

Comments
 (0)