Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » OWL2XML wrong output(OWL2XML wrong output )
OWL2XML wrong output [message #1826796] Thu, 30 April 2020 17:27 Go to next message
Paul Hernandez is currently offline Paul HernandezFriend
Messages: 9
Registered: April 2020
Junior Member
Hi everyone,

I found this 2007 example on how to convert UML to OWL in two steps, first a transformation UML2OWL and finally a OWL2XML:

https://www.eclipse.org/atl/usecases/ODMImplementation/

This is an extract of the expected output:

<?xml version = '1.0' encoding = 'ISO-8859-1' ?>
<rdf:RDF xmlns:rdf = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs = 'http://www.w3.org/2000/01/rdf-schema#' xmlns:xsd = 'http://www.w3.org/2001/XMLSchema#' xmlns:owl = 'http://www.w3.org/2002/07/owl#' xmlns = 'http://example.org/Museum#' xml:base = 'http://example.org/Museum'>
  <owl:Ontology rdf:about = 'Museum'/>
  <owl:Class rdf:ID = 'Painter'>
    <rdfs:label>Painter</rdfs:label>
    <rdfs:subClassOf rdf:resource = '#Artist'/>
    <rdfs:subClassOf>
      <owl:Restriction>
        <owl:onProperty rdf:resource = '#Painter.paints'/>
        <owl:minCardinality  rdf:datatype = 'http://www.w3.org/2001/XMLSchema#nonNegativeInteger'>0</owl:minCardinality >
      </owl:Restriction>
    </rdfs:subClassOf>
  </owl:Class>


This is the output I get when running the transformation again in my Eclipse Papyrus Version: 2019-12 with ATL4.2.0:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Root xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="XML" name="rdf:RDF">
  <children xsi:type="Attribute" name="xmlns:rdf" value="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
  <children xsi:type="Attribute" name="xmlns:rdfs" value="http://www.w3.org/2000/01/rdf-schema#"/>
  <children xsi:type="Attribute" name="xmlns:xsd" value="http://www.w3.org/2001/XMLSchema#"/>
  <children xsi:type="Attribute" name="xmlns:owl" value="http://www.w3.org/2002/07/owl#"/>
  <children xsi:type="Attribute" name="xmlns" value="http://example.org/Museum#"/>
  <children xsi:type="Attribute" name="xml:base" value="http://example.org/Museum"/>
  <children xsi:type="Element" name="owl:Ontology">
    <children xsi:type="Attribute" name="rdf:about" value="Museum"/>
  </children>
  <children xsi:type="Element" name="owl:Class">
    <children xsi:type="Attribute" name="rdf:ID" value="Museum"/>
    <children xsi:type="Element" name="rdfs:label">
      <children xsi:type="Text" name="#text" value="Museum"/>
    </children>


It seems like instead of renaming the tags a name attribute is inserted on each element.

I would appreciate a lot if someone give me a clue why the example is not working as expected. I think it could be due to the ATL version. The example was created with a ATL version from 13 years ago.

Attached the whole files with the suffix _right and _wrong.
Transformations and meta models could be download here: https://www.eclipse.org/atl/atlTransformations/#UML2OWL

Best regards,
Paul
Re: OWL2XML wrong output [message #1826970 is a reply to message #1826796] Tue, 05 May 2020 13:42 Go to previous message
Paul Hernandez is currently offline Paul HernandezFriend
Messages: 9
Registered: April 2020
Junior Member
Hi everyone,

after 3.5 K views and no answers I decided to revive some corpse and install Eclipse Ganymede with ATL 2.0.2 unfortunately with the same results.

Any other ideas. I will appreciate any comment.

Regards,
Paul
Previous Topic:Problem with Child and Parent Elements in resulting XMI File
Next Topic:[ATL /AM3 XML Extractor ]
Goto Forum:
  


Current Time: Sat Nov 11 08:18:13 GMT 2023

Powered by FUDForum. Page generated in 0.01666 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top