Upload
stiinnsbruck
View
16
Download
0
Tags:
Embed Size (px)
Citation preview
Feratel - Schema.org Mapping
Zaenal Akbar
October 15, 2014
Copyright 2014 STI INNSBRUCK www.sti-innsbruck.at
Outline
Introduction
Mapping Feratel XML to Schema.org
ImplementationDemo
Discussion
www.sti-innsbruck.at 2/19
Introduction
Mapping
A relation between the elements of Feratel XML and theclasses of Schema.org including their properties
Objectives:To annotate the Feratel XML with Schema.org such thatusers of Feratel could benefit from the annotated data
1. Major search engines (Google, Yahoo!, Bing, Yandex) couldinterpret the annotated web pages properly
2. Increasing the visibility of web pages on those searchengines
www.sti-innsbruck.at 3/19
Introduction
The mapping steps:
1. For each element in Feratel XMLFind the most suitable class in Schema.orgIf not available then find the most suitable property for theparent elements in Schema.org
2. For each attribute of element in Feratel XMLFind the most suitable property for the element or parentelements in Schema.org
www.sti-innsbruck.at 4/19
Mapping - Example
XML element Event to http://schema.org/Event, Translationto property name
XML element Position to http://schema.org/GeoCoordinates,attribute Latitude and Longitude to properties latitude andlongitude respectively
www.sti-innsbruck.at 5/19
Events
Property geo is used by type Place onlyA property for the relation between PostalAddress andOrganization is required
www.sti-innsbruck.at 6/19
Shop Items
Shop Items include brochures, articles and guidesNo class for Guide or BrochureA class for CopyrightHolder is required
www.sti-innsbruck.at 7/19
Infrastructure
Infrastructure item has various topics, e.g. Bar for Food &Beverages
www.sti-innsbruck.at 8/19
Destination Packages
Destination package is a bundle of different services andproducts
www.sti-innsbruck.at 9/19
(Accomodation) Service Providers
www.sti-innsbruck.at 10/19
Implementation
Client sends request [1]
Dispatcher forwards the requestto the Feratel API endpoint [2]
The received response [3] thenforwarded to the Annotator [4]to be annotated
The annotated response [5] thenreturned to the Client [6]
www.sti-innsbruck.at 11/19
Feratel API - Target URLs
1. Key Values:http://interface.deskline.net/DSI/KeyValue.asmx
Operations: GetKeyValues, SetClientIP
2. Basic Data:http://interface.deskline.net/DSI/BasicData.asmx
Operations: GetAvailability, GetData, SetClientIP
3. Search: http://interface.deskline.net/DSI/Search.asmxOperations: DoSearch, GetCancellationInformation,GetPaymentInformation, SetClientIP
4. Shopping Cart Manipulation
5. Guest Address Manipulation
6. Saving Requests
www.sti-innsbruck.at 12/19
HTTP GET
Request:
GET /DSI/BasicData.asmx/GetData?xmlString=string HTTP/1.1
Host: interface.deskline.net
Response:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://tempuri.org/">string</string>
www.sti-innsbruck.at 13/19
Feratel API - Request
<?xml version="1.0" encoding="utf-8"?>
<FeratelDsiRQ
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://interface.deskline.net/DSI/XSD">
<Request Originator="FERATEL" Company="FERATEL">
<Range Code="RG">
<Item Id="AAAAAAAA-BBBB-CCCC-DDDD-FFFFFFFFFFFF" />
</Range>
<EventSearch From="2014-10-01" To="2014-10-02" />
</Request>
</FeratelDsiRQ>
www.sti-innsbruck.at 14/19
Feratel API - Response
<?xml version="1.0"?>
<FeratelDsiRS
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Status="0" Message="OK"
xmlns="http://interface.deskline.net/DSI/XSD">
<Result Index="1">
<Events>
<Event Id="..." ChangeDate="2010-05-21T16:41:00">
<Details>...</Details>
</Event>
</Events>
</Result>
</FeratelDsiRS>
www.sti-innsbruck.at 15/19
Annotator - XSL Transformation
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:idn="http://interface.deskline.net/DSI/XSD"
xmlns:schema="http://schema.org/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="idn:Event">
<Event itemscope="" itemtype="http://schema.org/Event">
<xsl:apply-templates select="node()|@*"/>
</Event>
</xsl:template>
<xsl:template match="idn:Descriptions/idn:Description">
<Description itemprop="description">
<xsl:copy-of select="node()|@*"/>
</Description>
</xsl:template>
www.sti-innsbruck.at 16/19
Demo
www.sti-innsbruck.at 17/19
Discussion
1. Several elements and attributes from Feratel XML can notbe mapped to Schema.org classes or properties
2. A request for Service Providers to Feratel API can not beperformed with one invocation due to the large amount ofdata. A “request workflow” is required and this feature isnot reflected in the current XSLT yet.
www.sti-innsbruck.at 18/19
Thank You
www.sti-innsbruck.at 19/19