From 7868a9f609aec642c1d5c07d1f148ceccce9f976 Mon Sep 17 00:00:00 2001 From: David Maus <maus@hab.de> Date: Tue, 17 Oct 2017 09:39:50 +0200 Subject: [PATCH] =?UTF-8?q?Grammatik=20f=C3=BCr=20Konfiguration=20der=20Pr?= =?UTF-8?q?ojektformulare?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 4 +- src/projects.rnc | 124 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 src/projects.rnc diff --git a/Makefile b/Makefile index 42d3b01..ca3f698 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,14 @@ SAXON = java -jar lib/saxon9he.jar %.sch: %.rng $(SAXON) -xsl:lib/rngsch.xsl -o:$@ $< -all: ruleset import test +all: ruleset import projects test import: src/import.xsd src/import.rng ruleset: src/ruleset.xsd src/ruleset.rng src/ruleset.sch +projects: src/projects.xsd src/projects.rng + .PHONY: clean clean: rm -f src/*.xsd diff --git a/src/projects.rnc b/src/projects.rnc new file mode 100644 index 0000000..6a8481a --- /dev/null +++ b/src/projects.rnc @@ -0,0 +1,124 @@ +# -*- mode: rnc; -*- +# +# RelaxNG Schema für Kitido.Production Projektkonfiguration +# +# +# Author: David Maus <maus@hab.de> +# + +namespace s = "http://purl.oclc.org/dsdl/schematron" + +start = goobiProjects + +goobiProjects = + element goobiProjects { + project+ + } + +project = + element project { + attribute name { text } + & createNewProcess + & tifheader + & dmsImport + } + +createNewProcess = + element createNewProcess { + itemlist + & opac + & templates + & defaultdoctype + & metadatageneration + } + +opac = + element opac { + attribute use { xsd:boolean } + & element catalogue { + text + }+ + } + +templates = + element templates { + attribute use { xsd:boolean } + & empty + } + +defaultdoctype = + element defaultdoctype { + text + } + +metadatageneration = + element metadatageneration { + attribute use { xsd:boolean } + & empty + } + +itemlist = + element itemlist { + item+ + & hide + & processtitle+ + } + +item = + ( selectItem | textItem ) + +selectItem = + element item { + baseItemAttrs, + attribute multiselect { xsd:boolean }, + text, + select+ + } + +textItem = + element item { + baseItemAttrs, + text + } + +baseItemAttrs = + attribute from { "vorlage" | "werk" }, + attribute required { xsd:boolean }?, + attribute isdoctype { text }?, + attribute isnotdoctype { text }?, + StructTypeMappingAttrs? + +select = + element select { + attribute label { text }, + text + } + +processtitle = + element processtitle { + attribute isdoctype { text }, + text + } + +hide = + element hide { + empty + } + +StructTypeMappingAttrs = + attribute ughbinding { xsd:boolean }?, + attribute docstruct { xsd:NMTOKEN }, + attribute metadata { xsd:NMTOKEN } + +tifheader = + element tifheader { + element monograph { text } + & element multivolume { text } + & element periodical { text } + & empty + } + +dmsImport = + element dmsImport { + empty + } \ No newline at end of file -- GitLab