Logo etsi

ETSI's Bug Tracker

Notice: information submitted on the ETSI issue Tracker may be incorporated in ETSI publication(s) and therefore subject to the ETSI IPR policy.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007210Part 09: Using XML with TTCN-3Technicalpublic29-10-2015 11:0904-12-2015 15:46
ReporterGyorgy Rethy 
Assigned ToGyorgy Rethy 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Versionv4.6.1 (published 2015-06) 
Target Versionv4.7.1 (published 2016-07)Fixed in Versionv4.7.1 (published 2016-07) 
Summary0007210: How to decode an empty element when an optional sequence includes optional elements only
DescriptionThe XSD element below :
<xsd:element name="optionals_in_optional">
  <xsd:complexType>
    <xsd:sequence minOccurs="0">
      <xsd:element name="elem1" type="xsd:string" minOccurs="0"/>
      <xsd:element name="elem2" type="xsd:integer" minOccurs="0"/>
      <xsd:element name="elem3" type="xsd:decimal" minOccurs="0"/>
      <xsd:element name="elem4" type="xsd:dateTime" minOccurs="0"/>
      <xsd:element name="elem5" type="xsd:duration" minOccurs="0"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>


will be translated to TTCN-3 as:
type record Optionals_in_optional
{
    record {
        XSD.String elem1 optional,
        XSD.Integer elem2 optional,
        XSD.Decimal elem3 optional,
        XSD.DateTime elem4 optional,
        XSD.Duration elem5 optional
    } sequence optional
}
with {
variant "name as uncapitalized";
variant "element";
variant (sequence) "untagged";
};

where the 'sequence' name of the record shall not be present in the encoded XML value.

This is not the problem at encoding, both
template Optionals_in_optional t_optionals1 := { sequence := omit }
and
template Optionals_in_optional t_optionals2 := {
  sequence := {
    elem1 := omit,
    elem2 := omit,
    elem3 := omit,
    elem4 := omit,
    elem5 := omit
  }
}

will be encoded as an empty <optionals_in_optional></optionals_in_optional> element.

However, it is NOT SPECIFIED, how the above incoming element shall be decoded into TTCN-3. Therefore the user needs to define a template list containing both templates above to be sure that the incoming empty element will match. This is cumbersome and superflouos.

Proposed solution: it is proposed to specify that this specific case shall be decoded to the value { sequence := omit }; this is the shortest and thus more user friendly solution.
Note: it could cause backward incompatibility if code is written to tool-specific decoding, and causes no backward compatibility for code written to ba standard-compliant.
TagsNo tags attached.
Clause Reference(s)7.6.6.6 and B.3.21
For STF discussion
Source (company - Author)L.M.Ericsson
Attached Filesdocx file icon CR7210_resolution_v1.docx [^] (63,553 bytes) 29-10-2015 11:54
docx file icon CR7210_resolution_v2.docx [^] (65,389 bytes) 04-11-2015 11:11

- Relationships

-  Notes
(0013481)
Gyorgy Rethy (reporter)
03-11-2015 16:50

STF discussion: agreed in pronciple. Review proposed solution.
(0013484)
Axel Rennoch (developer)
04-11-2015 11:13

Just some minor formatting issues solved in resolution_v2.
(0013560)
Gyorgy Rethy (reporter)
04-12-2015 15:46

Added to draft V4.6.3

- Issue History
Date Modified Username Field Change
29-10-2015 11:09 Gyorgy Rethy New Issue
29-10-2015 11:37 Gyorgy Rethy Description Updated View Revisions
29-10-2015 11:45 Gyorgy Rethy Description Updated View Revisions
29-10-2015 11:54 Gyorgy Rethy File Added: CR7210_resolution_v1.docx
29-10-2015 11:55 Gyorgy Rethy Description Updated View Revisions
03-11-2015 16:49 Gyorgy Rethy Assigned To => Axel Rennoch
03-11-2015 16:49 Gyorgy Rethy Status new => assigned
03-11-2015 16:50 Gyorgy Rethy Note Added: 0013481
04-11-2015 11:11 Axel Rennoch File Added: CR7210_resolution_v2.docx
04-11-2015 11:13 Axel Rennoch Note Added: 0013484
04-11-2015 11:13 Axel Rennoch Assigned To Axel Rennoch => Gyorgy Rethy
04-11-2015 11:13 Axel Rennoch Status assigned => confirmed
04-11-2015 13:56 Gyorgy Rethy Status confirmed => resolved
04-11-2015 13:56 Gyorgy Rethy Fixed in Version => v4.7.1 (published 2016-07)
04-11-2015 13:56 Gyorgy Rethy Resolution open => fixed
04-11-2015 14:05 Gyorgy Rethy Product Version => v4.6.1 (published 2015-06)
04-11-2015 14:05 Gyorgy Rethy Target Version => v4.7.1 (published 2016-07)
04-12-2015 15:46 Gyorgy Rethy Note Added: 0013560
04-12-2015 15:46 Gyorgy Rethy Status resolved => closed


MantisBT 1.2.14 [^]
Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker