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
Implementation
Demo
Discussion
www.sti-innsbruck.at 2/19
Introduction
Mapping
A relation between the elements of Feratel XML and the
classes of Schema.org including their properties
Objectives:
To annotate the Feratel XML with Schema.org such that
users of Feratel could benefit from the annotated data
1. Major search engines (Google, Yahoo!, Bing, Yandex) could
interpret the annotated web pages properly
2. Increasing the visibility of web pages on those search
engines
www.sti-innsbruck.at 3/19
Introduction
The mapping steps:
1. For each element in Feratel XML
Find the most suitable class in Schema.org
If not available then find the most suitable property for the
parent elements in Schema.org
2. For each attribute of element in Feratel XML
Find the most suitable property for the element or parent
elements in Schema.org
www.sti-innsbruck.at 4/19
Mapping - Example
XML element Event to http://schema.org/Event, Translation
to property name
XML element Position to http://schema.org/GeoCoordinates,
attribute Latitude and Longitude to properties latitude and
longitude respectively
www.sti-innsbruck.at 5/19
Events
Property geo is used by type Place only
A property for the relation between PostalAddress and
Organization is required
www.sti-innsbruck.at 6/19
Shop Items
Shop Items include brochures, articles and guides
No class for Guide or Brochure
A 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 and
products
www.sti-innsbruck.at 9/19
(Accomodation) Service Providers
www.sti-innsbruck.at 10/19
Implementation
Client sends request [1]
Dispatcher forwards the request
to the Feratel API endpoint [2]
The received response [3] then
forwarded to the Annotator [4]
to be annotated
The annotated response [5] then
returned 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.asmx
Operations: 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 not
be mapped to Schema.org classes or properties
2. A request for Service Providers to Feratel API can not be
performed with one invocation due to the large amount of
data. A “request workflow” is required and this feature is
not reflected in the current XSLT yet.
www.sti-innsbruck.at 18/19
Thank You
www.sti-innsbruck.at 19/19

Feratel mapping

  • 1.
    Feratel - Schema.orgMapping Zaenal Akbar October 15, 2014 Copyright 2014 STI INNSBRUCK www.sti-innsbruck.at
  • 2.
    Outline Introduction Mapping Feratel XMLto Schema.org Implementation Demo Discussion www.sti-innsbruck.at 2/19
  • 3.
    Introduction Mapping A relation betweenthe elements of Feratel XML and the classes of Schema.org including their properties Objectives: To annotate the Feratel XML with Schema.org such that users of Feratel could benefit from the annotated data 1. Major search engines (Google, Yahoo!, Bing, Yandex) could interpret the annotated web pages properly 2. Increasing the visibility of web pages on those search engines www.sti-innsbruck.at 3/19
  • 4.
    Introduction The mapping steps: 1.For each element in Feratel XML Find the most suitable class in Schema.org If not available then find the most suitable property for the parent elements in Schema.org 2. For each attribute of element in Feratel XML Find the most suitable property for the element or parent elements in Schema.org www.sti-innsbruck.at 4/19
  • 5.
    Mapping - Example XMLelement Event to http://schema.org/Event, Translation to property name XML element Position to http://schema.org/GeoCoordinates, attribute Latitude and Longitude to properties latitude and longitude respectively www.sti-innsbruck.at 5/19
  • 6.
    Events Property geo isused by type Place only A property for the relation between PostalAddress and Organization is required www.sti-innsbruck.at 6/19
  • 7.
    Shop Items Shop Itemsinclude brochures, articles and guides No class for Guide or Brochure A class for CopyrightHolder is required www.sti-innsbruck.at 7/19
  • 8.
    Infrastructure Infrastructure item hasvarious topics, e.g. Bar for Food & Beverages www.sti-innsbruck.at 8/19
  • 9.
    Destination Packages Destination packageis a bundle of different services and products www.sti-innsbruck.at 9/19
  • 10.
  • 11.
    Implementation Client sends request[1] Dispatcher forwards the request to the Feratel API endpoint [2] The received response [3] then forwarded to the Annotator [4] to be annotated The annotated response [5] then returned to the Client [6] www.sti-innsbruck.at 11/19
  • 12.
    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.asmx Operations: DoSearch, GetCancellationInformation, GetPaymentInformation, SetClientIP 4. Shopping Cart Manipulation 5. Guest Address Manipulation 6. Saving Requests www.sti-innsbruck.at 12/19
  • 13.
    HTTP GET Request: GET /DSI/BasicData.asmx/GetData?xmlString=stringHTTP/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
  • 14.
    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
  • 15.
    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
  • 16.
    Annotator - XSLTransformation <?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
  • 17.
  • 18.
    Discussion 1. Several elementsand attributes from Feratel XML can not be mapped to Schema.org classes or properties 2. A request for Service Providers to Feratel API can not be performed with one invocation due to the large amount of data. A “request workflow” is required and this feature is not reflected in the current XSLT yet. www.sti-innsbruck.at 18/19
  • 19.