Git Product home page Git Product logo

xsd2shacl's Introduction

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.

Prerequisite

Install the required dependencies:

$ pip install -r requirements.txt

Usage

To translate XSD to SHACL shapes:

$ python main.py XSD_FILE

Or you can specify the location for storing the generated SHACL shapes

$ python main.py XSD_FILE -s SHACL_PATH

For example, if you execute the following:

$ python main.py comparison/pos.xsd

The generated shape file will then be located here: test/test.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:

You can run the following for RINF:

$ python post_adjustment/main.py 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

And the following for TED:

$ python main.py 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}
    }

xsd2shacl's People

Contributors

xuemduan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xsd2shacl's Issues

SHACL2XSD possible?

Hello,
I find this work very interesting. Quick question - do you plan to have mappings from SHACL to XSD? TIA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.