Generates SHACL shapes from XML Schema files
Project description
XSD2SHACL
A tool to generate SHACL shapes from XSD for RDF graphs validation.
-
The results of comparison and evaluation of supported XSD components are under comparison folder.
-
The results of validation on two usecases are under usecases folder.
Installation
- From PyPi package
pip install xsd2shacl
- From source code:
python -m pip install poetry
poetry update
poetry build
Usage
To translate XSD to SHACL shapes:
python -m xsd2shacl -x XSD_PATH [-s SHACL_PATH]
For example, if you execute the following:
python -m xsd2shacl -x comparison/pos.xsd
The generated shape file will then be located here: comparison/pos.xsd.shape.ttl.
Post-adjustment
To adjust the generated SHACL shapes with corresponding RML mapping files to the post-adjusted shapes on two use cases:
- RINF:
python -m xsd2shacl -i usecases/RINF/RINF-metadata.xsd.shape.ttl -r usecases/RINF/mappings/RINF-contact-line-systems.yml.ttl -a usecases/RINF/RINF-metadata.xsd.shape.RINF-contact-line-systems.adjustment.ttl
- TED:
python -m xsd2shacl -i usecases/TED/TED_EXPORT_merge.xsd.shape.ttl -r usecases/TED/mappings/F03 -a usecases/TED/TED_EXPORT_merge_F03.shape.adjustment.ttl
Run following get the validation results (C_T, R/T, R/T', C_P, R/P, R/P'):
python usecases/RINF/metrics.py
python usecases/TED/metrics.py
Cite
To cite our work:
@inproceedings{duan2023xsd,
author = {Duan, Xuemin and Chaves-Fraga, David and Dimou, Anastasia},
title = {{XSD2SHACL: Capturing RDF Constraints from XML Schema}},
year = {2023},
isbn = {9798400701412},
publisher = {ACM},
doi = {10.1145/3587259.3627565},
booktitle = {Proceedings of the 12th Knowledge Capture Conference 2023},
keywords = {Validation, XSD, SHACL, RDF shapes, XML Schema},
series = {K-CAP '23}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xsd2shacl-1.1.0.tar.gz.
File metadata
- Download URL: xsd2shacl-1.1.0.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
386516c4011a7eb4afb73dd0d4c9036f5de4a72bd7785262bcb47f8d40105850
|
|
| MD5 |
e54fbc70b728ed51921b23137614c64f
|
|
| BLAKE2b-256 |
38b70395d66038a979ca0ed818dc0e0053d096ed8762e536c8caa18613080aac
|
Provenance
The following attestation bundles were made for xsd2shacl-1.1.0.tar.gz:
Publisher:
publish.yml on dtai-kg/XSD2SHACL
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xsd2shacl-1.1.0.tar.gz -
Subject digest:
386516c4011a7eb4afb73dd0d4c9036f5de4a72bd7785262bcb47f8d40105850 - Sigstore transparency entry: 148886098
- Sigstore integration time:
-
Permalink:
dtai-kg/XSD2SHACL@decae1b64ba0fea899e9ceb213526a63b0343bf6 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/dtai-kg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@decae1b64ba0fea899e9ceb213526a63b0343bf6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file xsd2shacl-1.1.0-py3-none-any.whl.
File metadata
- Download URL: xsd2shacl-1.1.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a63e974a252958fdd880aef8dad3b13022a7ffdd21bfc91cb8bb33b2f0c34b0
|
|
| MD5 |
062f3afd6ff43ad92ec1ebdc0524b037
|
|
| BLAKE2b-256 |
c88a2858eb2ee828c3d5e38174b10ab1f79244d00a108d29492edd5ce7536fa4
|
Provenance
The following attestation bundles were made for xsd2shacl-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on dtai-kg/XSD2SHACL
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xsd2shacl-1.1.0-py3-none-any.whl -
Subject digest:
6a63e974a252958fdd880aef8dad3b13022a7ffdd21bfc91cb8bb33b2f0c34b0 - Sigstore transparency entry: 148886100
- Sigstore integration time:
-
Permalink:
dtai-kg/XSD2SHACL@decae1b64ba0fea899e9ceb213526a63b0343bf6 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/dtai-kg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@decae1b64ba0fea899e9ceb213526a63b0343bf6 -
Trigger Event:
release
-
Statement type: