1 / 13

The XML to TTCN-3 Mapping

The XML to TTCN-3 Mapping Contact: Ina Schieferdecker, schieferdecker@fokus.fraunhofer.de , +49 30 3463 7241. Mapping XML to TTCN-3. Map element tags and attributes to TTCN-3 fields and types Different mappings Embedded approach Flat-Catalog approach Named Type approach.

omar-scott
Download Presentation

The XML to TTCN-3 Mapping

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The XML to TTCN-3 Mapping Contact: Ina Schieferdecker, schieferdecker@fokus.fraunhofer.de, +49 30 3463 7241

  2. Mapping XML to TTCN-3 • Map element tags and attributes to TTCN-3 fields and types • Different mappings • Embedded approach • Flat-Catalog approach • Named Type approach

  3. Mapping Schemas in Embedded Approach <schema>     <element name="weather">        <complexType>           <sequence>              <element name="location">                   <complexType >                   <sequence>                       <simpleType name="city">                          <restriction base="string">                             <pattern value="[a-zA-Z]"/>                          </restriction>                       </simpleType>                        <element name="country" type="string"/>                    </sequence>                  </complexType>              </element>              <element name="temperature" type="integer"/>              <element name="barometric_pressure" type="integer"/>              <element name="conditions" type="string"/>            </sequence>        </complexType>     </element> </schema> XML Schema typerecordweatherType { locationTypelocation, integertemperature, integerbarometric_pressure, charstringconditions } typerecordlocationType { charstringcity ("a".."z","A".."Z"), charstringcountry } TTCN-3 Types

  4. Mapping Schemas in Flat Catalog Approach <schema> <element name="temperature" type="integer"/> <element name="barometric_pressure" type="integer"/> <element name="conditions" type="string"/> <element name="country" type="string"/> <simpleType name="city"> <restriction base="string"> <pattern value="[a-zA-Z]"/> </restriction> </simpleType> <element name="location"> <complexType > <sequence> <element ref="city"/> <element ref="country"/> </sequence> </complexType> </element> <element name="weather"> <complexType> <sequence> <element ref="location"/> <element ref="temperature"/> <element ref="barometric_pressure"/> <element ref="conditions"/> </sequence> </complexType> </element> </schema> XML Schema TTCN-3 Types typeintegertemperatureType; typeintegerbarometric_pressureType; typecharstringconditionsType; typecharstringcountryType; typecharstringcityType ("a".."z","A".."Z"); typerecordlocationType { cityTypecity, countryTypecountry } typerecordweatherType { locationTypelocation, temperatureTypetemperature, barometric_pressureTypebarometric_pressure, conditionsTypeconditions }

  5. Mapping Schemas in Named Type Approach <schema> <complexType name="weatherType" > <sequence> <element name="location" type="locationType"/> <element name="temperature" type="integer"/> <element name="barometric_pressure" type="integer"/> <element name="conditions" type="string"/> </sequence> </complexType> <complexType name="locationType" > <sequence> <element name="city" type="cityType"/> <element name="country" type="string"/> </sequence> </complexType> <simpleType name="cityType"> <restriction base="string"> <pattern value="[a-zA-Z]"/> </restriction> </simpleType> <element name="weather" type="weatherType"/> </schema> XML Schema TTCN-3 Types typerecord weatherType { locationType location, integer temperature, integer barometric_pressure, charstring conditions } typerecord locationType { cityType city, countryType country } typecharstring cityType ("a".."z","A".."Z");

  6. Principle Mapping

  7. The Principle XML DTD XML Schema XML Schema Implicit/explicit mapping In analogy to TTCN-3 ASN.1

  8. Overview

  9. Overview

  10. Built-In Types

  11. Built-In Types

  12. User Defined Types

  13. Project progress Proposed change of dates for the WI Milestones: • First Draft: MTS#39 • TB approval: MTS#40

More Related