diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c43efd1..441efdf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,7 +41,7 @@ jobs: run: | echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections sudo apt-get update - sudo apt-get install xsltproc fop xmlstarlet ttf-mscorefonts-installer graphviz + sudo apt-get install xsltproc fop xmlstarlet ttf-mscorefonts-installer graphviz libxml2-utils sudo fc-cache -f - name: Make XML, HTML and PDF run: make html pdf diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3c6d775..3233e19 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -39,7 +39,7 @@ jobs: run: | echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections sudo apt-get update - sudo apt-get install xsltproc fop xmlstarlet ttf-mscorefonts-installer graphviz + sudo apt-get install xsltproc fop xmlstarlet ttf-mscorefonts-installer graphviz libxml2-utils sudo fc-cache -f - name: Make XML, HTML and PDF run: make html pdf diff --git a/dmlex-v1.0/specification/Makefile b/dmlex-v1.0/specification/Makefile index 1a388fa..a1bc197 100644 --- a/dmlex-v1.0/specification/Makefile +++ b/dmlex-v1.0/specification/Makefile @@ -17,6 +17,7 @@ dmlex-$(VERSION).html: dmlex-$(VERSION).xml dmlex-$(VERSION).xml: dmlex.xml docbook/dbgenent.mod dmlex_uml.svg $(SOURCE_XML) ./merge.sh $@ + xmllint --valid --noout $@ dmlex_uml.pdf: dmlex.dot dot -Tpdf < $< > $@ @@ -44,6 +45,9 @@ xmldep: jsondep: @python -c 'import jsonschema' 2>/dev/null || { echo "Python jsonschema module is not installed, cannot validate JSON examples."; exit 2; } +rdfdep: + @python -c 'import pyshacl' 2>/dev/null || { echo "Python pyshacl module is not installed, cannot validate JSON examples."; exit 2; } + validate_xml: xmldep validate_xml.py schemas/XML/dmlex.xsd schemas/XML/dmlex_no-crosslingual.xsd @for xmlexample in examples/examples/source/*[0-9].xml; do \ echo validating "$$xmlexample"; \ @@ -70,7 +74,7 @@ validate_json: jsondep validate_json.py schemas/JSON/dmlex.schema.json schemas/J } \ done -validate_rdf: jsondep schemas/RDF/dmlex.shacl +validate_rdf: rdfdep schemas/RDF/dmlex.shacl @for rdfexample in examples/examples/source/*[0-9].rdf; do \ echo validating "$$rdfexample"; \ python -m pyshacl -s schemas/RDF/dmlex.shacl -df turtle $$rdfexample -e schemas/RDF/dmlex.ttl -i rdfs \