dgarijo / Widoco

Wizard for documenting ontologies. WIDOCO is a step by step generator of HTML templates with the documentation of your ontology. It uses the LODE environment to create part of the template.
Apache License 2.0
275 stars 85 forks source link

SWRL rules not supported #705

Closed lucaturchet closed 1 month ago

lucaturchet commented 1 month ago

My understanding is that SWRL rules are supported in the latest release of WIDOCO. I tried to load my ontology with SWRL rules (generated with the Protegè plugin ROWLTab), but the software complains that the ontology cannot be loaded. I tried by removing the rules from the file and it worked, so the issue is the rules.

dgarijo commented 1 month ago

I cannot reproduce this issue. Please post your ontology with the rules and without for a reference, so I can have a look.

I had to release a hotfix a few weeks ago because some of the great updates by @vChavezB introduced a few errors when no labels were available. Maybe this issue is similar.

lucaturchet commented 1 month ago

ontology_with_and_without_rules.zip

Thanks, there you go the files

dgarijo commented 1 month ago

Thanks, will have a look when I have the chance. Does this work with an earlier version of Widoco? (before the changes by @vChavezB where incorporated)? i.e., 1.4.20.

lucaturchet commented 1 month ago

I have just tried with v. 1.4.20 but I get the same error

dgarijo commented 1 month ago

Ok, in the meantime, here is an example of an ontology with SWRL rules that does work: https://github.com/dgarijo/Widoco/blob/master/test/PAC2_EX2_RDF.rdf (line 842). In case you want to have a look for divergences in the declaration.

I do not use swrl rules much, so I can't say if the proposed case is supported.

lucaturchet commented 1 month ago

Thanks, that file works. However, I simply tried to copy-paste those rules in my owl file (obviously without my own original rules) but I get the same issue.

vChavezB commented 1 month ago

I think there is a problem parsing your ontology serialization in xml. I cannot load the file MUSICO_light_SWRL.owl with Protege v5.6.3, (owl api 4.5.26)

vChavezB commented 1 month ago

I think this issue can be closed. The problem is that the xml is not serialized correctly and there are some missing namespaces for swrl. After manually fixing the xml widoco generates the rules.

@lucaturchet , Whenever copying XML subelements in a file be sure to import the correct namespaces and verify that your xml is valid. Use tools online such as https://www.xmlvalidation.com/

BR Victor

vChavezB commented 1 month ago
dgarijo commented 1 month ago

@vChavezB awesome, thanks for having a look! (I am a bit overwhelmed at the moment)

dgarijo commented 1 month ago

Per @vChavezB 's comments, I will be closing the issue. @lucaturchet feel free to reopen if you find something else.

lucaturchet commented 1 month ago

Many thanks! I fixed everything, now it works