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

ID | Project | Category | View Status | Date Submitted | Last Update
0005338 | Part 09: Using XML with TTCN-3 | Clarification | public | 09-09-2009 12:23 | 01-02-2010 10:58

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 |  |
Target Version | v4.2.1 (published 2010-07) | Fixed in Version | v4.2.1 (published 2010-07) |
Clause Reference(s) | 7.6.3
For STF discussion |
Source (company - Author) | L.M.Ericsson

Summary | 0005338: Referencing group components is ambiguous
Description | The way of handling referenced model group definitions is ambiguous. partly, clauses 7.6.3. and 7.9 are contradicting. It is proposed that clause 7.9 is taken for the basis as it generates more compact code and reusable definitions (e.g. templates can be written for the model groups as well)
Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |

Attached Files

CR5338_resolution_v1.doc (84,480) 09-12-2009 08:53
http://oldforge.etsi.org/mantis/file_download.php?file_id=2298&type=bug
groups.xsd (8,062) 09-12-2009 09:55
http://oldforge.etsi.org/mantis/file_download.php?file_id=2301&type=bug
www_example_org_groups.ttcn (5,065) 09-12-2009 09:58
http://oldforge.etsi.org/mantis/file_download.php?file_id=2302&type=bug
CR5338_resolution_v2.doc (110,592) 17-12-2009 16:18
http://oldforge.etsi.org/mantis/file_download.php?file_id=2321&type=bug

Issue History
Date Modified | Username | Field | Change
09-09-2009 12:23 | Gyorgy Rethy | New Issue |
09-09-2009 12:23 | Gyorgy Rethy | Status | new => assigned
09-09-2009 12:23 | Gyorgy Rethy | Assigned To | => Gyorgy Rethy
09-09-2009 12:23 | Gyorgy Rethy | Clause Reference(s) | => 7.6.3
09-09-2009 12:23 | Gyorgy Rethy | Source (company - Author) | => L.M.Ericsson
07-12-2009 14:42 | Ina Schieferdecker | Target Version | => Edition 4.2.1 (not yet published)
08-12-2009 08:41 | Gyorgy Rethy | Note Added: 0009093 |
08-12-2009 08:41 | Gyorgy Rethy | File Added: CR5338_resolution_v1.doc |
09-12-2009 08:52 | Gyorgy Rethy | Note Edited: 0009093 |
09-12-2009 08:53 | Gyorgy Rethy | File Deleted: CR5338_resolution_v1.doc |
09-12-2009 08:53 | Gyorgy Rethy | File Added: CR5338_resolution_v1.doc |
09-12-2009 08:54 | Gyorgy Rethy | File Added: groups.xsd |
09-12-2009 09:08 | Gyorgy Rethy | Note Edited: 0009093 |
09-12-2009 09:10 | Gyorgy Rethy | Note Edited: 0009093 |
09-12-2009 09:32 | Gyorgy Rethy | Note Edited: 0009093 |
09-12-2009 09:35 | Gyorgy Rethy | File Deleted: groups.xsd |
09-12-2009 09:54 | Gyorgy Rethy | File Added: www_example_org_groups.ttcn |
09-12-2009 09:55 | Gyorgy Rethy | File Added: groups.xsd |
09-12-2009 09:55 | Gyorgy Rethy | File Deleted: www_example_org_groups.ttcn |
09-12-2009 09:58 | Gyorgy Rethy | File Added: www_example_org_groups.ttcn |
17-12-2009 16:18 | Gyorgy Rethy | File Added: CR5338_resolution_v2.doc |
01-02-2010 10:58 | Gyorgy Rethy | Note Added: 0009172 |
01-02-2010 10:58 | Gyorgy Rethy | Status | assigned => closed
01-02-2010 10:58 | Gyorgy Rethy | Resolution | open => fixed
01-02-2010 10:58 | Gyorgy Rethy | Fixed in Version | => Edition 4.2.1 (not yet published)

Notes

(0009093)
Gyorgy Rethy
08-12-2009 08:41 (edited on: 09-12-2009 09:32)

CR5338_resolution_v1.doc: first draft, to be discussed.
When analysing the possible cases, there are 6 situations to be considered:
(a) group reference is child of complexType, minOccurs=maxOccurs=1
(b) group reference is child of complexType, minOccurs= 0, maxOccurs=1
(c) group reference is child of complexType, minOccurs>=0, maxOccurs>1
(d)(e)(f) group reference is child of <sequence> or <choice> and the above 3 combinations of minOccurs and maxOccurs are repeated; in this case the group reference may also be combined with other element declarations.
See examples in file groups.xsd.
There are two options to resolve all cases above:
(1) keep the existing mapping rule (copy the elements of the referenced group) for case (a) and add new rules for cases (b) to (f); in case (d) a new mandatory and in cases (b) and (e) a new optional field shall be created; in cases (c) and (f) a new record of field shall be created; this means that four different rules shall be specified for group references.
(2) unifying the mapping by saying that in all cases a new field has to be created, which type is the type generated for the referenced model groups; in this case only one rule needed, the mapping is simplified (handling of the different combinations o minOccurs and maxOccurs are already specified in clause 7.1.4). But this would also mean a non-backward compatible change in case (a).
The attached first draft CR5338_resolution_v1.doc proposes the second alternative as this is more user friendly (single rule & changing minOccurs from 1 to 0 does not change the structure of the generated TTCN-3 code).

(0009172)
Gyorgy Rethy
01-02-2010 10:58

Implemented as in CR5338_resolution_v2.doc.