XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML...
-
Upload
susanna-stevenson -
Category
Documents
-
view
214 -
download
0
Transcript of XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML...
![Page 1: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/1.jpg)
XML INTEGRATORGoogle Wave Gadget
![Page 2: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/2.jpg)
PURPOSE
Create mapping from one XML schema to another XML schema
Support collaborative creation of that mapping
Export that mapping as a XSLT transformation
![Page 3: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/3.jpg)
WHAT’S A MAPPING? I
Translation of one or many XML elements in the source XML to an element in the destination XML
More precisely, XML is a tree hierarchy of XML elements. This hierarchy structure can be defined using XSD or other ways, ex. DTD. But XSD is mostly used, therefore was chosen as the source of XML structure for this application.
![Page 4: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/4.jpg)
WHAT’S A MAPPING? II
Usually, it’s required to modify the source element, so it can be mapped to a destination element.
Therefore mapping must contain definition of this modification.
![Page 5: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/5.jpg)
MAPPING LIFECYCLE
1) Choose source and destination XSD2) Add mappings3) Create XSLT4) Apply to a XML
![Page 6: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/6.jpg)
EXAMPLE OF A MAPPING
![Page 7: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/7.jpg)
MAPPING DEFINITION
Transformation type Maximal number of inputs (optional) XPath expression (optional) Inputs map Output list
![Page 8: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/8.jpg)
TRANSFORMATIONS
Name Inputs Bounded
XPath XPath enabled
Identity 1 ●
Sorted 2 ●
Condition 2 ●
Sequence 1
Copy-of 1
Value-of 1
Concatenation
1
Longer 2 ●
XPath 1 string(#0)
●
![Page 9: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/9.jpg)
IMPLEMENTATION – DATA STRUCTURES
XML Mapping Model Source schema Destination schema Elements mappings
![Page 10: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/10.jpg)
TYPES OF EDITS
Add mapping Remove mapping Change mapping’s transformation Translate mapping inside editor Add connection between mapping and other
elements Source element, destination element, another
mapping Remove connection
![Page 11: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/11.jpg)
GOOGLE WAVE
Google Wave
Wave Robot
State Server
DBUser
User
User
![Page 12: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/12.jpg)
EDIT DATA STRUCTURE
ID Author Type Other attributes depending on the type of
edit
![Page 13: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/13.jpg)
EDIT LIFECYCLE
User creates an edit Sends it to State server
Servers merges it into model Receives edit ID
This ID is from increasing number sequence Puts edit into Gadget state Receives new Gadget state
Merges all newer edits into local model Newer merges edit with ID higher than last edit
processed by State server to the local instance of the mapping model
![Page 14: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/14.jpg)
GADGET STATE OVERVIEW
User A
User B
User C State Serverand
Wave Robot
Database
Gadget State
User A edits the mapping1) Sends edit to State Server2) State Server processes the edit
(saves merged state to database) and returns edit ID
3) Edit ID and Edit is submit to Gadget state
4) Gadget state is send to each user and robot
![Page 15: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/15.jpg)
GADGET STATE OVERVIEW II
Size limit defined by Google is 100KiB for gadget state
Therefore mapping state is being held on State server
Inside gadget state are some state attributes and especially set of the edits made by users
When the state’s size would be greater than 100KiB, than Robot clear state and forces users to reload mapping state from the State server
![Page 16: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/16.jpg)
PROTOCOL – DATA STRUCTURES
Model ID Version Last edit ID List of edits
Edit ID Edit content
![Page 17: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/17.jpg)
MERGING
Edits are sorted by their ID Each is processed If there would be any conflicts, the last wins,
or will be ignored All edits show in the edit log
![Page 18: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/18.jpg)
CONFLICTS
User wants edit/remove already removed mapping Edit/remove is being ignored
In other cases the last edit wins
![Page 19: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/19.jpg)
BEFORE EXPORT CHECK
Not all mappings are compatible with each other, so there must be check before the export to XSLT
Also there mustn’t be any cycle
![Page 20: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/20.jpg)
LIMITS OF THE GADGET
In source even in destination XSD mustn’t be any recursive structure. Otherwise the model will limit the depth of the recursion to 1.
![Page 21: XML I NTEGRATOR Google Wave Gadget. P URPOSE Create mapping from one XML schema to another XML schema Support collaborative creation of that mapping Export.](https://reader035.fdocuments.us/reader035/viewer/2022081603/56649f135503460f94c276bb/html5/thumbnails/21.jpg)
EXAMPLE XSLT