<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>XML Schema Integration with Reusable Schema Parts?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jakub Maly´</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Martin Necˇasky´</string-name>
          <email>C@khsaril.esmfUfn.ivceurnsiity</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ItemTester @ tester</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>XJMakLuRbeKselarmcheGk</institution>
          ,
          <addr-line>roJuapk,uDbepMartamlyen</addr-line>
          ,
          <institution>taonfdSoMftwaratreinEnNgeinceaesrkinyg Faculty of Mathematics and Physics, Charles University in Prague XMLaloRstersaenasrkce ́hnaG ́mreoˇsut ́pı</institution>
          ,
          <addr-line>2D5,e1p1a8rt0m0 ePnrathoaf1S</addr-line>
          ,
          <institution>oTfhtweaCrzeecEhnRgeinpeuebrlincg Faculty</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>okflMimaethke</institution>
          ,
          <addr-line>mamtaiclsya,ndnePchayssikcys</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2011</year>
      </pub-date>
      <fpage>13</fpage>
      <lpage>24</lpage>
      <abstract>
        <p>Modern information systems may exploit numerous XML formats for communication. Each message may have its own XML format for data representation which causes problems with integration and evolution of their schemas. Manual integration and management of evolution of the XML formats may be very hard. We tackled this problem in our previous work, however, for simplicity reasons, we omitted the possibility of exploiting reusable schema parts. In this paper, we complement our previous work with additional methods for schema integration which exploit reusable schema parts that quite often appear in XML schemas. This further helps a domain expert to get a precise mapping to a conceptual diagram, which then integrates the XML formats and facilitates their evolution - a change that is made once in the conceptual diagram is propagated to the XML formats.</p>
      </abstract>
      <kwd-group>
        <kwd>XML schema</kwd>
        <kwd>conceptual modeling</kwd>
        <kwd>reverse-engineering</kwd>
        <kwd>integration</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>Today, XML is a standard for communication in various information systems like web
services, etc. A web service provides an interface composed of several operations. The
structure of incoming and outgoing messages is described in a form of XML schemas.
If the XML schemas of communicating web services differ, the problem of their
integration comes to the scene. When the XML schemas are integrated, another problem
arises. Since the business evolves in time the XML schemas need to be adapted too.</p>
      <p>
        We aim at the problem of integration of XML schemas by mapping them to a
common conceptual schema. In our previous work [
        <xref ref-type="bibr" rid="ref10 ref4 ref5">5, 10, 4</xref>
        ], we have introduced a
framework for XML schema integration and evolution. It supposes a set of XML schemas
that are conceptually related to the same problem domain. As a problem domain, we
can consider, e.g., purchasing products. Sample XML schemas may be XML schemas
for purchase orders, product catalogue, customer detail, etc. The central part of the
framework is a conceptual schema of the problem domain. Each XML schema is then
mapped to the conceptual schema. In other words, the conceptual diagram integrates
the XML schemas. We then exploit the mappings to evolve the XML schemas when a
? This work was supported in part by the Czech Science Foundation (GA CˇR), grant number
      </p>
      <p>
        P202/11/P455 and in part by the grant SVV-2011-263312.
change occurs. Simply speaking, the change is made only once at the conceptual level
and then propagated to the affected XML schemas. It is also possible to exploit the
mappings to derive interfaces of semantic web services described in SAWSDL as we show
in [
        <xref ref-type="bibr" rid="ref11 ref8">11, 8</xref>
        ]. In [
        <xref ref-type="bibr" rid="ref4 ref7">7, 4</xref>
        ] we have introduced a method of XML schema integration, which
will be briefly introduced later.
      </p>
      <p>
        Contributions In practice, a conceptual diagram and XML schemas exist separately,
i.e. there are no mappings between both levels. This disallows to exploit the integration
and evolution capabilities of our framework. In our work [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], we have introduced a
method for deriving required XML schemas from the conceptual diagram and in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]
and [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] we have described a reversed method for mapping of an existing XML schema
to the conceptual diagram. In this paper, we extend this method by utilizing inheritance
constructs that often appear in XML schemas and that are supported by our conceptual
model to get even better results and more comfortable way of integrating them.
      </p>
      <p>
        Our aim is not to develop new methods for measuring schema similarities. These
methods have been already intensively studied in the literature. Instead, we exploit the
existing ones and combine them together. For this, we provide an algorithm skeleton
that can be supplemented by various similarity methods. An important contribution of
the method, not considered by existing similarity methods, is an active participation of
a domain expert. This is necessary, since we need to achieve exact mapping.
Outline The rest of the paper is organized as follows. In Section 2, we present related
work. In Section 3, we briefly present a simplified version of our conceptual model for
XML. Section 4 briefly describes the algorithm from [
        <xref ref-type="bibr" rid="ref4 ref7">7, 4</xref>
        ] which assists a domain
expert during mapping discovery and we enhance it with methods for dealing with
inheritance. In Section 5, we evaluate the presented approach. Finally, Section 6 concludes.
2
      </p>
    </sec>
    <sec id="sec-2">
      <title>Related work</title>
      <p>
        Recent literature (surveyed in [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]) has been focused on a discovery of mappings of
XML formats to a common model. We can identify several motivations. XML schemas
are hardly readable and a friendly graphical notation is necessary. This motivation has
appeared in [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ][
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] or [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. A survey of these approaches can be found in [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ]. They
introduce an algorithm for automatic conversion of a given XML schema to a UML
class diagram. The result exactly corresponds to the given XML schema. However,
these approaches can not be applied in our case – we need to map an XML schema
to an existing conceptual diagram. There are also approaches aimed at an integration
of a set of XML format into a common XML format. These works include, e.g. the
DIXSE framework [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] or Xyleme project [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Approaches that convert or map XML
formats to ontologies are DTD2OWL [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], which presents a simple method of
automatic translation of an XML format with an XML schema expressed in DTD into an
ontology. More advanced methods are presented in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] and [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ]. They both introduce an
algorithm that automatically maps an XML format to an ontology. This is close to our
approach since a conceptual diagram can be understood as an ontology. In both cases,
the domain expert can edit the discovered mappings but is not involved in the discovery
process directly. For a more detailed description of related work see [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>Our Conceptual Model</title>
      <p>In this section, we will introduce our conceptual model for XML. We follow the
ModelDriven Architecture (MDA) principle which is based on modeling data at several levels
of abstraction. The most abstract level contains a conceptual schema of the problem
domain. The language applied to express the conceptual schema is called
platformindependent model (PIM). The level below is the platform-specific level which specifies
how the whole or a part of the PIM schema is represented in a particular platform. In
our case, the platform is XML.
3.1</p>
      <sec id="sec-3-1">
        <title>Platform-Independent Model</title>
        <p>A PIM schema is based on UML class diagrams and models real-world concepts and
relationships between them. It contains three types of components: classes, attributes
and associations.</p>
        <p>Definition 1. Let L be a set of string labels and D be a set of datatypes. A schema in
the platform independent model (PIM schema) is a 9-tuple S = (Sc, Sa, Sr, Se, name,
type, class, participant , card ), where:
– Sc and Sa are sets of classes and attributes in S, respectively.
– Sr is a set of binary associations in S. Se is a set of association ends in S. A binary
association is a set R = {E1, E2}, where E1, E2 ∈ Se and E1 6= E2. For any two
associations R1, R2 ∈ Sr it must hold that R1 ∩ R2 6= ∅ ⇒ R1 = R2. In other
words, no two associations share the same end.
– name : Sc ∪ Sa → L resp. name : Sr → L ∪ {λ} assigns a name to each class,
attribute and association. name(R) = λ means that R ∈ Sr does not have a name.
– type : Sa → D assigns a data type to each attribute.
– class : Sa → Sc assigns a class to each attribute. For A ∈ Sa, we will say that A
is an attribute of class(A) or A belongs to class(A).
– participant : Se → Sc assigns a class to each association end. For R = {E1, E2}
∈ Sr, we will say that participant (E1) and participant (E2) are participants of R
or that they are connected by R.</p>
        <p>– card : (Sa ∪ Se) → C assigns a cardinality to each attribute and association end.
The members of Sc, Sa, and Sr are called components of S.</p>
        <p>We display PIM schemas as UML class diagrams. A class is displayed as a box
with its name at the top and attributes at the bottom. An attribute is displayed as a
pair comprising the attribute name and cardinality. The data type is omitted to make
the diagram easy to read. An association is displayed as a line connecting participating
classes with the association name and cardinalities.</p>
        <p>For a given association R = (E1, E2), we will often use notation (C1, C2) as an
equivalent of (participant (E1), participant (E2) if there are no more associations
connecting C1 and C2. We will also need a construct called a PIM path.</p>
        <p>Definition 2. A PIM path P is an ordered sequence hR1, . . . , Rni of associations from
Sr, where (∀i ∈ {1, n})((Ri) = (Ci−1, Ci)). C0 and Cn are called start and end of P .
Functions start and end return for P the start and end of P , respectively.</p>
        <p>An example of a PIM path in our sample PIM depicted in Figure 1(a) is Path =
h(Purchase, Item), (Item, Product ), (Product , Supply )i. Purchase and Supply are
start and end of the PIM path, respectively.
3.2</p>
      </sec>
      <sec id="sec-3-2">
        <title>Platform–Specific Model</title>
        <p>The platform-specific model (PSM) enables to specify how a part of the reality is
represented in a particular XML schema in a UML-style way. We introduce it formally
in Definition 3. We view a PSM schema in two perspectives. From the grammatical
perspective, it models XML elements and attributes. From the conceptual perspective,
it delimits the represented part of the reality. Its advantage is clear – the designer works
in a UML-style way which is more comfortable then editing the XML schema.
Definition 3. Let L be a set of string labels and D be a set of datatypes. A PSM
schema is a 16-tuple S0 = (Sc0 , Sa0, Sr0 , Se0 , Sm0, CS00 , name0, type0, class0, xf orm0,
participant0, card0, cmtype0, attributes0, content0, repr0), where
– Sc0 , Sa0, and Sm0 are sets of classes, attributes, and content models in S0,
respectively.
– Sr0 is a set of directed binary associations in S0. Se0 is a set of association ends in
S0. A directed binary association is a pair R0 = (E10, E20), where E10, E20 ∈ Se0 and
E10 6= E20. For any two associations R10, R20 ∈ Sr0 it must hold that R10 ∩ R20 6= ∅ ⇒
R10 = R20.
– CS00 ∈ Sc0 is a class called schema class of S0.
– name0 : Sc0 ∪ Sa0 → L resp. name0 : Sr0 → L ∪ {λ} assigns a name to each class,
attribute and association.
– type0 : Sa0 → D assigns a data type to each attribute.
– class0 : Sa0 → Sc0 assigns a class to each attribute. For A0 ∈ Sa0, we will say that</p>
        <p>A0 is an attribute of class0(A0) or A0 belongs to class0(A0).
– participant0 : Se → Sc0 ∪ Sm0 assigns a class or content model to each
as0
sociation end. For R0 = (E10, E20), where X10 = participant0(E10) and X20 =
participant0(E20), we call X10 and X20 parent and child of R0, respectively. We
will also sometimes call both X10 and X20 participants of R0 and say that X10 is
the parent of X20 and X20 is a child of X10, denoted parent0(R0) and child0(R0),
respectively.
– xf orm0 : Sa0 → {e, a} assigns an XML form to each attribute. It specifies the
XML representation of an attribute using an XML element declaration with a simple
content or an XML attribute declaration, respectively.
– card0 : Sa0 ∪ Se0 → C assigns a cardinality to each attribute and association end.
– cmtype0 : Sm0 → {sequence, choice, set} assigns a content model type to each
content model. We distinguish 3 types: sequence, choice and set, respectively.
– attributes0 : Sc0 → 2(Sa0) assigns an ordered sequence of distinct attributes to each
class C0. It must hold that A0 ∈ attributes0(C0) ⇔ C0 = class0(A0).
– content0 : Sc0 ∪ Sm0 → 2(Sr0) assigns an ordered sequence of distinct
associations to each class or content model X0. It must hold that R0 ∈ content0(X0) ⇔
X0is the parent of R0.
– repr0 : Sc0 \ {CS00 } → Sc0 \ {CS00 } assigns a class C0 to another class C0. C0 is
called structural representative of C0. It must hold that C0 6∈ repr0(C0). Neither C0,
nor C0 can be the schema class.</p>
        <p>The graph (Sc0 ∪ Sm</p>
        <p>0 , Sr0 ) with classes and content models as nodes and associations as
directed edges must be a directed forest with one of its trees rooted in the schema class
CS00 . Members of Sc0 , Sa0, Sr0 , and Sm0 are called components of S0.</p>
        <p>A sample PSM schema is depicted in Figure 1(b). As can be seen from the
definition, PSM introduces similar constructs to PIM: classes, attributes and associations.</p>
        <p>The PSM-specific constructs have precisely defined semantics. Briefly, a class
models a complex content. The complex content is specified by the attributes of the class
and associations in its content (their ordering is given by functions attributes0 and
content0). An attribute models an XML element declaration with a simple content or
Customer
- login
- name
- phone
- email [1,*]
- code
- price
- color
0..*</p>
        <sec id="sec-3-2-1">
          <title>Product 1..*delivers0..*</title>
          <p>Supplier
- name
- phone
- email
provides</p>
          <p>1..*</p>
          <p>Supply
- date
- price
- amount
Address
- street
- city
- country</p>
          <p>
            Items
item
Item
1..*
|
ItemAmount
- amount
- price
Address
- street
- city
- country
- gps [
            <xref ref-type="bibr" rid="ref1">0,1</xref>
            ]
bill-to
ship-to
          </p>
        </sec>
        <sec id="sec-3-2-2">
          <title>Purchase 1..*ordered</title>
          <p>- code
- date
- status
0..1</p>
          <p>Address
ShipAddr
- gps</p>
          <p>Address
BillAddr
contains
1..*</p>
          <p>Item
- amount
- price
- tester</p>
          <p>(a) Sample PIM schema
PurchRQSchema
purchaseRQ
Purchase
@ code
@ date
@ version
billto cdetail
shipto</p>
          <p>items
(b) Sample PSM schema
XML attribute declaration depending on its XML form (function xf orm0). An
association models an XML element declaration with a complex content if it has a name.
Otherwise, it models only that the complex content modeled by its child is nested in
the complex content modeled by its parent. If a class C0 is a structural representative
of another class repr0(C0), the complex content modeled by C0 extends the complex
content modeled by repr0(C0). This is exactly our definition of areusable schema part
as multiple PSM classes can be structural representatives of another target PSM class,
meaning that all of them reuse the definition of the target PSM class.</p>
          <p>The PSM schema represents a part of a PIM schema. A class, attribute or
association in the PSM schema may be mapped to a class, attribute or association in the PIM
schema. In other words, there is a mapping which specifies the semantics of classes,
attributes and associations of the PSM schema in terms of the PIM schema. The
mapping must meet certain conditions to ensure consistency between PIM schemas and the
specified semantics of the PSM schema. This mapping is called interpretation of the
PSM schema against the PIM schema.</p>
          <p>Definition 4. Let R = {E1, E2} ∈ Sr be an association. An ordered image of R is a
pair RE1 = (E1, E2) (or RE2 = (E1, E2)).</p>
          <p>We will use S−→r to denote the set of all ordered images of associations of S0, i.e. S−→r
= SR∈Sr0 {RE1 , RE2 }. We need these definitions to be able to distinguish direction of
PIM association, which is normally not needed in PIM.</p>
          <p>Definition 5. An interpretation of a PSM schema S0 against a PIM schema S is a
partial function I : (Sc0 ∪ Sa0 ∪ Sr0 ) → (Sc ∪ Sa ∪ S−→r) which maps a class, attribute or
association from S0 to a class, attribute or ordered image of an association from S,
respectively. For X0 ∈ (Sc0 ∪ Sa0 ∪ Sr0 ), we call I(X0) interpretation of X0. I(X0) = λ
denotes that I is not defined for X0. In that case, we will also say that X0 does not have
an interpretation.</p>
          <p>Let a function context 0I : Sc0 ∪ Sa0 ∪ Sr0 ∪ Sm0 → Sc0 return for a given component
X0 of S0 the closest ancestor class to X0 on path0(X0) so that I(context 0I (X0)) 6= λ.
The following conditions must be satisfied:</p>
          <p>I(CS00 ) = λ
(∀C0 ∈ Sc0 s.t. repr 0(C0) 6= λ)(I(C0) = I(repr 0(C0)))
(∀A0 ∈ Sa0 s.t. I(A0) 6= λ)(class(I(A0)) = I(context 0I (A0)))
(∀R0 ∈ Sr0 s.t. I(child 0(R0)) = λ)(I(R0) = λ)
(1)
(2)
(3)
(4)
(∀R0 ∈ Sr0 s.t. I(child 0(R0)) 6= λ)(I(R0) = (I(context 0I (R0)), I(child 0(R0))) (5)
Each PSM class, attribute or association can have an interpretation against a
component of the PIM schema. This mapping means that in the PSM schema the particular
PSM component models the concept represented by the target PIM component in the
PIM schema.</p>
          <p>Note that in the context of mapping of a PSM schema to a PIM schema
(interpretation construction), the content models present in a PSM schema are irrelevant as they
do not influence the semantics of PSM classes, attributes nor associations.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Algorithm</title>
      <p>
        In this section we will enhance our interpretation reconstruction algorithm first
introduced in [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and extended to a framework in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] so that it takes into account for reusable
schema parts. These are represented in our conceptual model as structural
representants. Because of lack of space in this paper, we will omit some details of the basic
algorithm, which can be found in [
        <xref ref-type="bibr" rid="ref4 ref7">7, 4</xref>
        ].
      </p>
      <p>The algorithm builds an interpretation I of a PSM schema against a PIM schema. I
must be correct, it must fulfil Definition 5. Moreover, it must be correct in the conceptual
sense, i.e. a PSM component and its PIM interpretation must conceptually correspond
to the same real-world concept. We ensure the formal correctness. The conceptual
correctness is ensured by a domain expert.
4.1</p>
      <sec id="sec-4-1">
        <title>Overview</title>
        <p>The basic algorithm works in three phases. Firstly, it measures initial similarities
between PSM and PIM attributes and classes. Secondly, it creates an initial interpretation
of PSM classes, whose initial similarity to some PIM class is higher than a given
threshold. Becasue this is done automatically, there is a possibility that this initial
interpretation is not correct. Therefore, it has to be verified by a domain expert. Nevertheless, the
initial interpretation usually helps to avoid confirming lots of obvious mapping matches
because the domain expert just needs to confirm a list of pre-mapped classes (or uncheck
the incorrect ones). The confirmed initial interpretation now becomes a final
interpretation and the algorithm moves to its third phase. It builds interpretation of the unmapped
PSM classes with an assistance of a domain expert.</p>
        <p>We will suppose a PSM schema S0 and a PIM schema S on the input. The output
of the algorithm is an interpretation I of S0 against S. We will enhance parts of the
algorithm where the knowledge of reusable schema parts (structural representants) can
help. But first, let us motivate a definiton. LetC0 be a structural representant of C00.
Due to condition 2 of Definition 5, the following must hold: I(C0) = I(C00). This
means that both C0 and C00 need to have the same interpretation in the PIM schema
(or both must remain uninterpreted). This also means (from condition 3 of Definition 5
and from the definition of context 0(C0)), that PSM attributes of C0 and C00 can only
have attributes of the same PIM class as interpretation. Intuitively, C0 and C00 represent
the same concept in the PSM schema and we can suppose that their names also refer
to the same concept. Note that the same goes for every PSM class C000, that would be a
structural representant of C0. This justifies the follwing definition.</p>
        <p>Definition 6. Let a function ss0 : Sc0 → 2(Sc0) return for each PSM class C0 a set
of PSM classes, which are (transitively) related to C0 by the structural representative
(repr 0) relation.</p>
        <p>For example, let C10, C20, C30 and C40 be PSM classes. Let repr 0(C10) = λ, repr 0(C20) =
C10, repr 0(C30) = C10 and repr 0(C40) = λ. Then ss0(C10) = ss0(C20) = ss0(C30) =
{C10, C20, C30} and ss0(C40) = ∅.
4.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Measuring Initial Similarity</title>
        <p>Attributes. Firstly, the algorithm measures a similarity for each pair of one PIM and
one PSM attribute. This is based on their names and datatypes. This phase is not affected
by the structural representants and we can skip the detailed description. Suffice to say
that results of initial attribute similarity are used in function Sinit−attrs(C0, C) below,
which gives us similarity of a PSM class and a PIM class based on their attributes.
Classes. Let (C0, C) ∈ C0 × C. The similarity between C0 and C is customizable, in
this paper it is a weighted sum</p>
        <p>Sinit−class (C0, C) = winit−class ∗ Sinit−attrs (C0, C)</p>
        <p>+ (1 − winit−class ) ∗ max{Sstr (name0(C0), name(C)), Sstr (xml 0(C0), name(C))}
where winit−class ∈ (0, 1) is a weighting factor and xml0(C0) is a name of the parent
association of C0 if any exists. Sinit−attrs (C0, C) is defined as Sinit−attrs (C0, C) =
PA0∈attributes0(C0) max A∈attributes(C) (Sinit−attr (A0, A)), i.e. it finds for each PSM
attribute A0 ∈ attributes 0(C0) the most similar PIM attribute A of C and summarizes
these similarities.</p>
        <p>This is the first place where we can exploit structural representants. For a PSM class
C0, we can take attibutes of every C00 ∈ ss 0(C0), because if those classes have an
interpretation, it is the same PIM class for all of them (and similarly for the attributes).
Therefore, we define functionattrssr : Sc0 → 2(Sa0) = ∪Ci0∈ss0(C0)attributes 0(Ci0) and
we can redefine:</p>
        <p>Sinit−attrs (C0, C) = PA0∈attrssr (C 0) max A∈attributes(C) (Sinit−attr (A0, A))
4.3</p>
      </sec>
      <sec id="sec-4-3">
        <title>Initial interpretation</title>
        <p>The initial class interpretations are set according to the initial class similarities
precomputed in the previous step. It is a simple procedure that takes the most similar pairs
of PSM and PIM classes (with similarity greater than a given threshold) and sets these
pairs as initial interpretations. Here is another place were we exploit structural
representants. Because of the fact that all PSM classes of ss 0(C0) need to have the same
interpretaion (or none at all), when we initially interpret one of them, we can as well
initially interpret all of them and the interpretation will be the same PIM class. And, of
course, due to the possibility that this interpretation is incorrect, we can provide the user
with the comfort of accepting/rejecting the whole group at once. If the domain expert
chose to consider structural representatives in both the attribute similarity and the name
similarity, this is an effect of the previous modification. The reason for this is that all
of the classes from the group will have the same initial similarities, because when we
computed the initial similarities for one class from the group, we included all the other
classes as well. If, however, the domain expert chose to ignore structural representants
at some stage, the similarities will be different and this adjustment may come in handy.
4.4</p>
      </sec>
      <sec id="sec-4-4">
        <title>Final Interpretation</title>
        <p>The third part of the algorithm iteratively traverses the PSM classes in Sc0 in pre-order
and helps the domain expert to build the final interpretation. Individual steps are shown
in Algorithm 1. For an actual PSM class C0 ∈ Sc0 , the algorithm firstly constructs
I (C0) (lines 2 - 6) and also sets the interpretation for all the PSM classes of ss 0(C0)
(lines 7 - 9). This is because all of them must have the same interpretation. Secondly,
the algorithm constructs I (A0) for each A0 ∈ attributes(C0) (lines 10 - 22). Finally, it
constructs I (R0) for each R0 ∈ content(C0) (lines 23 - 25). It can be shown that this
algorithm runs in O(N 3) where N is the number of PSM classes and in O(n × log(n))
where n is the number of PIM classes.</p>
        <p>Algorithm 1 Interpretation Construction Algorithm
1: for all C0 ∈ Sc0 in post-order do
2: for all C ∈ Sc do
3: Sclass(C0, C) ← wclass ∗ Sinit−class(C0, C) +
(1 − wclass) ∗ Sadj−class(C0,C)
1
4:
5:
6:
7:
8:
9:
10:
11:
12:
end for
Offer the list of PIM classes sorted by Sclass to the domain expert.</p>
        <p>I(C0) ← C where C ∈ Sc is the PIM class selected by the domain expert.
for all C00 ∈ ss0(C0) do</p>
        <p>I(C00) ← C {here we set the interpretation for the whole group of PSM classes}
end for
for all A0 ∈ attributes (C0) do
for all A ∈ Sa do</p>
        <p>Sattr(A0, A) ← wattr ∗ Sinit−attr(A0, A) +
(1 − wattr) ∗ μ(I(C0),class(A))+1
1
Class Interpretation To construct I (C0), the algorithm firstly computesSclass (C0, C)
for each C ∈ Sc0 at line 3. It is a weighted sum of two similarities. The former is
the initial similarity Sinit−class (C0, C). The other is a reversed class similarity
adjustment Sadj −class (C0, C) which we discuss in a while. The algorithm then sorts the PIM
classes by their similarity with C0 and offers the sorted list to the domain expert at
line 5. The expert selects a PIM class from the list and the algorithm sets I (C0) to this
selected class at line 6.
Class similarity adjustment Sadj −class (C0, C) is computed on the base of the
completed part of I, which includes confirmed initial interpretation.Sadj −class (C0, C) is a
combination of distances between C and PIM classes Di which are interpretations of
the interpreted neighbors of C0. μ(C, D) is the distance between PIM classes C and D.</p>
        <p>Note that Algorithm 1 is a skeleton which needs to be supplemented with methods
for (1) measuring distances between PIM classes, (2) combining distances, and (3)
selecting candidates for C0 structural similarity adjustment. In this paper, we use basic
methods to show that the general idea works. For measuring the distance between two
PIM classes C and D, we use the length of the shortest PIM path connecting C and D.
As the distance combination method, which results in the aimed Sadj −class (C0, C), we
can also choose from various possibilities. In this paper, we use
n
Sadj−class(C0, C) = (X μ(C, I(Di0)) ) + 1</p>
        <p>n
i=1
where D10, . . ., Dn0 are the selected interpreted neighbors of C0. Sadj−class(C0, C) is
the average of the lengths of the shortest PIM paths between C and each I(Di0).</p>
        <p>
          Finally, we need to decide which mapped neighbors of C0 will be selected to
compute Sadj −class (C0, C). We can choose among children of C0 or previous siblings of
C0, as these were already interpreted by the domain expert in this part of the algorithm.
Because we have some PSM classes interpreted via the initial interpretation, we can
use them as another candidates for structural similarity adjustment, if they are close
enough. Therefore, we can also select interpreted following siblings, interpreted parent
or interpreted ancestors as candidates for structural similarity adjustment. These options
are described and experimented with in [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>Here is another moment where we can exploit reusable schema parts in a form of
structural representants. As we choose which interpreted neighbors of C0 to use for the
structural similarity adjustment, we can also work with the same type of interpreted
neighbors of all classes of the group ss0(C0). The reasons are the same, because the
interpretation of all classes of the group must be the same PIM class.</p>
        <p>
          The rest of the algorithm remains unaffected by the structural representatives, so
we describe it only briefly. For details, see [
          <xref ref-type="bibr" rid="ref4 ref7">7, 4</xref>
          ]. When all the PSM classes have been
interpreted or the domain expert decided they should remain uninterpreted, a similar
process is performed for PSM attributes of the classes. The possibilities of mapping a
PSM attribute in this situation are limited due to the rules that the interpretation must
adhere to (see Definition 5). Finally, PSM associations are interpreted with respect to
the same rules.
5
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Evaluation</title>
      <p>
        In this section, we briefly evaluate the effect of structural representants on building
interpretations of PSM classes. For more detailed experiments with the overall method
see [
        <xref ref-type="bibr" rid="ref4 ref7">7, 4</xref>
        ]. We have implemented the introduced method in our tool XCase1 which was
primarily intended for designing XML schemas from a created PIM schema.
1 http://xcase.codeplex.com
      </p>
      <p>Let us suppose an actual PSM class C0. Let the domain expert set I(C0) to a PIM
class C either when asked or when confirming the initial interpretation. We measure
the precision of the algorithm from two points of view. Firstly, we measure the position
of C in the list of PIM classes offered to the expert sorted by their Sclass . We call this
precision a global precision PG:</p>
      <p>PG = (( X 1 −</p>
      <p>C0∈Sc0
order (C) − 1
n
where n denotes the size of Sc, n0 denotes the size of Sc0 , and order (C) denotes the
order of C in the list. If there are more PIM classes with the same similarity to C0,
order (C) is the order of the last one. PG = 0 (resp. 1) if for each PSM class C0, the
selected PIM class was the last (resp. first).</p>
      <p>The global precision is not sufficient. When C is the first class, there can be other
PIM classes before C which have their similarity to C0 close to Sclass (C0, C) and make
it harder to distinguish whether C is or is not a good match for C0. We therefore propose
another metric called local precision which measures the amount of PIM classes with
their similarity to C0 close to Sclass (C0, I(C0)). It is defined as</p>
      <p>PL = (( X 1 −</p>
      <p>C0∈Sc0
close(C) − 1
n
)/n0) ∗ 100
where close(C) denotes the number of PIM classes with their similarity to C0 close to
Sclass (C0, C). The term close similarity can be defined in various ways. In this paper,
we say that y is close to x if y ∈ (x − 0.1, x + 0.1).</p>
      <p>Intuitively, the effect of using structural representants is a reduction of the number
of mapping offers the domain expert needs to go through. This is because when an
interpretation of a PSM class C0 is constructed, it is automatically constructed for all
PSM classes ss0(C0) and the domain expert no longer needs to create the interpretation
for each one of them.</p>
      <p>Additionally, the use of structural representants for class similarity computations
may help with global and local precisions. This is, however, dependent on the texts
present in the source PSM schema, its structure and selected methods of similarity
measurements, which so far can not be determined automatically. Therefore, the
experimental results are very complex and their description would not fit into this article.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>
        In this paper, we studied the effect of exploiting reusable schema parts on techniques
used for mapping of XML formats to a conceptual diagram. We briefly described our
basic algorithm from [
        <xref ref-type="bibr" rid="ref4 ref7">7, 4</xref>
        ] which allows to exploit various similarity measurement
methods. Then we introduced our enhancements that allow us to take advantage of the
reusable schema parts, which are expressed as structural representants in our conceptual
model. Finally, we have provided a biref evaluation of the proposed method.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. R. dos Santos Mello and
          <string-name>
            <given-names>C. A.</given-names>
            <surname>Heuser</surname>
          </string-name>
          .
          <article-title>A Bottom-Up Approach for Integration of XML Sources</article-title>
          .
          <source>In Workshop on Information Integration on the Web</source>
          , pages
          <fpage>118</fpage>
          -
          <lpage>124</lpage>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>J.</given-names>
            <surname>Fong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. K.</given-names>
            <surname>Cheung</surname>
          </string-name>
          , and
          <string-name>
            <given-names>H.</given-names>
            <surname>Shiu</surname>
          </string-name>
          .
          <article-title>The XML Tree Model - toward an XML conceptual schema reversed from XML Schema Definition</article-title>
          . Data Knowl. Eng.,
          <volume>64</volume>
          (
          <issue>3</issue>
          ):
          <fpage>624</fpage>
          -
          <lpage>661</lpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>M. R.</given-names>
            <surname>Jensen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. H.</given-names>
            <surname>Møller</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T. B.</given-names>
            <surname>Pedersen</surname>
          </string-name>
          .
          <article-title>Converting XML Data to UML Diagrams For Conceptual Data Integration</article-title>
          . In
          <source>In Proceedings of DIWeb01</source>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4. J. Kl´ımek, I. Mly´nkova´, and
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Necˇasky´. A Framework for XML Schema Integration via Conceptual Model</article-title>
          . In Advances in Web, Intelligent, Cloud, and
          <string-name>
            <surname>Mobile Systems</surname>
          </string-name>
          Engineering - WISE
          <source>2010 Symposium and Workshops</source>
          . Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>J.</given-names>
            <surname>Kl</surname>
          </string-name>
          <article-title>´ımek and M. Necˇasky´. Integration and Evolution of XML Data via Common Data Model</article-title>
          .
          <source>In Proceedings of the 2010 EDBT/ICDT Workshops, Lausanne, Switzerland, March</source>
          <volume>22</volume>
          -26,
          <year>2010</year>
          , New York, NY, USA,
          <year>2010</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>J.</given-names>
            <surname>Kl</surname>
          </string-name>
          <article-title>´ımek and M. Necˇasky´. Reverse-engineering of XML Schemas: A Survey</article-title>
          . In J. Pokorny´,
          <string-name>
            <surname>V.</surname>
          </string-name>
          <article-title>Sna´sel, and</article-title>
          K. Richta, editors,
          <source>DATESO</source>
          , volume
          <volume>567</volume>
          <source>of CEUR Workshop Proceedings</source>
          , pages
          <fpage>96</fpage>
          -
          <lpage>107</lpage>
          . CEUR-WS.org,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Kl</surname>
          </string-name>
          <article-title>´ımek and M. Necˇasky´. Semi-automatic Integration of Web Service Interfaces</article-title>
          .
          <source>In IEEE International Conference on Web Services (ICWS</source>
          <year>2010</year>
          ), pages
          <fpage>307</fpage>
          -
          <lpage>314</lpage>
          . IEEE Computer Society,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>J.</given-names>
            <surname>Kl</surname>
          </string-name>
          <article-title>´ımek and M. Necˇasky´. Generating Lowering and Lifting Schema Mappings for Semantic Web Services</article-title>
          .
          <source>In 25th IEEE International Conference on Advanced Information Networking and Applications Workshops</source>
          ,
          <string-name>
            <surname>WAINA</surname>
          </string-name>
          <year>2010</year>
          , Biopolis, Singapore,
          <fpage>22</fpage>
          -
          <lpage>25</lpage>
          March
          <year>2011</year>
          . IEEE Computer Society,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Necˇasky´. Conceptual Modeling for XML, volume 99 of Dissertations in Database and Information Systems Series</article-title>
          . IOS Press/AKA Verlag,
          <year>January 2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10. M.
          <article-title>Necˇasky´and I. Mly´nkova´. On Different Perspectives of XML Schema Evolution</article-title>
          . In FlexDBIST'09,
          <string-name>
            <surname>Linz</surname>
          </string-name>
          , Austria,
          <year>2009</year>
          . IEEE.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. M.
          <article-title>Necˇasky´and</article-title>
          <string-name>
            <given-names>J. Pokorny´. Designing</given-names>
            <surname>Semantic Web Services Using Conceptual</surname>
          </string-name>
          <article-title>Model</article-title>
          .
          <source>In Proceedings of SAC'08</source>
          , pages
          <fpage>2243</fpage>
          -
          <lpage>2247</lpage>
          . ACM,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>C. Reynaud</surname>
            ,
            <given-names>J.-P.</given-names>
          </string-name>
          <string-name>
            <surname>Sirot</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Vodislav</surname>
          </string-name>
          .
          <article-title>Semantic integration of xml heterogeneous data sources</article-title>
          .
          <source>In In Proceedings of IDEAS '01</source>
          , pages
          <fpage>199</fpage>
          -
          <lpage>208</lpage>
          , Washington, DC, USA,
          <year>2001</year>
          . IEEE Computer Society.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13. P. Rodr´ıguez-Gianolli and
          <string-name>
            <given-names>J.</given-names>
            <surname>Mylopoulos</surname>
          </string-name>
          .
          <article-title>A Semantic Approach to XML-based Data Integration</article-title>
          .
          <source>In ER '01: Proceedings of the 20th International Conference on Conceptual Modeling</source>
          , pages
          <fpage>117</fpage>
          -
          <lpage>132</lpage>
          , London, UK,
          <year>2001</year>
          . Springer-Verlag.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. P. T. T. Thuy,
          <string-name>
            <given-names>Y.-K.</given-names>
            <surname>Lee</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Lee</surname>
          </string-name>
          .
          <article-title>DTD2OWL: Automatic Transforming XML Documents into OWL Ontology</article-title>
          . In
          <source>In Proceedings of ICIS '09</source>
          , pages
          <fpage>125</fpage>
          -
          <lpage>131</lpage>
          , New York, NY, USA,
          <year>2009</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Weidong</surname>
          </string-name>
          , G. Ning, and
          <string-name>
            <given-names>S.</given-names>
            <surname>Baile</surname>
          </string-name>
          . Reverse Engineering XML. Computer and Computational Sciences,
          <string-name>
            <surname>International</surname>
          </string-name>
          Multi-Symposiums on,
          <volume>2</volume>
          :
          <fpage>447</fpage>
          -
          <lpage>454</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16. L.
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          <string-name>
            <surname>Zhang</surname>
            , G. Huang, and
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Shi</surname>
          </string-name>
          .
          <article-title>Automatic Mapping from XML Documents to Ontologies</article-title>
          .
          <source>In CIT '04: Proceedings of the The Fourth International Conference on Computer and Information Technology</source>
          , pages
          <fpage>321</fpage>
          -
          <lpage>325</lpage>
          , Washington, DC, USA,
          <year>2004</year>
          . IEEE Computer Society.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>A.</given-names>
            <surname>Yu</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Steele</surname>
          </string-name>
          .
          <article-title>An Overview of Research on Reverse Engineering XML Schemas into UML Diagrams</article-title>
          .
          <source>In ICITA (2)</source>
          , pages
          <fpage>772</fpage>
          -
          <lpage>777</lpage>
          . IEEE Computer Society,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>