ETSI's Bug Tracker - Part 09: Using XML with TTCN-3
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0006875 | Part 09: Using XML with TTCN-3 | Editorial | public | 26-01-2015 17:10 | 15-10-2015 16:10

Reporter | Jacob Wieland - Spirent |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.6.1 (published 2015-06) |
Target Version | v4.7.1 (published 2016-07) | Fixed in Version | v4.7.1 (published 2016-07) |
Clause Reference(s) | 7.6.5.4
For STF discussion |
Source (company - Author) | Testing Technologies - Jacob Wieland

Summary | 0006875: sequence nested in sequence is mapped wrong in EXAMPLE 2 in 7.6.5.4

Description

The example 2 in section 7.6.5.4. is inconsistent with the
mapping description of section 7.6.6.4 (sequence with nested sequence)
EXAMPLE 2: Multiple sequence-s nested to choice:
<complexType name="e34b">
<choice>
<sequence>
<sequence>
<element name="foo" type="string"/>
<element name="bar" type="string"/>
</sequence>
<element name="ding" type="string"/>
<element name="foo" type="string"/>
<element name="bar" type="string"/>
</sequence>
<element name="ding" type="string"/>
</choice>
</complexType>
// Is translated to:
type record E34b {
union {
record {
record {
XSD.String foo,
XSD.String bar
} sequence,
XSD.String ding,
XSD.String foo,
XSD.String bar
} sequence,
XSD.String ding
} choice
}
with {
variant "name as uncapitalized ";
variant(choice, choice.sequence, choice.sequence.sequence) "untagged"
}
According to 7.6.6.4, a sequence within a sequence (with minoccurs=maxoccurs=1) shall be flattened to a single record type/field and not mapped to nested record types.
Therefore, the resulting type should be:
type record E34b {
union {
record {
XSD.String foo,
XSD.String bar,
XSD.String ding,
XSD.String foo_1,
XSD.String bar_1
} sequence,
XSD.String ding
} choice
}
with {
variant "name as uncapitalized ";
variant(choice, choice.sequence) "untagged"
}

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
26-01-2015 17:10 | Jacob Wieland - Spirent | New Issue |
26-01-2015 17:10 | Jacob Wieland - Spirent | Status | new => assigned
26-01-2015 17:10 | Jacob Wieland - Spirent | Assigned To | => Gyorgy Rethy
15-10-2015 16:10 | Gyorgy Rethy | Note Added: 0013420 |
15-10-2015 16:10 | Gyorgy Rethy | Status | assigned => closed
15-10-2015 16:10 | Gyorgy Rethy | Resolution | open => fixed
15-10-2015 16:10 | Gyorgy Rethy | Fixed in Version | => v4.7.1 (published 2016-07)

Notes

(0013420)
Gyorgy Rethy
15-10-2015 16:10

Example should have been corrected already, in the current draft it exactly as requested by the CR:
EXAMPLE 2: Multiple sequence-s nested to choice:
<xsd:complexType name="e34b">
<xsd:choice>
<xsd:sequence>
<sequence>
<xsd:element name="foo" type="xsd:string"/>
<xsd:element name="bar" type="xsd:string"/>
</xsd:sequence>
<xsd:element name="ding" type="xsd:string"/>
<xsd:element name="foo" type="xsd:string"/>
<xsd:element name="bar" type="xsd:string"/>
</xsd:sequence>
<xsd:element name="ding" type="xsd:string"/>
</xsd:choice>
</xsd:complexType>
// Is translated to:
type record E34b {
union {
record {
XSD.String foo,
XSD.String bar,
XSD.String ding,
XSD.String foo_,
XSD.String bar_
} sequence,
XSD.String ding
} choice
}
with {
variant "name as uncapitalized ";
variant(foo_) "name as 'foo'";
variant(bar_) "name as 'bar'";
variant(choice, choice.sequence) "untagged";
}