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

ID | Project | Category | View Status | Date Submitted | Last Update
0007848 | Part 09: Using XML with TTCN-3 | Technical | public | 14-06-2019 09:03 | 28-12-2019 12:27

Reporter | Wolfgang Seka |
Assigned To | Gyorgy Rethy |
Priority | urgent | Severity | block | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version |  |
Target Version |  | Fixed in Version | 4.11.1 (published 2020-05) |
Clause Reference(s) | ES 201 873-9 clause 5.1.1 (mainly)
For STF discussion |
Source (company - Author) | MCC160 (Wolfgang)

Summary | 0007848: Mapping XML Schemas: Name clashes in NoTargetNamespace

Description

According to ES 201 873-9 all XSDs with no target namespace go into one and the same TTCN module (NoTargetNamespace), i.e. in TTCN they are in the same scope.
But in practice XSDs with no target namespace do not belong to one and the same scope or context but they are independent from each other.
This results in a name clash when different XSDs use the same name for global elements or types.
EXAMPLE: The XSDs from annex D.2.2 of TS 24.237 and clause 5.1.3.4 of TS 24.390 both define <xs:complexType name="anyExtType">.
NOTE: Even though in the above example the definitions are identical, in general this does not need to be the case.
A related issue is, that different test suites may need different flavours of "NoTargetNamespace" i.e. "NoTargetNamespace" modules with different content.
=> XSDs with no target namespace shall not be treated as if they would belong to one common namespace but a one-by-one mapping of XSD and target TTCN module should be applied, e.g. for each "no-target-namespace-X.xsd" a "no-target-namespace-X.ttcn" should be generated (implicitly or explicitly).
As short-term workaround we have patched one of the XSDs an added a namespace but this will result in wrong coding as the patched schema will require the namespace to be included in the corresponding XML document.
I don't know whether there is any hack with encoding rules for templates in TTCN to get around this.
Another potential workaround could be the use of a proxy XSD (with namespace) including the no-target-namespace XSD; but again I don't know what to do to get rid of the namespace for encoding/decoding of XML instances.
=> There seems to be no straight forward solution or workaround but part 9 should be changed to get away from the one-and-only NoTargetNamespace

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR7848.docx (145,448) 08-08-2019 06:01 http://oldforge.etsi.org/mantis/file_download.php?file_id=3839&type=bug CR7848-2.docx (145,195) 08-08-2019 08:31 http://oldforge.etsi.org/mantis/file_download.php?file_id=3840&type=bug

Issue History
Date Modified | Username | Field | Change
14-06-2019 09:03 | Wolfgang Seka | New Issue |
06-08-2019 09:41 | KristÃ³f Szabados | Note Added: 0015370 |
06-08-2019 09:42 | KristÃ³f Szabados | Status | new => resolved
06-08-2019 09:42 | KristÃ³f Szabados | Resolution | open => won't fix
06-08-2019 09:42 | KristÃ³f Szabados | Assigned To | => Gyorgy Rethy
07-08-2019 08:46 | KristÃ³f Szabados | Assigned To | Gyorgy Rethy => KristÃ³f Szabados
07-08-2019 08:46 | KristÃ³f Szabados | Status | resolved => new
07-08-2019 08:52 | KristÃ³f Szabados | Note Added: 0015385 |
07-08-2019 11:49 | KristÃ³f Szabados | Project | TTCN-3 Change Requests => Part 09: Using XML with TTCN-3
07-08-2019 12:02 | KristÃ³f Szabados | Status | new => assigned
08-08-2019 06:01 | KristÃ³f Szabados | File Added: CR7848.docx |
08-08-2019 07:41 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Jacob Wieland - Spirent
08-08-2019 07:41 | KristÃ³f Szabados | Note Added: 0015417 |
08-08-2019 08:31 | Jacob Wieland - Spirent | File Added: CR7848-2.docx |
08-08-2019 08:32 | Jacob Wieland - Spirent | Note Added: 0015419 |
08-08-2019 08:33 | Jacob Wieland - Spirent | Note Added: 0015420 |
08-08-2019 08:33 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Tomas Urban
08-08-2019 08:33 | Jacob Wieland - Spirent | Status | assigned => confirmed
08-08-2019 09:46 | Tomas Urban | Note Added: 0015425 |
08-08-2019 09:46 | Tomas Urban | Assigned To | Tomas Urban => KristÃ³f Szabados
08-08-2019 09:54 | KristÃ³f Szabados | Note Added: 0015426 |
08-08-2019 09:54 | KristÃ³f Szabados | Status | confirmed => resolved
08-08-2019 09:54 | KristÃ³f Szabados | Fixed in Version | => v4.10.1 (published 2019-05)
08-08-2019 09:54 | KristÃ³f Szabados | Resolution | won't fix => fixed
08-08-2019 09:54 | KristÃ³f Szabados | Assigned To | KristÃ³f Szabados => Gyorgy Rethy
28-12-2019 11:39 | Gyorgy Rethy | Note Added: 0015585 |
28-12-2019 11:39 | Gyorgy Rethy | Status | resolved => closed
28-12-2019 12:27 | Gyorgy Rethy | Fixed in Version | v4.10.1 (published 2019-05) => 4.11.1 (published 2020-05)

Notes

(0015370)
KristÃ³f Szabados
06-08-2019 09:41

STF discussion: These kind of issues always need to be resolved on the XSD side. In your case delete one of the element types.

(0015385)
KristÃ³f Szabados
07-08-2019 08:52

STF discussion: On further inspection. This could be supported by a combination of tool dependent option and standardized support.
The standard could describe how each xsd file that has no target namespace should be converted into separate TTCN-3 modules.
As this feature would break backward compatibility it will also have the tool dependent part, that users should be allowed to choose if they wish to convert XSDs according to the old conversion rules, or the new one.
The backward compatilibility breaking comes as all previously written TTCN-3 files importing from such a generated module will have to be updated, to import from one or more of the newly generated modules.

(0015417)
KristÃ³f Szabados
08-08-2019 07:41

Please review

(0015419)
Jacob Wieland - Spirent
08-08-2019 08:32

Made the second part a bit less ambiguous (one sentence stated that NoTargetNamespace should be used, another stated, that that should be used only sometimes. Also fixed some typos.

(0015420)
Jacob Wieland - Spirent
08-08-2019 08:33

please review

(0015425)
Tomas Urban
08-08-2019 09:46

I haven't found any issues, Kristof, could you please also check?

(0015426)
KristÃ³f Szabados
08-08-2019 09:54

Looks good to me, can be included in the next version.

(0015585)
Gyorgy Rethy
28-12-2019 11:39

Implemented in final draft 4.10.2.