IVOA Registry videocon 2004/05/13-14 Gerard Lemson1 Model based schema.

Slides:



Advertisements
Similar presentations
Proposal for change to VOTable schema Without changing set of valid documents (modulo undesired ones)
Advertisements

1 Web Data Management XML Schema. 2 In this lecture XML Schemas Elements v. Types Regular expressions Expressive power Resources W3C Draft:
XML Examples AIXM 5 RC2.
1 XML DTD & XML Schema Monica Farrow G30
An Introduction to XML Schema CSCI 7818 by Ming Rutar.
A Simple Schema Design. First Schema Design Being a Dog Is a Full-Time Job Charles M. Schulz Snoopy Peppermint Patty extroverted beagle Peppermint.
XML Schemas Lecture 10, 07/10/02. Acknowledgements A great portion of this presentation has been borrowed from Roger Costello’s excellent presentation.
1 Substitution Groups in XML Schemas Tomer Shiran Winter 2003/4 Semester.
DECO 3002 Advanced Technology Integrated Design Computing Studio Tutorial 6 – XML Schema School of Architecture, Design Science and Planning Faculty of.
XML Schemas and Namespaces Lecture 11, 07/10/02. BookStore.dtd.
ΑΝΑΠΑΡΑΣΤΑΣΗ ΓΝΩΣΗΣ ΣΤΟΝ ΠΑΓΚΟΣΜΙΟ ΙΣΤΟ XML Schema
Enabling Grids for E-sciencE ISSGC’05 XML Schemas (XSD) Richard Hopkins, National e-Science Centre, Edinburgh June 2005.
Sunday, June 28, 2015 Abdelali ZAHI : FALL 2003 : XML Schemas XML Schemas Presented By : Abdelali ZAHI Instructor : Dr H.Haddouti.
Introduction to XML Schema Winter Sources XML Schema Part 1: Structures W3C Recommendation 2 May 2001,
1 Print your own copy If you bring it along, hand in with your exam script Do not write anything extra or you will be penalized Student Name: Student Number:
Introduction to XML This material is based heavily on the tutorial by the same name at
1 Advanced Topics XML and Databases. 2 XML u Overview u Structure of XML Data –XML Document Type Definition DTD –Namespaces –XML Schema u Query and Transformation.
Manohar – Why XML is Required Problem: We want to save the data and retrieve it further or to transfer over the network. This.
Framework for Model Creation and Generation of Representations DDI Lifecycle Moving Forward.
26 May 2004IVOA Interoperability Meeting - Boston1 Recommendations for Revisions to the VOResource XML Schema IVOA Registry Working Group.
ESO - Garching 23 June – 02 July, 2003 ACS Course Data entities and XML serialization H. Sommer.
1 Multi-Schema Project: Zero, One, or Many Namespaces? XML Schemas: Best Practices A set of guidelines for designing XML Schemas Created by discussions.
Why XML ? Problems with HTML HTML design - HTML is intended for presentation of information as Web pages. - HTML contains a fixed set of markup tags. This.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui SWEN 432 Advanced Database Design and Implementation XML Schema 1 Lecturer.
XML Schema Vinod Kumar Kayartaya. What is XML Schema?  XML Schema is an XML based alternative to DTD  An XML schema describes the structure of an XML.
Ertan Deniz Instructor.  XML Schema  Document Navigation (Xpath)  Document Transformation (XSLT)
1 XML Schemas. 2 Useful Links Schema tutorial links:

Dr. Azeddine Chikh IS446: Internet Software Development.
Copyright © [2001]. Roger L. Costello. All Rights Reserved. 1 XML Schemas (Primer)
CSE4500 Information Retrieval Systems XML Schema – Part 1.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Schemas Ellen Pearlman Eileen Mullin Programming the Web Using XML.
XML and friends Part 2 - XML Schema ELAG 2001 workshop 8 Jan Erik Kofoed © BIBSYS Library Automation.
XML A Single Entity. xml a single entity Objectives Objectives :  understand the data model  describe the XML Document  describe the XML Schema  describe.
Creating Data Schemas Presentation by Chad Borer 2/6/2006.
Theory interest group wiki: see also
Session IV Chapter 9 – XML Schemas
CSE3201 XML Namespace. 2 What is a namespace? An XML namespace is a collection of element type and attribute names.
Default Namespace - targetNamespace or XMLSchema? XML Schemas: Best Practices A set of guidelines for designing XML Schemas Created by discussions on xml-dev.
Beginning XML 4th Edition. Chapter 5: XML Schemas.
Discussion of UPCC comments UN/CEFACT Forum Meeting Geneva, –
XASTRO-2 Overview Presentation CCSDS SAWG Athens Meeting 12 th April 2005.
XML Schema. Why Schema? To define a class of XML documents Serve same purpose as DTD “Instance document" used for XML document conforming to schema.
XML – Part III. The Element … This type of element either has the element content or the mixed content (child element and data) The attributes of the.
1 CIS336 Website design, implementation and management (also Semester 2 of CIS219, CIS221 and IT226) Lecture 5 XML Schema (Based on Møller and Schwartzbach,
Sheet 1XML Technology in E-Commerce 2001Lecture 2 XML Technology in E-Commerce Lecture 2 Logical and Physical Structure, Validity, DTD, XML Schema.
1 Tutorial 14 Validating Documents with Schemas Exploring the XML Schema Vocabulary.
XML Schema. Why Validate XML? XML documents can generally have any structure XML grammars define specific document structures Validation is the act of.
IVOA, Trieste, DM Gerard Lemson Data Modelling Standards (contd.) IVOA interop, DM WG session Trieste,
Processing of structured documents Spring 2003, Part 3 Helena Ahonen-Myka.
Working with XML Schemas ©NIITeXtensible Markup Language/Lesson 3/Slide 1 of 36 Objectives In this lesson, you will learn to: * Declare attributes in an.
XML Schema (W3C) Thanks to Jussi Pohjolainen TAMK University of Applied Sciences.
XSD: XML Schema Language Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
XML Schema Definition (XSD). Definition of a Schema It is a model for describing the structure and content of data The XML Schema was developed as a content.
All Presentation Material Copyright Eurostep Group AB ® A Meta-model of EXPRESS in UML for MOF and UML to EXPRESS David Price April 2002.
Tutorial 2: XML Working with Namespaces. 2 Name Collision This figure shows two documents each with a Name element.
XML Schema Lecture 3. Indicators There are seven indicators: Order indicators: All Choice Sequence Occurrence indicators: maxOccurs minOccurs Group indicators:
ACG 6415 XML Schemas XML Namespaces XMLink. The XML Foundation  Many participants – an extended family! XML documents – carry data in context  Each.
CITA 330 Section 4 XML Schema. XML Schema (XSD) An alternative industry standard for defining XML dialects More expressive than DTD Using XML syntax Promoting.
Web Services: Principles & Technology Slide 3.1 Chapter 3 Brief Overview of XML COMP 4302/6302.
4 Copyright © 2004, Oracle. All rights reserved. Validating XML by Using XML Schema.
AIXM 5.1 XML Developers' Seminar #2 – Dec 2009
XML Examples AIXM 5 RC2.
Experiences and Status
XML QUESTIONS AND ANSWERS
Data Modeling II XML Schema & JAXB Marc Dumontier May 4, 2004
Discussion on XSD open issues
TOSCA Namespaces Explained
XML Examples AIXM 5 RC2.
Presentation transcript:

IVOA Registry videocon 2004/05/13-14 Gerard Lemson1 Model based schema

IVOA Registry videocon 2004/05/13-14 Gerard Lemson2 UML to XSD binding Start with UML model Generate XMI from UML Define UML to XSD binding Implement binding as XSLT script Run script

IVOA Registry videocon 2004/05/13-14 Gerard Lemson3 Sample UML

IVOA Registry videocon 2004/05/13-14 Gerard Lemson4 Mapping “methodology” Simple: as “1-1” as possible Preserve semantics –Attributes owned by class –Children in parent-child composition relation owned by parent/container Focus on type definitions, complexType-s mainly Valid documents (global elements) defined with respect to, but separate from the type definitions Default document: contains an element definition under the root for each “root-entity-class”. Possibility of reuse of schema type definitions in different special purpose document definitions.

IVOA Registry videocon 2004/05/13-14 Gerard Lemson5 Mapping: packages Package -> (target)namespace, in own file Dependency -> import of dependent namespace and file <xsd:schema xmlns:xsd=" targetNamespace="urn://xml.registry.gavo.org/aas" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.1" xmlns:aas="urn://xml.domainmodel.gavo.org/aas" xmlns:base="urn://xml.domainmodel.gavo.org/" xmlns:cees="urn://xml.domainmodel.gavo.org/cees">... <xsd:import namespace="urn://xml.registry.gavo.org/cees" schemaLocation="./cees.xsd" />

IVOA Registry videocon 2004/05/13-14 Gerard Lemson6 Mapping Classes Every class -> globally defined complexType isAbstract -> abstract=“true” Attribute -> element of simplish-type, either built-in, or also generated

IVOA Registry videocon 2004/05/13-14 Gerard Lemson7 Mapping Classes II Inheritance -> extension of base class

IVOA Registry videocon 2004/05/13-14 Gerard Lemson8 Mapping Associations I Parent-child relationship Composition -> element of appropriate complexType <xsd:element name="dees" type="cees:D" minOccurs="0" maxOccurs="unbounded" />

IVOA Registry videocon 2004/05/13-14 Gerard Lemson9 Mapping associations II “Owned references” -> element of appropriate type

IVOA Registry videocon 2004/05/13-14 Gerard Lemson10 Mapping associations III Problem: shared references (also aggregations), many-to-1/many relations Does one want to replicate elements that are shared ? Multiple B-s can reference same C. Solutions: –Don‘t care, map ala composition, with cardinality maxOccurs=“0” –Use ID/IDREF or KEY/KEYREF declarations. Requires the C to exist in same document, possibly completely, i.e. containing all substructure. –Use explicit “proxy ” element, for example using a GUID (IVOA identifier?), which can/must be resolved before the referenced object can be obtained. This is the most tricky thing I think about XML schemas, how to properly embed the semantics of the shared association into a logical schema design.

IVOA Registry videocon 2004/05/13-14 Gerard Lemson11 Default Document Root entity classes map also to an element in a document, but in a separate schema doc, depending on the type defining schema documents. <xsd:schema targetNamespace="urn://xml.registry.gavo.org/doc"... xmlns:doc="urn://xml.registry.gavo.org/doc" xmlns:cees="urn://xml.registry.gavo.org/cees" xmlns:aas="urn://xml.registry.gavo.org/aas"> <xsd:import namespace="urn://xml.registry.gavo.org/cees" schemaLocation="./cees.xsd" /> <xsd:import namespace="urn://xml.registry.gavo.org/aas" schemaLocation="./aas.xsd" /> <xsd:element name="c" type="cees:C" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="a" type="aas:A" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="b" type="aas:B" minOccurs="0" maxOccurs="unbounded"/>

IVOA Registry videocon 2004/05/13-14 Gerard Lemson12 Comments Single inheritance mapping, only extension, no substitutionGroup Requires xsi:type construct (next slide) to indicate which precise class is used. No element ref construct. No global elements for attributes and contained classes. Analogy to Java binding : –Complex type class –Typed declarations Fields in class definition –Default document a main method using the classes. –Global elements variable declarations local to main method Can support a more involved special purpose document to/from the “official” default registry document using XSLT scripts for example (view concept). See also: and othershttp:// Probably more …

IVOA Registry videocon 2004/05/13-14 Gerard Lemson13 xsi:type xsi:type=‘’ construct from the xmlns:xsi=“ in document required to indicate precise class: <doc:sample xmlns:xsi=" xmlns:doc="urn://xml.registry.gavo.org/doc" xmlns:cees="urn://xml.registry.gavo.org/cees"> a C a D1 a D2