diff --git a/Makefile b/Makefile index 42d3b0122049e045c856c9cb344238789012e25d..ca3f698faf4261c0db74f1b324d0bb0bf8a09dc8 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 0000000000000000000000000000000000000000..6a8481a475d2e403687e685c76c87f8bf3aab8a1 --- /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