research

XML Schema - Best Practices

Abstract

An XML Schema is a particular XML document allowing to validate the content and the structure of XML data. This paper aims to describe a series of "Best Practices" for designing XML Schemas. The guidelines explain pros and cons about some design issues in order to help a schema designer to make the right decisions. The first section presents the base concepts about XML Schema, exploring the main components of a schema: namespaces, simple and complex elements, simple and complex type, attributes and other components. The second section shows a series of best practices related to some design issues like: the use of namespaces; the hiding or exposing of namespaces; about a declaration of element or type the choice between global or local way; about the declaration of an item the choice between element and type; the use of zero, one or more namespaces; the creation of an element that has a variable content; about the design of a schema the choice between to build type hierarchies (design by subclassing) or aggregate components (design by composition); the creation of extensible content models; the extension of schemas; the use between URL and URN in namespaces; the versioning of XML Schema and the hierarchy of substitutionGroup elements

    Similar works