1

Where is the OWL-XML serialization format specified which is used by the OWLAPI to serialize SWRL rules? E.g. by serializing a simple rule using Protege (which uses the OWLAPI as far as I know) I get the following code:

<DLSafeRule>...
        <ClassAtom>
            <Class IRI="#Person"/>
            <Variable IRI="x"/>
        </ClassAtom>
</DLSafeRule>

This is different from the SWRL specification [1]:

<swrlx:classAtom> 
  <owlx:Class owlx:name="Person" />
  <ruleml:var>x1</ruleml:var>
</swrlx:classAtom>

and from the suggestion introduced in [2]:

<owl:ClassAtom>
  <owl:Class IRI="#Person"/>
  <owl:IndividuialVariable IRI="#x"/>
</owl:ClassAtom>

Thank you! [1]https://www.w3.org/Submission/SWRL/ [2]http://dl.acm.org/citation.cfm?id=2890050

user3579222
  • 1,103
  • 11
  • 28
  • I guess your first code is just a transformed XML document based on the OWL Functional Syntax. Syntax is here: https://www.cs.ox.ac.uk/files/2445/rulesyntaxTR.pdf – UninformedUser Aug 07 '17 at 19:49
  • Thank you for your answer. The paper you added is source [2] and my example is taken from this paper. – user3579222 Aug 07 '17 at 22:23

1 Answers1

2

As far as I can tell the document you're after is this one:

https://www.w3.org/TR/owl-xmlsyntax/

Note that OWL/XML and RDF/XML are very different serialization formats. RDF/XML is a W3C standard, while OWL/XML is not.

Edit: The following paper is by Matthew Horridge, one of the main authors of the OWL API and of the current Protege code base, and points to a W3C recommendation I was not aware of.

http://ontogenesis.knowledgeblog.org/88

https://www.w3.org/TR/2009/REC-owl2-xml-serialization-20091027/

There is no SWRL mention in that document, so technically there is no spec for SWRL output in OWL/XML. But the note in the appendix https://www.w3.org/TR/2009/REC-owl2-xml-serialization-20091027/#Appendix:_The_Derivation_from_the_Functional_Syntax_.28Informative.29 describes how the the tags were designed; so it makes sense to go with AKSW's theory about the functional syntax tags simply translated the same way.

Ignazio
  • 10,504
  • 1
  • 14
  • 25
  • 2
    Hi, I guess the TO was asking where to find the SWRL part for the OWL/XML format. Unfortunately, this is not contained in the W3C documents. The [W3C SWLR submission](https://www.w3.org/Submission/SWRL/) in section 5 uses different XML tags, that's why the TO is confused. I guess the SWRL axiom rendering is simply the OWL functional syntax as XML tags, but there is no source online except this [publication](https://www.cs.ox.ac.uk/files/2445/rulesyntaxTR.pdf) Cheers! – UninformedUser Aug 08 '17 at 01:35
  • Exactly. Thank you. However, table 1 of the provided source distinguishes between "IndividualVariable" and "LiteralVariable" - the Protege serialization does not make use of these two tags – user3579222 Aug 08 '17 at 05:31
  • so what confuses me is the difference between the Protege serialization and the serialization example intorduced in section 4 of the publication you provided – user3579222 Aug 08 '17 at 06:09
  • ok, thank you all for your effort. The issues with the variables is still confusing for me but it seems like there is no public description available.. – user3579222 Aug 08 '17 at 07:18
  • 1
    There's a publicly available implementation in the owl api, although reading the source code is not always the clearest option :-) – Ignazio Aug 08 '17 at 10:47