From b48495bf51c472277a72e5e143414ac034bda7d6 Mon Sep 17 00:00:00 2001 From: Maximilian Brodhun <brodhun@sub.uni-goettingen.de> Date: Mon, 25 May 2020 14:19:44 +0200 Subject: [PATCH] test adaption in schemes --- oaipmh-core/src/main/resources/bindings.xjb | 10 ++++++++++ .../include/datacite-descriptionType-v3.xsd | 2 +- .../main/resources/{oaiore.xsd => openaire.xsd} | 14 +++++++------- 3 files changed, 18 insertions(+), 8 deletions(-) rename oaipmh-core/src/main/resources/{oaiore.xsd => openaire.xsd} (96%) diff --git a/oaipmh-core/src/main/resources/bindings.xjb b/oaipmh-core/src/main/resources/bindings.xjb index a85bd242..3914cddf 100644 --- a/oaipmh-core/src/main/resources/bindings.xjb +++ b/oaipmh-core/src/main/resources/bindings.xjb @@ -22,4 +22,14 @@ namespaceURI="http://purl.org/dc/elements/1.1/" name="dc" /> </jxb:bindings> </jxb:bindings> + <!--jxb:bindings schemaLocation="openaire.xsd"> + <jxb:bindings> + <jxb:nameXmlTransform> + <jxb:elementName suffix="Element"/> + </jxb:nameXmlTransform> + <jxb:bindings node="//xs:attribute[@ref='xml:lang']"> + <jxb:property name="secondlang"/> + </jxb:bindings> + </jxb:bindings> + </jxb:bindings--> </jxb:bindings> diff --git a/oaipmh-core/src/main/resources/include/datacite-descriptionType-v3.xsd b/oaipmh-core/src/main/resources/include/datacite-descriptionType-v3.xsd index 90f1f32b..881a4dfd 100644 --- a/oaipmh-core/src/main/resources/include/datacite-descriptionType-v3.xsd +++ b/oaipmh-core/src/main/resources/include/datacite-descriptionType-v3.xsd @@ -3,7 +3,7 @@ 2013-05 v3.0: Addition of ID to simpleType element, addition of value "Methods" 2015-02-12 v4.0: Addition of value "TechnicalInfo"--> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-3" targetNamespace="http://datacite.org/schema/kernel-3" elementFormDefault="qualified"> - <xs:simpleType name="descriptionType" id="descriptionType"> + <xs:simpleType name="openaireDescriptionType" id="openaireDescriptionType"> <xs:annotation> <xs:documentation>The type of the description.</xs:documentation> </xs:annotation> diff --git a/oaipmh-core/src/main/resources/oaiore.xsd b/oaipmh-core/src/main/resources/openaire.xsd similarity index 96% rename from oaipmh-core/src/main/resources/oaiore.xsd rename to oaipmh-core/src/main/resources/openaire.xsd index 107326d6..a88a5f04 100644 --- a/oaipmh-core/src/main/resources/oaiore.xsd +++ b/oaipmh-core/src/main/resources/openaire.xsd @@ -6,10 +6,10 @@ 2011-03-17 Release of v2.1: added a namespace; mandatory properties got minLength; changes in the definitions of relationTypes IsDocumentedBy/Documents and isCompiledBy/Compiles; changes type of property "Date" from xs:date to xs:string. FZ, TIB 2011-06-27 v2.2: namespace: kernel-2.2, additions to controlled lists "resourceType", "contributorType", "relatedIdentifierType", and "descriptionType". Removal of intermediate include-files. - 2013-05 v3.0: namespace: kernel-3.0; delete LastMetadataUpdate & MetadateVersionNumber; additions to controlled lists "contributorType", "dateType", "descriptionType", "relationType", "relatedIdentifierType" & "resourceType"; deletion of "StartDate" & "EndDate" from list "dateType" and "Film" from "resourceType"; allow arbitrary order of elements; allow optional wrapper elements to be empty; include xml:lang attribute for title, subject & description; include attribute schemeURI for nameIdentifier of creator, contributor & subject; added new attributes "relatedMetadataScheme", "schemeURI" & "schemeType" to relatedIdentifier; included new property "geoLocation" + 2013-05 v3.0: namespace: kernel-3.0; delete LastMetadataUpdate & MetadateVersionNumber; additions to controlled lists "contributorType", "dateType", "descriptionType", "relationType", "relatedIdentifierType" & "resourceType"; deletion of "StartDate" & "EndDate" from list "dateType" and "Film" from "resourceType"; allow arbitrary order of elements; allow optional wrapper elements to be empty; include openaire:lang attribute for title, subject & description; include attribute schemeURI for nameIdentifier of creator, contributor & subject; added new attributes "relatedMetadataScheme", "schemeURI" & "schemeType" to relatedIdentifier; included new property "geoLocation" 2014-08-20 v3.1: additions to controlled lists "relationType", contributorType" and "relatedIdentifierType"; introduction of new child element "affiliation" to "creator" and "contributor"--> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-3" targetNamespace="http://datacite.org/schema/kernel-3" elementFormDefault="qualified" xml:lang="EN"> - <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2009/01/xml.xsd"/> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://datacite.org/schema/kernel-3" targetNamespace="http://datacite.org/schema/kernel-3" elementFormDefault="qualified" > + <xs:include schemaLocation="include/datacite-titleType-v3.xsd"/> <xs:include schemaLocation="include/datacite-contributorType-v3.1.xsd"/> <xs:include schemaLocation="include/datacite-dateType-v3.xsd"/> @@ -83,7 +83,7 @@ <xs:simpleContent> <xs:extension base="nonemptycontentStringType"> <xs:attribute name="titleType" type="titleType" use="optional"/> - <xs:attribute ref="xml:lang"/> + <xs:attribute name="lang"/> </xs:extension> </xs:simpleContent> </xs:complexType> @@ -123,7 +123,7 @@ <xs:extension base="xs:string"> <xs:attribute name="subjectScheme" use="optional"/> <xs:attribute name="schemeURI" type="xs:anyURI" use="optional"/> - <xs:attribute ref="xml:lang"/> + <xs:attribute name="lang"/> </xs:extension> </xs:simpleContent> </xs:complexType> @@ -308,8 +308,8 @@ Use the complete title of a license and include version information if applicabl </xs:simpleType> </xs:element> </xs:choice> - <xs:attribute name="descriptionType" type="descriptionType" use="required"/> - <xs:attribute ref="xml:lang"/> + <xs:attribute name="openaireDescriptionType" type="openaireDescriptionType" use="required"/> + <xs:attribute name="lang"/> </xs:complexType> </xs:element> </xs:sequence> -- GitLab