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

ID | Project | Category | View Status | Date Submitted | Last Update
0006389 | Part 09: Using XML with TTCN-3 | Technical | public | 21-12-2012 10:55 | 13-12-2016 16:21

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.5.1 (published 2013-04) |
Target Version | v4.8.1 (published 2017-05) | Fixed in Version | v4.8.1 (published 2017-05) |
Clause Reference(s) | Part-9
For STF discussion |
Source (company - Author) | L.M.Ericsson

Summary | 0006389: Variant overwriting rules are not correct

Description

This CR was created to handle the Part-9 part of CR 6233 separately from CR6233 itself.
Clause 27.1.2.1 paragraph one specifies that
â€¢ a variant attribute overwrites an current variant attribute according to the rules defined in clause 27.1.2;
However this rule, if applied, would cause problems for XSD to TTCN-3 mapping, where the encoding instructions applied to a type (e.g. XSD:decimal") and to a field this type (e.g. "name as...") shall apply at the same time. But, of course, several enoding instructions may apply to a given field as well.

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

Relationships

parent of | 0006798 | closed | KristÃ³f Szabados | Part 09: Using XML with TTCN-3 | TTCN-3 Alias_or_Synonym Type Def. of an XSD Type
child of | 0006233 | closed | Ina Schieferdecker | Part 01: TTCN-3 Core Language | Variant overwriting rules are not correct

Attached Files | CR6389.docx (152,606) 24-09-2015 10:33 http://oldforge.etsi.org/mantis/file_download.php?file_id=3277&type=bug CR6389_v2.docx (141,398) 18-11-2016 11:09 http://oldforge.etsi.org/mantis/file_download.php?file_id=3569&type=bug CR6389_v3.docx (141,126) 18-11-2016 12:55 http://oldforge.etsi.org/mantis/file_download.php?file_id=3573&type=bug

Issue History
Date Modified | Username | Field | Change
21-12-2012 10:55 | Gyorgy Rethy | New Issue |
21-12-2012 10:55 | Gyorgy Rethy | Status | new => assigned
21-12-2012 10:55 | Gyorgy Rethy | Assigned To | => Gyorgy Rethy
21-12-2012 10:55 | Gyorgy Rethy | Clause Reference(s) | => Part-9
21-12-2012 10:55 | Gyorgy Rethy | Source (company - Author) | => L.M.Ericsson
21-12-2012 10:55 | Gyorgy Rethy | Issue generated from: 0006233 |
21-12-2012 10:55 | Gyorgy Rethy | Relationship added | child of 0006233
21-12-2012 10:58 | Gyorgy Rethy | Project | Part 01: TTCN-3 Core Language => Part 09: Using XML with TTCN-3
14-05-2013 15:27 | Gyorgy Rethy | Target Version | => Edition 4.1.1 Published 2009-06-02
14-05-2013 15:29 | Gyorgy Rethy | Target Version | Edition 4.1.1 Published 2009-06-02 => v4.6.1 (published 2015-06)
11-07-2013 10:43 | Gyorgy Rethy | Status | assigned => confirmed
11-07-2013 10:43 | Gyorgy Rethy | Status | confirmed => assigned
08-04-2014 17:06 | Gyorgy Rethy | Product Version | => v4.5.1 (published 2013-04)
08-04-2014 17:06 | Gyorgy Rethy | Target Version | v4.6.1 - VOID => v4.6.1 (published 2015-06)
06-10-2014 14:14 | Gyorgy Rethy | Priority | normal => high
04-11-2014 15:25 | Gyorgy Rethy | Relationship added | parent of 0006798
06-11-2014 10:39 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Tomas Urban
06-11-2014 10:40 | Gyorgy Rethy | Target Version | v4.6.1 (published 2015-06) => v4.7.1 (published 2016-07)
06-11-2014 15:04 | Tomas Urban | Note Added: 0012471 |
06-11-2014 15:16 | Tomas Urban | Note Edited: 0012471 | bug_revision_view_page.php?bugnote_id=12471#r100
06-11-2014 15:21 | Tomas Urban | Note Added: 0012476 |
06-11-2014 15:21 | Tomas Urban | Assigned To | Tomas Urban => Gyorgy Rethy
23-09-2015 16:37 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jacob Wieland - Spirent
24-09-2015 10:33 | Jacob Wieland - Spirent | File Added: CR6389.docx |
24-09-2015 10:34 | Jacob Wieland - Spirent | Note Added: 0013284 |
24-09-2015 10:34 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
24-09-2015 10:34 | Jacob Wieland - Spirent | Status | assigned => confirmed
03-11-2015 10:33 | Gyorgy Rethy | Note Added: 0013459 |
03-11-2015 10:33 | Gyorgy Rethy | Status | confirmed => assigned
07-01-2016 08:52 | Gyorgy Rethy | Priority | high => normal
18-07-2016 14:50 | Jens Grabowski | Assigned To | Gyorgy Rethy => KristÃ³f Szabados
04-08-2016 11:52 | KristÃ³f Szabados | Note Added: 0014044 |
17-08-2016 11:42 | Jacob Wieland - Spirent | Target Version | v4.7.1 (published 2016-07) => v4.8.1 (published 2017-05)
18-11-2016 11:09 | KristÃ³f Szabados | File Added: CR6389_v2.docx |
18-11-2016 11:09 | KristÃ³f Szabados | Note Added: 0014334 |
18-11-2016 11:28 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
18-11-2016 11:28 | KristÃ³f Szabados | Note Added: 0014338 |
18-11-2016 12:55 | KristÃ³f Szabados | File Added: CR6389_v3.docx |
18-11-2016 12:59 | KristÃ³f Szabados | Status | assigned => resolved
18-11-2016 12:59 | KristÃ³f Szabados | Fixed in Version | => v4.8.1 (published 2017-05)
18-11-2016 12:59 | KristÃ³f Szabados | Resolution | open => fixed
18-11-2016 12:59 | KristÃ³f Szabados | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
13-12-2016 16:21 | Gyorgy Rethy | Note Added: 0014427 |
13-12-2016 16:21 | Gyorgy Rethy | Status | resolved => closed

Notes

(0012471)
Tomas Urban
06-11-2014 15:04 (edited on: 06-11-2014 15:16)

Proposal: Formalize the rules that are in fact already in use in part 9 by a couple of changes in part 1. New syntax is required for some of the specific rules.
1. Rules for multiple occurences of attributes:
Attributes are represented by a single string on TCI level (with the exception of the extension attribute which is a string array). It is currently not entirely obvious what should happen if there are several attributes of the same kind, but I believe that most tools concatenate them. In order to formalize the rules I propose the following changes:
a. The encode, display and optional attribute can occur at most once
b. The variant and extension attribute occurrence count is not limited
c. If there is more than 1 attribute of the same type, all attributes shall have the same override setting (either override present or missing). E.g. type integer I with { variant "A"; variant(override) "B" } shall produce an error.
d. Change TCI so that it supports string array for variants. The existing variant support shall be kept for backward compatibility reasons. In case of multiple variants, it should contain concatenation of all variant attributes separated by semicolons.
2. Rule for named variants:
It should be possible to create a named variant attribute in the following way:
type integer I with
{
variant["EncodingProperty1"] "EncodingPropertyValue"
variant["EncodingProperty2"] "EncodingPropertyValue"
}
This way we can formalize overwriting of some encoding properties while others are kept intact:
type I I2 with
{
variant["EncodingProperty2"] "NewEncodingPropertyValue"
}
// only the EncodingProperty2 changes, EncodingProperty1 retains its value
It should be possible to disable inherited named variants too:
type I I3 with
{
variant["EncodingProperty2"] -
}
// the EncodingProperty2 disappears, only the EncodingProperty1 remains
In TCI, the named variant attribute is interpretted as VariantAttributeName ":" VariantAttributeValue (e.g. "EncodingProperty1: EncodingPropertyValue")
Almost all XSD-based attributes are of this kind, just using a different syntax. The existing syntax of XSD encoding instructions would have to be adapted to the proposed named attribute syntax. While not backward compatible, this type of change is not very dangerous. First, the existing test suites will still compile since the attributes have no impact on TTCN-3 code itself and since most of TTCN-3 tools generate the codecs internally, the attributes don't influence the process significantly.
Example of possible transformation of XSD encoding instruction:
Current syntax: variant "elementFormQualified"
New syntax: variant["elementForm"] "Qualified"
3. Local attributes
Some XSD encoding instructions are not intended to be inherited or applied to sub-fields, e.g. the "name as capitalized" variant. This could be indicated by a private keyword:
type record Employee
{
XSD.String name,
...
} with { private variant["Name as"] "capitalized" }

(0012476)
Tomas Urban
06-11-2014 15:21

This issue is a complicated ones and I propose to postpone it to the next year.

(0013284)
Jacob Wieland - Spirent
24-09-2015 10:34

please review the uploaded solution proposal

(0013459)
Gyorgy Rethy
03-11-2015 10:33

I think an "Overwriting rule" part should be added to each encoding instruction to clause B, between the "Applicable to (TTCN-3)" and the "Description" parts.

(0014044)
KristÃ³f Szabados
04-08-2016 11:52

I believe it would be a good idea to state that this applies only to certain encodings (XML). The described behaviour differs from the one in the core language. Without the restriction on the encoding, no tool could claim to support both the core and part9 at the same time.

(0014334)
KristÃ³f Szabados
18-11-2016 11:09

Hopefully easier to understand like this

(0014338)
KristÃ³f Szabados
18-11-2016 11:28

please check the changes

(0014427)
Gyorgy Rethy
13-12-2016 16:21

Added to draft V4.7.2