Conversion of XML schema design styles with StyleVolution
Date | 24 August 2019 |
Published date | 24 August 2019 |
DOI | https://doi.org/10.1108/IJWIS-05-2019-0022 |
Pages | 23-64 |
Author | Zouhaier Brahmia,Fabio Grandi,Rafik Bouaziz |
Subject Matter | Information & knowledge management |
Conversion of XML schema design
styles with StyleVolution
Zouhaier Brahmia
University of Sfax, Sfax, Tunisia
Fabio Grandi
DISI, University of Bologna, Bologna, Italy, and
Rafik Bouaziz
University of Sfax, Sfax, Tunisia
Abstract
Purpose –Any XML schema definition can be organizedaccording to one of the following design styles:
“Russian Doll”,“Salami Slice”,“Venetian Blind”and “Garden of Eden”(with the additional “Bologna”style
actually representingabsence of style). Conversion from a design style to another can facilitatethe reuse and
exchange of schema specifications encodedusing the XML schema language. Without any computer-aided
engineering support,style conversions must be performed very carefullyas they are difficult and error-prone
operations.The purpose of this paper is to efficiently deal withsuch XML schema design style conversions.
Design/methodology/approach –A general approach, named StyleVolution, for automatic
management of XML schemadesign style conversions, is proposed. StyleVolutionis equipped with a suite of
seven procedures: four for converting a valid XML schema from any other design style to the “Garden of
Eden”style, which has been chosenas a normalized XML schema format, and three for converting from the
“Gardenof Eden”styleto any of the other desired design styles.
Findings –Procedures, algorithms andmethods for XML schema design style conversions are presented.
The feasibility of the approach has been shown throughthe encoding (using the XQuery language) and the
testing (with the Altova XMLSpy 2019 tool) of a suite of seven ready-to-use procedures.Moreover, four test
proceduresare provided for checking the conformanceof a given input XML schema to a schema design style.
Originality/value –The proposed approach implements a new technique for efficiently managing XML
schema design style conversions, which can be used to make any given XML schema file to conform to a
desired designstyle.
Keywords Schema change, Schema evolution, XML database, XML Schema,
XML schema design style, XML schema translation
Paper type Research paper
1. Introduction
The eXtensible Markup Language XML (W3C,2008) along with the XML Schema language
(W3C, 2004;Van der Vlist, 2011) is likely the description and specification formalism that
has had the most significant impact on the development of Web-related technologies and
applications. In particular, although XML has been designed as a general-purpose data
storage and exchange format, it has been widely exploited for the representation and
management of (semistructured) data in Web-based information systems, for which XML
schema is the elective data modeling formalism (Abiteboul et al.,2011;Aiken and Allen,
2004;Chaudhri et al.,2003).
Nowadays, XML and all languagesbased on it, like XML schema, XQuery (W3C, 2014),
XQuery Update Facility,XPath and XSLT, continue to be of great interest for the developers
Conversion of
XML schema
design styles
23
Received2 May 2019
Revised28 June 2019
Accepted4 July 2019
InternationalJournal of Web
InformationSystems
Vol.16 No. 1, 2020
pp. 23-64
© Emerald Publishing Limited
1744-0084
DOI 10.1108/IJWIS-05-2019-0022
The current issue and full text archive of this journal is available on Emerald Insight at:
https://www.emerald.com/insight/1744-0084.htm
of modern XML-based applications (e.g. Web services, cloud computingapplications, social
network applications, e-commerce systems) and designers/administrators of XML
repositories or databases (Bourret,2005, 2010). Among the most important requirements of
these actors, we find those concerning application maintenance (application source code
correction, applicationextension, XML schema changes, etc.). In general, changesperformed
on XML schema files are error-prone and time consuming tasks (Klímek et al.,2015), since
they should be accomplished manually, as there is often no technical support (e.g. stand-
alone or IDE-embeddedcomputer-aided engineering tools) for performing them.
In the present work, we continue our research work on changes to the overall XML
schema design patterns, which already covered changes to XML namespaces in (Brahmia
et al., 2016a,2016b). In particular, we focushere on changes involving XML schema design
styles. In fact, any XML schema could be designed according to one of the following five
styles (Maler, 2002;McBeath et al., 2004;Lämmel et al.,2005;Darr et al.,2011;Range
Commanders Council (RCC), 2015;xFront, 2018): “Russian Doll”,“Salami Slice”,“Venetian
Blind”,“Garden of Eden”, and “Bologna”. They differ on the way they define, globally or
locally, XML schema components: element declarations, attribute declarations, simple type
definitions, and complex type definitions. A global component is an immediate child of the
root <xsd:schema>element; it is also automatically associated with the target namespace of
the XML schema, and therefore it couldbe re-used in other XML schemas. However, a local
component is not an immediate child of the <xsd:schema> element and, thus, it is not
visible from the outside of the schema definition. The “Russian Doll”design style means
having only one global element declaration that nests all other possible element/attribute
declarations and simple/complex type definitions. In the “Salami Slice”style all element/
attribute declarations are globally defined and all simple/complex type definitions are
locally defined. In the “VenetianBlind”style all element/attribute declarations are defined as
local components and all simple/complextype definitions are defined as global components.
The “Garden of Eden”style defines all element/attribute declarations and all possible
simple/complex type definitions as global components. Otherwise, an XML schema can be
by default considered as conforming to the “Bologna”design style that is actually not a
defined style[1].
Considering an XML database (DB),that is a repository of XML-encoded documents each
one conforming to an XML schema specification, the XML DB designer could need to
translate an XML schema from its current design style to another one or putting an XML
schema, whose style is undefinedor unknown, into any desired style.
The reasons behind a style conversionmay be different and involve the features of global
versus local definitions as described in the following. On the one hand, the use of local
definitions emphasizesdecoupling (i.e. definitions are self-contained, without dependenceon
other components) and cohesion (i.e. related data are grouped together into self-contained
definitions) of specifications, and supports namespace complexity hiding (according to the
value of the elementFormDefault). Notice that complex schema definition details can be
deliberately maintainedhidden via local definitions to namespace users, also to preservethe
intellectual property of the design (e.g. by adopting a “Russian Doll”style). On the other
hand, the use of global definitions improves the sharing and re-use of specifications, as the
definition of some subcomponent can be referenced (without code duplication and, thus,
reducing the verbosity of schema definitions) by several component specifications in the
same schema or made available to the designers of other schemas. With global definitions,
the full complexity of namespaces can be exposed and the collaborative and incremental
definition of even more complex schemas and namespaces can be supported.Reusability of
components can be made available at different levels, according to the adopted style: the
IJWIS
16,1
24
“Salami Slice”style only allows the re-use of element/attribute declarations, the “Venetian
Blind”style only allows the re-use of simple/complex type definitions, whereas the “Garden
of Eden”style allows the re-use of both element/attribute declarations and simple/complex
type definitions.
Nevertheless, schema translation operations are not straightforward and should be
performed carefully, since,from one hand, there are no available tools that allow performing
such style design changes,and, from the other hand, some style changes can be difficultand
error-prone to manually apply on large schemas and may also have side effects on the
underlying XML instance documents(in such a case, they modify not only the XML schema
presentation but also the XML schema specification).Therefore, our purpose is to allow the
XML DB designers/administratorsto automatically:
change the design style of any XML schema to another design style;
put an XML schema whose style is undefined or unknown into any desired style;
correct design style errors in some existing XML schemas supposed to be in a given
design style but not completely conformant (e.g. because developed by non-expert
designers); and
make available for re-use definitions that are local in a schema, via transformation
into global definitions in a new schema.
This should be done by means of automatic design style conversion tools, which should
reduce the intervention of the schema designer to the minimum and generate, in a
transparent manner, a new version of a given schema, semantically equivalent to it but
conformant to the target style.
To this purpose, in this paper, we propose StyleVolution,a suite of seven procedures for
efficiently managing design styles of XML schemas:putting an XML schema whose design
style is undefined or unknown into a desired style, or converting an XML schema that is
designed accordingto a given style into a different design style.
To define such procedures, we started by choosing the “Garden of Eden”design style as
a normalized style, thanks to the fact that it maximizes reusability of specifications, since it
globally exposes all element/attribute declarations and all simple/complex type definitions.
After that, we have definedseven translation procedures that will be presented in thispaper:
four procedures, named RD2GE, SS2GE, VB2GE and BO2GE,for translating any “Russian
Doll”,“Salami Slice”,“Venetian Blind”or “Bologna”XML schema to an equivalent schema
designed according to the normalized style, respectively; and three procedures, named
GE2RD, GE2SS, and GE2VB, for translating a “Garden of Eden”XML schema to an
equivalent schema in any (desired) one of the three other non-defaultdesign styles, namely
“Russian Doll”,“SalamiSlice”or “Venetian Blind”, respectively.
Any design style conversion could then be performed with the direct use of either one
procedure (when the target or the source design style is “Garden of Eden”), or with a
combination of two procedures, one from the first subset {RD2GE, SS2GE, VB2GE,
BO2GE} and the other from the second subset {GE2RD, GE2SS, GE2VB} (i.e. passing
through the “Garden of Eden”styleas an intermediate step of the conversion).
The rest of this paper is structuredas follows. Section 2 describes the main XML schema
design styles found in the literature and used in XML-based application development.
Section 3 introduces the procedures that we propose for converting any XML schema,
having a defined (“Russian Doll”,“Salami Slice”,“Venetian Blind”,“Garden of Eden”)ora
non-defined (“Bologna”) design style, into any other desired defined style. Section 4 deals
with effects of changes to XML schema design styles on underlying XML document
Conversion of
XML schema
design styles
25
To continue reading
Request your trial