-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add or modify Makefile recipes to enable regeneration of *.rdf files …
…and retain expected *.ttl files content `rdfpipe` utility is now used to regenerate *.rdf files what results in the duplicated imports being discarded. Changes were made in Makefile file and affects generation of *.rdf artefacts (owl-core, owl-restrictions and shacl Makefile recipes) as well as conversion of these to TTL format (convert-rdf-to-turtle). The latter were needed to keep the same TTL output when using the new *.rdf files. Scope of the changes: * New generic convert-between-serialization-formats Makefile recipe * The existing owl-core, owl-restrictions and shacl Makefile recipes now include an RDF regeneration step * The existing convert-rdf-to-turtle Makefile recipe now uses the same namespaces that are used for XSLT transformation (test/ePO-default-config/namespaces.xml) to provide rdfpipe with prefixes so the output makes use of compact URIs. * As the reported issue occurs for EPO v4.2.0 which introduces some new prefixes, these prefixes have also been added to test/ePO-default-config/namespaces.xml so it would be possible to reproduce the fix.
- Loading branch information
1 parent
ca63046
commit abde78b
Showing
3 changed files
with
89 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# | ||
# Gets namespaces from namespaces.xml file and prepares argument | ||
# list from them to be used with `rdfpipe` tool. | ||
# Uses Saxon installed in the project main directory. | ||
|
||
PROJECT_DIR=$(dirname $(dirname $(realpath ${BASH_SOURCE[0]}))) | ||
NAMESPACES_DIR=${PROJECT_DIR}/test/ePO-default-config | ||
|
||
cd ${NAMESPACES_DIR} | ||
namespaces=$( | ||
java -cp ../../saxon/saxon.jar net.sf.saxon.Query -s:namespaces.xml \ | ||
-qs:'for $x in /*:prefixes/*:prefix return concat(string($x/@name), "=", string($x/@value))' \ | ||
\!method=text | ||
) | ||
ns_args=$( \ | ||
echo "$namespaces" | tr ' ' '\n' | awk '{printf("--ns='\''%s'\'' ", $0)}' | ||
) | ||
|
||
echo "$ns_args" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters