1 / 14

XMLSchema to TTCN-3 Mapping

XMLSchema to TTCN-3 Mapping. Importing XML schema based data types into TTCN-3. Importing XMLSchema based Datatypes into TTCN-3. Overview XMLSchema built-in datatypes XMLSchema data type components Examples. Plain Text. ASN.1 Types and Values. Tabular Format. IDL Interfaces and Types.

abbyp
Download Presentation

XMLSchema 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. XMLSchema to TTCN-3 Mapping Importing XML schema based data types into TTCN-3

  2. Importing XMLSchema based Datatypes into TTCN-3 • Overview • XMLSchema built-in datatypes • XMLSchema data type components • Examples

  3. Plain Text ASN.1 Types and Values Tabular Format IDL Interfaces and Types Graphical Format XMLSchema Types TTCN-3 User Other Presentation Formats Other Types & Values Overview TTCN-3 core notation

  4. XMLSchema BuiltIn Types I anyType primitive types all complex types anySimpleType duration dateTime time date gYearMonth gYear gMonthDay gDay gMonth hexstring boolean base64Binary hexBinary float double anyURI QName NOTATION charstring float string decimal type set of NMToken NMTokens normalizedString integer derived by restrictions nonPositiveInteger token nonNegativeInteger long NMToken language Name positiveInteger negativeInteger unsignedLong int unsignedInt NMTokens short NCName derived by lists IDREF Entity ID unsignedShort byte type integer positiveInteger (0 .. infinity) IDREFS Entities unsignedByte

  5. XMLSchema Build-in Types II • XSDAUX.ttcn3 moduleXSDAUX { /* 1.string */ typecharstring string; /* 2.boolean */ typeinteger bitXSD(1,0); typeunion booleanXSD { bitXSD bit, boolean bool } /* 3.decimal */ typefloat decimal; ..... }

  6. XMLSchema datatype components schema record, union or set set element import complexType simpleType attribute attributeGroup group union all sequence include record restriction attributeGroup facets choice union choice sequence union minInclusive, maxExclusive pattern, enumeration, length ... attribute all group set of … list attribute attributeGroup Subtype definition with length, or list restrictions. Ex: Type_string.ttcn3 extension simpleContent sequence group attribute all choice attributeGroup restriction simpleType facets attribute attributeGroup complexContent restriction minInclusive, maxExclusive pattern, enumeration, length ... extension

  7. Example XMLSchema TTCN-3 <xs:groupname="cust"> <xs:choice> <xs:element name=„e1" type="xs:string"/> <xs:element name=„e2" type="xs:string"/> <xs:element name=„e3" type="xs:string"/> <xs:element name=„e4" type="xs:string"/> </xs:choice> </xs:group> <xs:complexType name=„ORDER"> <xs:choice> <xs:sequence> <xs:group ref="cust" /> <xs:element name="E" type="xs:byte"/> </xs:sequence> <xs:element name=„E" type="xs:int"/> </xs:choice> <xs:attribute name=„A" type="xs:string"/> </xs:complexType> typeunion cust__Global_Group { XSDAUX.string e1, XSDAUX.string e2, XSDAUX.string e3, XSDAUX.string e4 } typerecordSEQUENCE__1 { cust__Global_Group sequence__1, XSDAUX.byte E } typeunionCHOICE__2 { SEQUENCE__1 choice__1, XSDAUX.int E } typecharstring A__Attribute__1 with{extension "Attribute"}; typesetORDER { CHOICE__2 choice, A__Attribute__1 A optional }

  8. The Work Done • Initial work by FOKUS in internal research and diploma thesis, 2002-2004 • Discussion of mapping in the TTmedal consortium, 2003-now • Implementation and case studies • Draft prepared, March 2005 • Face-to-face meeting, March 2005

  9. 1Scope 2References 3Abbreviations 4Approach 5Mapping XSD Schemas 6Ignored schema components and properties 7TTCN-3 module and namespaces 8Name conversion 9Mapping of built-in data types 10 Mapping of data type components Annex A (normative): Mapping of Built-In Types Annex B (normative): XSDAUX.ttcn3 Annex C (informative): References Annex D (informative): Examples The Document

  10. Contributors/Reviewers • FOKUS • NetHawk • Nokia • Fraunhofer ESK • University of Göttingen

  11. XML Meeting • Review of the draft • Discussion • what to do with non supported features • support for XML values

  12. One issue for all mapping documents • Name clashes with TTCN-3 keywords • Consistent resolving rules for all mappings would be helpful • Proposal to use a „_“ postfix together with an extension attribute indicating the original namei.e. type boolean boolean_ with { extension "XSD:boolean" }

  13. Further TTCN-3 extensions?! • Pattern for float and integer • Length for integer (number of decimal digits) • Different lengths for float (number of fractional digits, etc.) ? • min and max facets of XML directly added to TTCN-3 for string types, integer and float ? • whitspace facets for string types ? • a more generic approach to „subtyping“ with facets could be useful

  14. Timing • Completion till Oct. 2005 • Adoption for ETSI MTS #41

More Related