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

ID | Project | Category | View Status | Date Submitted | Last Update
0007562 | Part 09: Using XML with TTCN-3 | Clarification | public | 08-12-2016 15:42 | 05-01-2018 11:55

Reporter | Hellen Griffiths |
Assigned To | Gyorgy Rethy |
Priority | high | Severity | major | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.8.1 (published 2017-05) |
Target Version | v4.9.1 (published 2018-05) | Fixed in Version | v4.9.1 (published 2018-05) |
Clause Reference(s) | 5.2.2, 7.1.4
For STF discussion |
Source (company - Author) | ETSI MCC TF160

Summary | 0007562: Clarification of order of XML to TTCN3 type conversion

Description

The attached file includes the type definition 'UsageInformationReport-Info'. This complex type includes the field 'group'. When this file is translated into TTCN3, some tools convert this to 'group_list', whilst others convert this to 'group__list'. This means that MCC TF160 cannot refer to this field without causing an error in at least one tool that we support.
The order different sections must be run when converting XML types is not clear in the TTCN3 standard. It must be clarified e.g. that clause 5.2.2 should be run last.

Steps To Reproduce

-Start with the XML field name 'group'.
Clause 5.2.2 clearly states that the naming rules must be followed in order. Rule d) specifies that a sequence of two or more low line characters must be replaced with a single low line characters.
- Still have field name 'group'.
Rule l) specifies if a name is the same as a TTCN3 keyword, a single low line character must be appended.
- Now have 'group_'
Finally, clause 7.1.4 specifies the postfix '_list' must be added for maxOccurs>1.
- Result is 'group__list'

Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | 24334_ProSePC3ch.xsd (9,779) 08-12-2016 15:42 http://oldforge.etsi.org/mantis/file_download.php?file_id=3575&type=bug CR_7562.docx (543,068) 08-06-2017 14:17 http://oldforge.etsi.org/mantis/file_download.php?file_id=3607&type=bug CR_7562_v2.docx (168,176) 09-06-2017 16:00 http://oldforge.etsi.org/mantis/file_download.php?file_id=3639&type=bug

Issue History
Date Modified | Username | Field | Change
08-12-2016 15:42 | Hellen Griffiths | New Issue |
08-12-2016 15:42 | Hellen Griffiths | File Added: 24334_ProSePC3ch.xsd |
07-04-2017 06:43 | travm1 | Note Added: 0014551 |
17-04-2017 14:33 | szabados | Note Added: 0014561 |
06-06-2017 14:13 | Jens Grabowski | Project | TTCN-3 Change Requests => Part 09: Using XML with TTCN-3
06-06-2017 14:17 | Jens Grabowski | Note Added: 0014630 |
06-06-2017 14:20 | Jens Grabowski | Note Edited: 0014630 | bug_revision_view_page.php?bugnote_id=14630#r417
06-06-2017 14:20 | Jens Grabowski | Assigned To | => KristÃ³f Szabados
06-06-2017 14:20 | Jens Grabowski | Status | new => assigned
08-06-2017 14:17 | KristÃ³f Szabados | File Added: CR_7562.docx |
09-06-2017 15:48 | KristÃ³f Szabados | Note Added: 0014704 |
09-06-2017 15:48 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
09-06-2017 15:48 | KristÃ³f Szabados | Status | assigned => confirmed
09-06-2017 16:00 | KristÃ³f Szabados | File Added: CR_7562_v2.docx |
09-06-2017 16:01 | KristÃ³f Szabados | Note Added: 0014705 |
24-07-2017 15:02 | Jacob Wieland - Spirent | Status | confirmed => resolved
24-07-2017 15:02 | Jacob Wieland - Spirent | Fixed in Version | => v4.8.1 (published 2017-05)
24-07-2017 15:02 | Jacob Wieland - Spirent | Resolution | open => fixed
24-07-2017 15:02 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
05-01-2018 11:55 | Gyorgy Rethy | Note Added: 0015016 |
05-01-2018 11:55 | Gyorgy Rethy | Status | resolved => closed
05-01-2018 11:55 | Gyorgy Rethy | Product Version | => v4.8.1 (published 2017-05)
05-01-2018 11:55 | Gyorgy Rethy | Fixed in Version | v4.8.1 (published 2017-05) => v4.9.1 (published 2018-05)
05-01-2018 11:55 | Gyorgy Rethy | Target Version | => v4.9.1 (published 2018-05)

Notes

(0014551)
travm1
07-04-2017 06:43

The wiki page for TTCN-3 is a good primer on this topic https://www.everipedia.com/TTCN-3/ [^]

(0014561)
szabados
17-04-2017 14:33

My understanding was the other way around: first the name to be mapped to should be calculated ... and if it is needed, correct it make sure a valid TTCN-3 name will be generated into the TTCN-3 files which also does not clash with anything else.
Section 7.1.4 example 5 shows this:
- "start" is first mapped to "start_list"
- and as there would already be something with that name it is postfixed by "_1"
(using the rules of 5.2.2)
It also does not make too much sense to first make sure that the name can be generated into TTCN-3 ... than change it without actually using it ... and use this changed name without making sure that this changed name can be safely used in the generated TTCN-3 code.
Using the example:
- according to 5.2.2 converting "group" to "group_" would serve to make sure the tools do not generate a TTCN-3 keyword as an identifier.
... but as the example shows there is no intention to actually generate "group" into the TTCN-3 file (only the postfixed version), so there is no need for the protection in the first place.
- at the same time as 7.1.4 example 5 shows the name postfixed with "_list" can very well clash with an other name ... so these checks/conversions need to be done after adding the "_list" postfix.

(0014630)
Jens Grabowski
06-06-2017 14:17 (edited on: 06-06-2017 14:20)

STF discussion: clarification needed, contact Helen for proofreading.

(0014704)
KristÃ³f Szabados
09-06-2017 15:48

I received feedback from Hellen " Hi Kristof, Thank you, this looks clear to me. Thanks and Regards, Hellen " Please check that the current description is clearer for you too.

(0014705)
KristÃ³f Szabados
09-06-2017 16:01

I corrected a typo and reduced the file size

(0015016)
Gyorgy Rethy
05-01-2018 11:55

Implemented in draft V4.8.3.