Mapping XML to OWL ontologies

sounderslipInternet and Web Development

Oct 22, 2013 (3 years and 9 months ago)

98 views

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring

1

Mapping XML to OWL ontologies

Hannes Bohring

03.11.2005

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

2

1.
Introduction


2.
The Mapping


3.
Implemented Framework with Example


4.
Use Cases


5.
Summary and Related Work

Agenda

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

3

Introduction

Overview



XML reached wide acceptance as data exchange format (e.g.
E
-
Business)


covers the syntactic level, but lacks support for efficient
sharing of conceptualizations


OWL (Web Ontology Language) supports the representation
of domain knowledge


bridge the gap between XML an OWL


generate OWL ontologies out of existing XML data, e.g. by
establishing suitable mappings


up to now: no complete approach, focusing on
transformations from „legacy“ XML instance documents to
OWL ontologies


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

4

Introduction

Related Work



pessimistic approaches: XML does not contain any semantic
constraints => mapping impossible



other approaches: XML documents contain some semantics =>
discovering out of the document structure



Sergej Melnik
: generic mappings between XML and RDF


Steve Battle
: direct mapping between XML and an RDF model
(need an XML Schema, which guides the mapping process)


Piazza system
: mediates (no transformation) between pairs
of XML sources through a mediating schema.




our framework:


whole translations process completely

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

5

The Mapping











Straightforward representation of relational data in OWL:



relations/tables correspond to classes


columns correspond to properties


rows correspond to instances


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

6

The Mapping

Mapping Problems


How to handle nested tags?
-

„part
-
of“ or „subType
-
of“?



<person>



<woman>









<head/>



</woman>


</person>


Middle course



„part
-
of“ relationship (1:N): one element contains another
element, which contains not only a literal (owl:ObjectProperty)


„subType
-
of“ relationship: xsd:complexTypes and therefrom
derived xsd:elements (rdfs:subClassOf)


multiple inheritance possible


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

7

The Mapping

XSD

OWL

xsd:elements, containing other
elements or having at least one
attribute

owl:Class, coupled with
owl:ObjectProperties

xsd:elements, with neither sub
-
elements nor attributes

owl:DatatypeProperties

named xsd:complexType

owl:Class

named xsd:simpleType

owl:DatatypeProperties

xsd:minOccurs, xsd:maxOccurs

owl:minCardinality, owl:maxCardinality

xsd:choice

combination of owl:intersectionOf,
owl:unionOf and owl:complementOf

xsd:sequence

owl:intersectionOf


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

8

Implemented Framework with Example

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

9

Implemented Framework with Example

Citeseer Metadata Archive Example


<!
--


--
>


<record>



<header>




<identifier>
oai:CiteSeerPSU:1
</identifier>



</header>



<metadata>




<oai_citeseer:oai_citeseer>





<dc:title>
A title
</dc:title>





</oai_citeseer:oai_citeseer>



</metadata>


</record>

<!
--


--
>


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

10

Implemented Framework with Example


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

11

Implemented Framework with Example


<schema>


<!
--


--
>


<element
name=
“record“
>



<complexType>



<sequence>




<element
ref=
“header“
maxOccurs=
“1“

minOccurs=
“1“
/>




<element
ref=
“metadata“

maxOccurs=
“1“

minOccurs=
“1“
/>



</sequence>



</complexType>


</element>


<!
--


--
>


<element
name=
“header“
>



<complexType>



<sequence>


<element
ref=
“identifier“

maxOccurs=
“1“

minOccurs=
“1“
/>



</sequence>



</complexType>


</element>


<!
--


--
>

</schema>

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

12

Implemented Framework with Example


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

13

Implemented Framework with Example


<rdf:RDF>


<!
--


--
>


<owl:Class
rdf:ID=
”record”
/>


<owl:Class
rdf:ID=
”header”
/>


<owl:Class
rdf:ID=
”metadata”
/>



<owl:ObjectProperty
rdf:ID=
”hasHeader”
>



<rdfs:domain
rdf:resource=
”#record”
/>



<rdfs:range
rdf:resource=
”#header”
/>


</owl:ObjectProperty>


<owl:ObjectProperty
rdf:ID=
”hasMetadata”
>



<rdfs:domain
rdf:resource=
”#record”
/>



<rdfs:range
rdf:resource=
”#metadata”
/>


</owl:ObjectProperty>


<owl:DatatypeProperty
rdf:ID=
”dtpIdentifier”
>



<rdfs:domain
rdf:resource=
”#header”
/>



<rdfs:range
rdf:resource=
”xsd:string”
/>


</owl:DatatypeProperty>


<!
--


--
>

</rdf:RDF>

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

14

Implemented Framework with Example


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

15

Implemented Framework with Example

<rdf:RDF>


<!
--


--
>


<owl:Ontology
rdf:about=
”myInstances.owl”
>



<owl:imports
rdf:resource=
”model.owl”
/>


<owl:Ontology>


<record
rdf:ID=
”id123”>



<hasHeader
rdf:resource=
”#abc”
/>



<hasMetadata
rdf:resource=
”#def”
/>


</record>


<header
rdf:ID=
”abc”
>



<dtpIdentifier
rdf:datatype=
”xsd:string”
>




Oai:CiteSeerPSU:1



</dtpIdentifier>


</header>


<!
--


--
>



</rdf:RDF>

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

16

Implemented Framework with Example


Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

17

Implemented Framework with Example

The conversion process:



XML instance data only:


extract XML Schema

°
XML Schema not complete

°
representative XML documents => good results


create the OWL model


create adjusted XSLT stylesheet

°
determines whether elements becomes classes or properties


create the OWL instances

°
imports OWL model generated before

°
separation of model and data



XML Schema only:


create the OWL model directly

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

18

Use Cases


none of these is pure data oriented XML


Citeseer Metadata Archive


Bibliographic data in XML



XML generated from Relational Databases Management Systems


MySQL


Firebird



XML data generated with Microsoft Excels XML export


document oriented


describes not only the structure, but also the layout =>
elements difficult to distinguish

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

19

The mapping wizard

Mapping Wizard available at http://xml2owl.sf.net

Mapping XML to OWL ontologies

Institut für Informatik

Betriebliche Informationssysteme

Hannes Bohring


03.11.2005

20

Summary and Future Work


generating ontologies automatically out of existing XML data



crucial for referencing and integrating conventional XML into the
Semantic Web



no optimal solution => some subsequent manual work for
refining the ontology



our subsequent work:


not yet supported XML Schema components


improve support for document oriented XML


performance improvements