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

ID | Project | Category | View Status | Date Submitted | Last Update
0007239 | Part 09: Using XML with TTCN-3 | New Feature | public | 08-12-2015 11:26 | 13-12-2016 17:25

Reporter | Gyorgy Rethy |
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.8.1 (published 2017-05) | Fixed in Version | v4.8.1 (published 2017-05) |
Clause Reference(s) | 8.1.1
For STF discussion |
Source (company - Author) | L.M.Ericsson

Summary | 0007239: Change element substitution generation rules to support backward compatibility

Description

Currently rules in clause 8.1.1 specify that for the head element of a substitution group ONLY a union type is generated. This causes backward compatibility problem, when a new version of an XSD specification introduces substitution.
I show this on example 1 from the standard;
----------------------------------------
let say version one defines the "head" element only, without substitution:
<xsd:element name="head" type="xsd:string" />
For this element e.g. the TTCN-3 code will be generated:
module http_www_example_org {
...
type XSD.String Head
with {
variant "name as uncapitalized";
variant "element";
};
} with {...}
And the user writes its own code and testing its SUT using it, e.g.:
module use {
import from http_www_example_org all;
template Head t_message := "mytext"
}
-----------------------------------------------------
Now, the XSD specification changes to a new version, adding substitution elements, and according to the current rules, in TTCN-3 ONLY the Head_group type will be generated for the "head" element:
module http_www_example_org {
...
type union Head_group {
XSD.String head,
..Member1 member1,
..Member2 member2,
Member3 member3
}
with {
variant "untagged";
variant(head) "element";
}
} with {...}
So, in this case the generated module will not contain a type named Head and the above module use.ttcn will not compile.
-----------------------------------------------------
Users do not want to change TTCN-3 code used for regression testing of SUT code that didn't change. This is a wasted time for them. Users wants that modules written for version 1 of the specification is also working with the type modules generated for version 2 (used to test other products and/or new features).
This could be achieved by a small backward compatible change in Part-9:
- for the version 2 XSD document containing substitution, instead of generating the Head_group type for the head element only, generate its own TTCN-3 type for the head element and the Head_group type in addition:
module http_www_example_org {
...
type XSD.String Head
with {
variant "name as uncapitalized";
variant "element";
};
type union Head_group {
Head head,
..Member1 member1,
..Member2 member2,
Member3 member3
}
with {variant "untagged"}
} with {...}
So now, the "old" TTCN-3 mdule use.ttcn, importing the new http_www_example_org module will compile.
This will not solve the backward compatibility for all uses of the head element, but is backward compatible from the XSD to TTCN mapping point of view and also makes the generated code more readable.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.

Relationships

related to | 0007421 | closed | Gyorgy Rethy | How to achieve full backward compatibility in case of element- and/or type-substitution
related to | 0007240 | closed | Gyorgy Rethy | Error in example 1 of clause 8.1.1

Attached Files |

Issue History
Date Modified | Username | Field | Change
08-12-2015 11:26 | Gyorgy Rethy | New Issue |
08-12-2015 11:32 | Gyorgy Rethy | Relationship added | related to 0007240
08-12-2015 11:42 | Gyorgy Rethy | Assigned To | => Jacob Wieland - Spirent
08-12-2015 11:42 | Gyorgy Rethy | Status | new => assigned
08-12-2015 11:42 | Gyorgy Rethy | Product Version | => v4.6.1 (published 2015-06)
08-12-2015 11:42 | Gyorgy Rethy | Target Version | => v4.7.1 (published 2016-07)
08-12-2015 11:42 | Gyorgy Rethy | Description Updated | bug_revision_view_page.php?rev_id=225#r225
09-12-2015 14:09 | Gyorgy Rethy | Description Updated | bug_revision_view_page.php?rev_id=226#r226
09-12-2015 16:11 | Jacob Wieland - Spirent | Note Added: 0013574 |
09-12-2015 16:11 | Jacob Wieland - Spirent | Status | assigned => resolved
09-12-2015 16:11 | Jacob Wieland - Spirent | Fixed in Version | => v4.7.1 (published 2016-07)
09-12-2015 16:11 | Jacob Wieland - Spirent | Resolution | open => fixed
09-12-2015 16:11 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
11-12-2015 11:15 | Gyorgy Rethy | Note Added: 0013585 |
11-12-2015 11:15 | Gyorgy Rethy | Status | resolved => feedback
11-12-2015 11:15 | Gyorgy Rethy | Resolution | fixed => reopened
11-12-2015 11:17 | Gyorgy Rethy | Note Edited: 0013585 | bug_revision_view_page.php?bugnote_id=13585#r228
11-12-2015 11:17 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jacob Wieland - Spirent
11-12-2015 11:17 | Gyorgy Rethy | Status | feedback => assigned
14-12-2015 12:39 | Jacob Wieland - Spirent | Note Added: 0013615 |
21-12-2015 08:16 | Gyorgy Rethy | Fixed in Version | v4.7.1 (published 2016-07) =>
21-12-2015 08:16 | Gyorgy Rethy | Target Version | v4.7.1 (published 2016-07) => v4.8.1 (published 2017-05)
24-06-2016 10:39 | Jacob Wieland - Spirent | Note Added: 0013968 |
19-08-2016 13:26 | Jacob Wieland - Spirent | Relationship added | related to 0007421
19-08-2016 13:27 | Jacob Wieland - Spirent | Note Added: 0014179 |
19-08-2016 13:27 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => KristÃ³f Szabados
19-08-2016 13:27 | Jacob Wieland - Spirent | Status | assigned => confirmed
17-11-2016 10:18 | KristÃ³f Szabados | Note Added: 0014295 |
17-11-2016 10:18 | KristÃ³f Szabados | Status | confirmed => resolved
17-11-2016 10:18 | KristÃ³f Szabados | Fixed in Version | => v4.9.1 (published 2018-05)
17-11-2016 10:18 | KristÃ³f Szabados | Resolution | reopened => fixed
17-11-2016 14:13 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Gyorgy Rethy
17-11-2016 14:13 | KristÃ³f Szabados | Status | resolved => assigned
17-11-2016 14:18 | KristÃ³f Szabados | Status | assigned => resolved
17-11-2016 14:18 | KristÃ³f Szabados | Fixed in Version | v4.9.1 (published 2018-05) => v4.8.1 (published 2017-05)
13-12-2016 17:25 | Gyorgy Rethy | Note Added: 0014430 |
13-12-2016 17:25 | Gyorgy Rethy | Status | resolved => closed

Notes

(0013574)
Jacob Wieland - Spirent
09-12-2015 16:11

resolved in CR 7194

(0013585)
Gyorgy Rethy
11-12-2015 11:15 (edited on: 11-12-2015 11:17)

Actually, CR 7194 deals with the type substitution part only ($8.2). This CR proposes a backward compatible change to element substitution mapping ($8.1).

(0013615)
Jacob Wieland - Spirent
14-12-2015 12:39

Then I propose to shift it to the next year.

(0013968)
Jacob Wieland - Spirent
24-06-2016 10:39

This problem would be solved also by the implicit-boxing/unboxing-union feature. The unions generated for the substitution case sould be such special wrapper-unions and thus, templates written in a context without substitution should also work if substitution is enabled.

(0014179)
Jacob Wieland - Spirent
19-08-2016 13:27

solved by the proposal for CR 7421 and 7493

(0014295)
KristÃ³f Szabados
17-11-2016 10:18

Solved by the proposal for CR 7421 (which also builds on 7493)

(0014430)
Gyorgy Rethy
13-12-2016 17:25

See resolution in CR 7421