XML Schema Languages as a Technical Fundamental of Formalised Description

Embed Size (px)

Citation preview

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    1/31

    1

    XML SCHEMA LANGUAGESAS A TECHNICAL FUNDAMENTAL OF

    FORMALISED DESCRIPTION OF MAPS

    OTAKAR CERBA

    Geomatics Section

    Department of Mathematics

    Faculty of Applied Sciences

    University of West Bohemia in Pilsen

    Czech Republic

    The Future of Maps and the Internet, November, 13-15, 2009 Via Del Mar, Valparaiso, Chile

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    2/31

    2

    Introduction

    Ing. et Mgr. Otakar Cerba Geomatics section on University of West Bohemia in Pilsen

    since 1995 Member of Czech cartographic society Application of XML technologies (XML schema languages,

    XSLT) and data modeling techniques to digital cartography Projects: VisualHealth, Humboldt, Plan4all, SDI-EDU

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    3/31

    3

    Objectives

    Formalized description of map XML & XML schema languages RELAX NG language & its possibilities Formalized description of map through RELAX NG

    Future steps Conclusion

    namespace dc = " http://purl.org/dc/elements/1.1/ " start = Atlas_element |MapSet_element | Map_element Atlas_element = element Atlas {MapSet_or_Atlas}MapSet_element = element MapSet {MapSet_or_Atlas} MapSet_or_Atlas =

    MapSet_element* & ap_element* & Metadata_DCMI Map_element = element Map {Technique_element+ & Metadata_DCMI} # Group of metadata elements common to allroot elements Metadata_DCMI = element dc:title {text} & element dc:creator{text} & element dc:description {text}? Technique_element = element Technique {

    attribute name "Choropleth"} &element SourceData {attribute uri {xsd:anyURI}& attribute geometry {text} & element Parameter {text}* } & element Border{attribute width {xsd:decimal}+ & attribute colour {text}+ & attribute structure{text}+ }* & element Inside { attribute fillColour {text} | attribute fillURI

    {xsd:anyURI} } & element Classification { attribute name {"Constant" |"Qunatilies" | "Standard_deviation"}+ & attribute classesNumber {xsd:decimal}+}

    http://purl.org/dc/elements/1.1/http://purl.org/dc/elements/1.1/
  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    4/314

    Cartography vs. Information technologies

    Cartography

    Informationtechnologies

    Informationtechnologies

    Web environment

    Services

    Data sharing

    Automatedprocessing

    Cartography

    Web environment

    Services

    Data sharing

    Automatedprocessing

    Cartography is an information transfer process that is centred about a spatialdatabase which can be considered, initself, a multifaceted model of geographicreality. Such a spatial database thenserves as the central core of an entire

    sequence of cartographic processes,receiving various data inputs anddispensing various types of informationproducts. (Guptill & Starr 1984).

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    5/315

    Situation in cartography

    Cartographer who wants toshare maps, communicate,

    through Internet and use WPS

    Platform

    Standard

    Format

    Specification

    Datamodel

    Platform Standard

    Format Specification

    Datamodel

    Platform

    Standard

    Format

    Specification

    Datamodel

    Platform

    Standard

    Format

    Specification

    Datamodel

    Platform

    Standard

    Format

    Specification

    Datamodel

    Standard SpecificationData

    model

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    6/316

    Way from the labyrinth

    Exploitation of cartographic benefits of the Internet

    Removing of problems related to datamodels, data formats, platforms,

    specifications, standards...

    IT IS IMPOSSIBLE!!!

    To eliminate consequences of heterogeneities

    HOW?

    Detailed and standardizeddescription of data models of all levels

    and data formats through exchangeformat based on a platform

    independent language

    XML

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    7/317

    XML? What is it?

    Markup language or metalanguage

    XML marks the meaning of particular parts of

    documents, but does notspecify their design XML describes data and

    their structure

    XML is the base of semantic data

    1. XML is a protocol for containing and managinginformation.

    2. XML is a family of

    technologies that can doeverything from formattingdocuments to filtering data.

    3. XML is a philosophy for information handling thatseeks maximum usefulnessand flexibility for data byrefining it to its purest andmost structured form.

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    8/318

    XML? Why do we need it?

    XML

    Independence

    Freedom

    Simplicity

    Clarity

    Expansion

    Relations

    Self-description

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    9/319

    XML schema languages? Why?We have XML...

    XML can have an effect of bigger chaos.

    XML is not a concrete dataformat. It is a set of rules for

    building markup languages. Everybody can create and

    use own names of elementsand attributes

    No interoperability

    ?Where is

    the promised interoperability?

    The freedom to define tag namesand attributes has to be constrained

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    10/3110

    XML schema languages enable to...

    ...define and describe any subset of XML a formaldefinition of a new markup language or format (e.g.elements, attributes, entities, their limits and restrictions)

    ...be used as filters or firewalls protecting computers

    against heterogeneities of XML formats and languages ...be processed by special software called validators being

    able to control the structure of data file ...eliminate the heterogeneities related to different data

    structures, formats, models etc. ...create and work with PSVI (Post-Schema ValidationInfoset)

    ...generate documentation materials of XML-based formats

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    11/3111

    XML schema languages

    DTD W3C XML Schema RELAX NG

    RELAXXduceTREX

    SchematronExamplotron

    XML-DataXML-Data-Reduced

    Document Content DescriptionSchema for Object-Oriented XML

    Document Definition Markup Language

    XML schema languages enable unification, but...

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    12/31

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    13/31

    13

    Which format is the best?

    XML schema language XML format

    DTD SVG 1.0, SVG 1.1, SVG Mobile Profiles, GML 1.0, SLD 0.71, X3D 3.0

    W3C XML Schema KML 2.2, GML 2.0-3.2.1, LandXML 1.0-1.2, DiaML, SLD 0.72-1.1.0, X3D 3.0

    RELAX NG SVG Tiny 1.2

    element Map {element Title {text}}

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    14/31

    14

    Relax with RELAX NG

    RELAX NG = RELAX + TREX + Xduce ISO standard (ISO/IEC FDIS 19757-2 Document Schema

    Definition Language (DSDL) -- Part 2: Regular-grammar-based validation RELAX NG)

    Two forms of syntax XML-based and compact Support of XML Namespaces Re-using data types defined in W3C XML schema Relationship to Schematron

    Transformation to other XML schema languages (DTD,W3C XML Schema, both syntax form of RELAX NG)through software Trang

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    15/31

    15

    RELAX NG patterns

    Elements, attributes, comments Mandatory and optional elements and attributes Sequence (order) of parts of data forced, free Multiple occurrence of elements Choices of elements and attributes Context parts of data dependent on other values of data Data types (in-built, W3C XML Schema) Enumeration data type Condition of data values

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    16/31

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    17/31

    17

    Advantages of XML-based description

    Based on the schemes it will be possible to create softwareuniformly processing described data

    Data can be controlled using validators XML schema languages bring more comfort to the editors

    In the case of choice of semantically understandablenames the description of maps will easy to read for people

    Anyone who has once learned to describe the map with aspecific subset of the XML language, will be able to carry

    out his work quickly and efficiently in other similar cases Only a formalized description will link with other standards Software working with formalized description allows to

    generate not only a map sheet and its features, but alsocompositional elements, GUI, metadata

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    18/31

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    19/31

    19

    Example: Structure of maps

    Map

    Metadata(DCMI)

    Atlas

    MapSet

    dc:title

    dc:creator

    dc:description

    Root elements Top-down modeling process

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    20/31

    20

    Example: Structure of maps

    namespace dc = "http://purl.org/dc/elements/1.1/"

    start = Atlas_element | MapSet_element | Map_element

    Atlas_element = element Atlas {MapSet_or_Atlas}

    MapSet_element = element MapSet {MapSet_or_Atlas}

    MapSet_or_Atlas =MapSet_element* &Map_element* &Metadata_DCMI

    Map_element = element Map {Metadata_DCMI}

    # Group of metadata elements common to all root elementsMetadata_DCMI =

    element dc:title {text},element dc:creator {text}+,

    element dc:description {text}?

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    21/31

    21

    Example: Cartographic technique

    Cartographictechniquesmodeling

    Syntactictypes of

    cartographicmethod

    Visualvariables

    Decompositionof cartographicsymbols

    Assignment of properties of symbols

    Mid-levelmodeling process

    Source data

    AbsolutelyRelatively(parametrization)

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    22/31

    22

    Example: Choropleth maps

    Choroplethmaps

    Areals Borders

    Type of fill(colour, pattern)

    Width, colour,structure

    Factors influencingselection of concretevisual variables:

    They must be suitable for

    quantitative data

    describable withSVG

    Source data

    AbsolutelyRelatively

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    23/31

    23

    Process of map generating used in VisualHealthproject and Atlas of International Relationships

    Geodata

    Visualisation

    rules

    Thematic mappresented

    in the browser

    Descriptionof the map

    Transformationprocessor

    GML, JML...

    XSLT 2.0

    XML(RELAX NG)

    Saxon(or internal p.) SVG, KML...

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    24/31

    24

    ogr:OB01

    ogr:dietaogr:kombiogr:pdaogr:inzulin

    Combination of choropleth map and pie charts

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    25/31

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    26/31

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    27/31

    27

    Future steps technical view

    Application of contexts based on the concrete values of elements or attributes

    Strict data types declaration changing the general datatype text to a specific data type taken from the W3C XML

    Schema or regular expressions The implementation of inheritance rules, which allows

    sharing properties among the nested elements Modularization of long and complicated scheme structure

    of maps, groups of maps or atlases, cartographictechniques and data types

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    28/31

    28

    Conclusion advantages to web cartography

    Validation automatically checking syntax of a document Interoperability communication and exchange of

    information not only in cartographic domains Accessibility of cartographic products elimination the

    impossibility of use of applications

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    29/31

    29

    Conclusion - relations

    Formalizeddescription

    of maps

    ICA ResearchAgenda

    Next generationof Web (2.0...)

    XMLtechnologies

    Web services Spatial datainfrastructure

    Expertsystems

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    30/31

    30

    Conclusion

    Increase in abstraction and formalization higher level of automated processes in cartography

    Formalized language to describe the map positive changes in quality of services

    wider use of other types of services providing dataand allowing for processing

    But...Cartographers action cannot be completely replaced with

    automated processes the formal description of the mapcannot constitute a final solution for creating maps but onlyone of the tools to support creative activities of cartographers,and a system to help the communication

  • 8/14/2019 XML Schema Languages as a Technical Fundamental of Formalised Description

    31/31