Skip to content

Commit 01deed4

Browse files
committed
Reproduces #7.
1 parent 4484c7a commit 01deed4

File tree

5 files changed

+106
-1
lines changed

5 files changed

+106
-1
lines changed

tests/simplify-01/src/main/resources/schema.xsd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</xs:element>
4646
<xs:element ref="baseElement" />
4747
<!-- Issue #7 -->
48-
<!-- xs:element ref="baseElementRef"/-->
48+
<!-- xs:element ref="baseElementRef"/ -->
4949
</xs:choice>
5050
</xs:complexType>
5151

tests/simplify-02/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.settings
2+
.classpath
3+
.project
4+
/target

tests/simplify-02/pom.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>org.jvnet.jaxb2_commons</groupId>
7+
<artifactId>jaxb2-basics-tests</artifactId>
8+
<version>0.11.1-SNAPSHOT</version>
9+
</parent>
10+
<artifactId>jaxb2-basics-test-simplify-02</artifactId>
11+
<packaging>jar</packaging>
12+
<name>JAXB2 Basics - Test [simplify-02]</name>
13+
<dependencies>
14+
<dependency>
15+
<groupId>org.jvnet.jaxb2.maven2</groupId>
16+
<artifactId>maven-jaxb2-plugin-testing</artifactId>
17+
<scope>test</scope>
18+
</dependency>
19+
<dependency>
20+
<groupId>org.jvnet.jaxb2_commons</groupId>
21+
<artifactId>jaxb2-basics</artifactId>
22+
</dependency>
23+
<dependency>
24+
<groupId>joda-time</groupId>
25+
<artifactId>joda-time</artifactId>
26+
</dependency>
27+
</dependencies>
28+
<build>
29+
<defaultGoal>test</defaultGoal>
30+
<plugins>
31+
<plugin>
32+
<groupId>org.jvnet.jaxb2.maven2</groupId>
33+
<artifactId>maven-jaxb2-plugin</artifactId>
34+
<configuration>
35+
<extension>true</extension>
36+
<args>
37+
<arg>-Xsimplify</arg>
38+
<!--arg>-Xsimplify-usePluralForm=true</arg-->
39+
</args>
40+
<plugins>
41+
<plugin>
42+
<groupId>org.jvnet.jaxb2_commons</groupId>
43+
<artifactId>jaxb2-basics</artifactId>
44+
</plugin>
45+
</plugins>
46+
</configuration>
47+
</plugin>
48+
</plugins>
49+
</build>
50+
</project>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<jaxb:bindings version="1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
3+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
4+
xmlns:simplify="http://jaxb2-commons.dev.java.net/basic/simplify"
5+
jaxb:extensionBindingPrefixes="simplify">
6+
7+
<jaxb:bindings schemaLocation="schema.xsd" node="/xs:schema/xs:complexType[@name='oai_dcType']/xs:choice/xs:element[@ref='dc:subject']">
8+
<simplify:as-element-property />
9+
</jaxb:bindings>
10+
11+
</jaxb:bindings>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<schema targetNamespace="http://www.openarchives.org/OAI/2.0/oai_dc/"
2+
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
3+
xmlns:dc="http://purl.org/dc/elements/1.1/"
4+
xmlns="http://www.w3.org/2001/XMLSchema"
5+
elementFormDefault="qualified" attributeFormDefault="unqualified">
6+
7+
<annotation>
8+
<documentation>
9+
XML Schema 2002-03-18 by Pete Johnston.
10+
Adjusted for usage in the OAI-PMH.
11+
Schema imports the Dublin Core elements from the DCMI schema for unqualified Dublin Core.
12+
2002-12-19 updated to use simpledc20021212.xsd (instead of simpledc20020312.xsd)
13+
</documentation>
14+
</annotation>
15+
16+
<import namespace="http://purl.org/dc/elements/1.1/"
17+
schemaLocation="http://dublincore.org/schemas/xmls/simpledc20021212.xsd"/>
18+
19+
<element name="dc" type="oai_dc:oai_dcType"/>
20+
21+
<complexType name="oai_dcType">
22+
<choice minOccurs="0" maxOccurs="unbounded">
23+
<element ref="dc:title"/>
24+
<element ref="dc:creator"/>
25+
<element ref="dc:subject"/>
26+
<element ref="dc:description"/>
27+
<element ref="dc:publisher"/>
28+
<element ref="dc:contributor"/>
29+
<element ref="dc:date"/>
30+
<element ref="dc:type"/>
31+
<element ref="dc:format"/>
32+
<element ref="dc:identifier"/>
33+
<element ref="dc:source"/>
34+
<element ref="dc:language"/>
35+
<element ref="dc:relation"/>
36+
<element ref="dc:coverage"/>
37+
<element ref="dc:rights"/>
38+
</choice>
39+
</complexType>
40+
</schema>

0 commit comments

Comments
 (0)