xsd2shacl

Generating SHACL shapes from XSD

https://github.com/dtai-kg/xsd2shacl

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.2%) to scientific vocabulary

Keywords

rdf-validation shacl shacl-shapes xml-schema xsd
Last synced: 6 months ago · JSON representation ·

Repository

Generating SHACL shapes from XSD

Basic Info
  • Host: GitHub
  • Owner: dtai-kg
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 1.41 MB
Statistics
  • Stars: 8
  • Watchers: 3
  • Forks: 2
  • Open Issues: 2
  • Releases: 2
Topics
rdf-validation shacl shacl-shapes xml-schema xsd
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

XSD2SHACL

License DOI

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 bash pip install xsd2shacl

  • From source code: bash python -m pip install poetry poetry update poetry build

    Usage

To translate XSD to SHACL shapes:

bash python -m xsd2shacl -x XSD_PATH [-s SHACL_PATH]

For example, if you execute the following:

bash 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:

bash 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:

bash 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 (CT, R/T, R/T', CP, R/P, R/P'):

bash python usecases/RINF/metrics.py python usecases/TED/metrics.py

Cite

To cite our work: bib @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} }

Owner

  • Name: dtai-kg
  • Login: dtai-kg
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
title: "XSD2SHACL"
license: Apache-2.0
authors:
  - family-names: Duan
    given-names: Xuemin
preferred-citation:
  authors:
    - family-names: Duan
      given-names: Xuemin
    - family-names: Chaves-Fraga
      given-names: David
    - family-names: Dimou
      given-names: Anastasia
  title: "XSD2SHACL: Capturing RDF Constraints from XML Schema"
  type: conference-paper
  collection-title: "Proceedings of the 12th Knowledge Capture Conference 2023"
  doi: 10.1145/3587259.3627565
  isbn: 9798400701412
  publisher: "ACM"
  year: 2023
  month: 12
  start: 214
  end: 222

GitHub Events

Total
  • Release event: 1
  • Watch event: 1
  • Issue comment event: 17
  • Push event: 8
  • Pull request event: 5
  • Fork event: 2
  • Create event: 2
Last Year
  • Release event: 1
  • Watch event: 1
  • Issue comment event: 17
  • Push event: 8
  • Pull request event: 5
  • Fork event: 2
  • Create event: 2