The document describes a generic multilevel approach for designing domain ontologies based on XML schemas. It maps XML schema elements to an ontology and then maps XML instances to generated ontologies. The approach extracts semantic information from XML schemas and instances to build domain ontologies represented in OWL or RDF.
1. A Generic Multilevel Approach for Designing
Domain Ontologies Based on XML Schemas
3rd Annual European DDI Users Group Meeting
(EDDI 2011)
06.12.2011
Thomas Bosch
M.Sc. (TUM)
postgraduate student
http://boschthomas.blogspot.com
GESIS - Leibniz Institute for the Social Sciences
2. map
XML Schema Metamodel XML Schema Metamodel
Ontology
instanceOf ⊑
External Ontologies
map
XML Schemas Generated Ontologies (OWL) Domain Ontologies (OWL)
[XSLT]
instanceOf instanceOf instanceOf
map
XML Document Instances Generated Ontologies (RDF) Domain Ontologies (RDF)
[XSLT]
2
3. map
XML Schema Metamodel XML Schema Metamodel
Ontology
instanceOf ⊑
External Ontologies
map
XML Schemas Generated Ontologies (OWL) Domain Ontologies (OWL)
[XSLT]
instanceOf instanceOf instanceOf
map
XML Document Instances Generated Ontologies (RDF) Domain Ontologies (RDF)
[XSLT]
3
5. XML
Variable
Variable: Age
VariableName
"Age"
5
6. XML Schema XML
element Variable
type name
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
6
7. XML Schema XML
element Variable
type name
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
7
8. DDI 3.1 - XML Schema | Ontology Element DDI 3.1 - XML | RDF
⊑
Variable-Element… Variable
type name
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
8
9. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
Variable-Element… Variable
type name
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
9
10. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
Variable-Element… Variable
type name_Element_String
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
10
11. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
Variable-Element… Variable
type name_Element_String
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
11
12. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
Variable-Element… Variable
type name_Element_String
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
12
13. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
Variable-Element… Variable
type_Element_Type name_Element_String
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
13
14. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
Variable-Element… Variable
type_Element_Type name_Element_String
complexType "VariableType" "Variable"
name complexContent
"VariableType" extension
sequence
element VariableName
element
name "Age"
ref
"VariableName" "VariableName"
14
15. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
complexContent
extension
sequence
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
15
16. ComplexType "VariableType"
DDI 3.1 - XML | RDF
⊑ name_ComplexType_String
type_Element_Type
VariableType-Type… Variable-Element… Variable
complexContent
extension
sequence
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
16
17. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
complexContent
extension
sequence
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
17
18. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
extension
sequence
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
18
19. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
extension
sequence
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
19
20. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
sequence
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
20
21. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
sequence
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
21
22. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
contains_Extension_Sequence
Sequence…
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
22
23. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
contains_Extension_Sequence
Sequence…
element element VariableName
ref name
"Age"
"VariableName" "VariableName"
23
24. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
contains_Extension_Sequence
Sequence…
contains_Sequence_Element
VariableName-Element-Reference… element VariableName
ref name
"Age"
"VariableName" "VariableName"
24
25. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
contains_Extension_Sequence
Sequence…
contains_Sequence_Element
VariableName-Element-Reference… element VariableName
ref name
"Age"
"VariableName" "VariableName"
25
26. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
contains_Extension_Sequence
Sequence…
contains_Sequence_Element
VariableName-Element-Reference… element VariableName
ref_Element_Element name
"Age"
"VariableName" "VariableName"
26
27. DDI 3.1 - XML Schema | Ontology DDI 3.1 - XML | RDF
type_Element_Type
VariableType-Type… Variable-Element… Variable
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
contains_Extension_Sequence
Sequence…
contains_Sequence_Element
VariableName-Element-Reference… element VariableName
ref_Element_Element name
"Age"
"VariableName" "VariableName"
27
38. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
contains_ComplexType_ComplexContent
ComplexContent…
contains_ComplexContent_Extension
Extension…
contains_Extension_Sequence
Sequence…
contains_Sequence_Element
VariableName-Element-Reference… VariableName-Element…
ref_Element_Element
value_Element_String
String-Type… "Age"
38
39. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
contains_ComplexContent_Extension
Extension…
contains_Extension_Sequence
Sequence…
contains_Sequence_Element
VariableName-Element-Reference… VariableName-Element…
ref_Element_Element
value_Element_String
String-Type… "Age"
39
40. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
c contains_ComplexContent_Extension d
d
Extension…
contains_Extension_Sequence
Sequence…
contains_Sequence_Element
VariableName-Element-Reference… VariableName-Element…
ref_Element_Element
value_Element_String
String-Type… "Age"
40
41. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
c contains_ComplexContent_Extension d
d
Extension…
d contains_Extension_Sequence e
e
Sequence…
contains_Sequence_Element
VariableName-Element-Reference… VariableName-Element…
ref_Element_Element
value_Element_String
String-Type… "Age"
41
42. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
c contains_ComplexContent_Extension d
d
Extension…
d contains_Extension_Sequence e
e
Sequence…
e contains_Sequence_Element f
f
VariableName-Element-Reference… VariableName-Element…
ref_Element_Element
value_Element_String
String-Type… "Age"
42
43. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
c contains_ComplexContent_Extension d
d
Extension…
d contains_Extension_Sequence e
e
Sequence…
e contains_Sequence_Element f
f g
VariableName-Element-Reference… VariableName-Element…
f ref_Element_Element g
value_Element_String
String-Type… "Age"
43
44. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
c contains_ComplexContent_Extension d
d
Extension…
d contains_Extension_Sequence e
e
Sequence…
e contains_Sequence_Element f
f g
VariableName-Element-Reference… VariableName-Element… VariableName-Element… ( g )
f ref_Element_Element g
value_Element_String
String-Type… "Age"
44
45. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
c contains_ComplexContent_Extension d
d
Extension…
d contains_Extension_Sequence e
e
Sequence…
e contains_Sequence_Element f
f g
VariableName-Element-Reference… VariableName-Element… VariableName-Element… ( g )
f ref_Element_Element g
g value_Element_String h
h
String-Type… "Age"
45
46. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
c contains_ComplexContent_Extension d
d
Extension… a hasVariableName h
d contains_Extension_Sequence e
e
Sequence…
e contains_Sequence_Element f
f g
VariableName-Element-Reference… VariableName-Element… VariableName-Element… ( g )
f ref_Element_Element g
g value_Element_String h
h
String-Type… "Age"
46
47. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c
ComplexContent…
c contains_ComplexContent_Extension d
d
Extension… a hasVariableName h
d contains_Extension_Sequence e
e
Sequence… --> Variable-Age hasVariabeName "Age"
e contains_Sequence_Element f
f g
VariableName-Element-Reference… VariableName-Element… VariableName-Element… ( g )
f ref_Element_Element g
g value_Element_String h
h
String-Type… "Age"
47
48. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c Variable ( a )
ComplexContent… Variable
c contains_ComplexContent_Extension d
d
Extension… a hasVariableName h
d contains_Extension_Sequence e
e
Sequence…
e contains_Sequence_Element f
f g
VariableName-Element-Reference… VariableName-Element… VariableName-Element… ( g )
f ref_Element_Element g
g value_Element_String h
h
String-Type… "Age"
48
49. DDI 3.1 Ontology DDI 3.1 RDF
b a type_Element_Type b a
VariableType-Type… Variable-Element… Variable-Age
b contains_ComplexType_ComplexContent c
c Variable ( a )
ComplexContent… Variable
--> Variable ( Variable-Age )
c contains_ComplexContent_Extension d
d
Extension… a hasVariableName h
d contains_Extension_Sequence e
e
Sequence…
e contains_Sequence_Element f
f g
VariableName-Element-Reference… VariableName-Element… VariableName-Element… ( g )
f ref_Element_Element g
g value_Element_String h
h
String-Type… "Age"
49