Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modeling XML. XML Schema Languages DTD, XML Schema, Relax NG Specification of structure of XML documents What elements and attributes can be used Problems.

Similar presentations


Presentation on theme: "Modeling XML. XML Schema Languages DTD, XML Schema, Relax NG Specification of structure of XML documents What elements and attributes can be used Problems."— Presentation transcript:

1 Modeling XML

2 XML Schema Languages DTD, XML Schema, Relax NG Specification of structure of XML documents What elements and attributes can be used Problems Complexity Too technical for non-technical people Absence of semantics

3 XML Schema Languages Real applications Different groups of users viewing problem domain from different viewpoints  various types of XML documents ("XML views") in system

4 XML Schema Languages Data Data > PurchaseRequest > PurchaseResponse > Catalogue > SalesReport

5 XML Schema Languages One real-world concept (e.g. customer or product) represented in various types of XML documents in different ways Description distributed across various XML schemas redundancy & incompleteness Lack of complete & non-redundant description

6 XML Schema Languages HL7 exchanging medical records UBL exchanging business data ISO20022 exchanging financial data common charasteristics: Hundreds of XML schemas

7 XML Schema Visualization XML Spy, Stylus Studio, Oxygen XML Editor, … Visualization of each construct of particular XML schema language Usually XML Schema

8 XML Schema Visualization

9

10 Easier to understand XML schemas Just visualization – does not provide complete & non-redundant description

11 Model-Driven Architecture IDEA: describe data at various levels of abstraction PIM (Platform-Independent Model) Description of data independent of any data model and particular user view PSM (Platform-Specific Model) Description of data from particular user view Description of implementation in particular data model (relational, xml)

12 PIM Diagram

13 PSM Diagram – Relational Schema

14 Model-Driven Architecture Can be naturally applied on designing XML as well PSM = UML class model extended with set of stereotypes for modeling constructs of particular XML schema language Enterprise Architect PSM for XML Schema

15 PSM Diagram

16 PSM Diagram – Relational DB

17 Model-Driven Architecture Allows describing problem domain independently of XML Complete and non-redundant description No or weak binding between PIM and PSM level in recent tools

18 A Tool for XML Data Modeling

19 XCase Software Project ‘XSEM - Proof of concept’ project at MFF UK March – December 2008 Supervisor: Martin Nečaský, PhD Team members: Jakub Klímek, Lukáš Kopenec, Lucie Kučerová, Jakub Malý, Kateřina Opočenská Official website: http://www.ksi.mff.cuni.cz/~necasky/xcase/ Download & sources: http://www.codeplex.com/xcase Almost 4000 downloads so far! Presented at ITAT 2008

20 XCase Overview XCase implements XSEM, a conceptual model for XML data XSEM is based on MDA (Model-Driven Architecture) Platform Independent Model (PIM): UML class diagram XML-independent conceptual description of problem domain Platform-Specific Model (PSM): Extended UML class diagram Introduced new constructs for modeling XML hierarchy

21 XCase Design Process

22 XCase PIM Level Support of all well-known UML class diagram constructs: Classes Class attributes Class operations Associations Binary associations, n-ary associations Aggregations, compositions Association classes Generalizations

23 XCase PSM Level New constructs to UML class diagram: Attribute container Models attributes that should be expressed as XML elements instead of XML attributes Content choice Models variants in the content of PSM class Content container Models XML element that has no semantic equivalent at the PIM level (i.e. no equivalent PIM class) Class union Models a mixture (union) of instances of two or more PSM classes.

24 Ensuring PIM – PSM Consistency Dynamic propagation of changes: 1] from PIM diagrams to corresponding PSM diagrams New PIM association added → new child available in PSM Association cannot be removed from PIM if corresponding association is still present in PSM New attribute added in PIM → available in PSM Attribute removed from PIM → warning about removing from PSM Attribute changes in PIM propagated to corresponding attribute in PSM Automatic propagation: name, data type, default value User asked for confirmation: multiplicity 2] from PSM diagrams to corresponding PIM diagrams User can propagate free PSM attribute to PIM

25 XML Schema Derivation 1 XML Schema document derived from 1 PSM diagram Automatic derivation Starts in root PSM classes and proceeds recursively to their descendants Each PSM construct is translated to appropriate XML Schema construct Derived schemas are not saved within XCase project Can be derived, edited and saved anytime again

26 Live show begins …


Download ppt "Modeling XML. XML Schema Languages DTD, XML Schema, Relax NG Specification of structure of XML documents What elements and attributes can be used Problems."

Similar presentations


Ads by Google