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

ID | Project | Category | View Status | Date Submitted | Last Update
0004232 | Part 09: Using XML with TTCN-3 | Clarification | public | 02-10-2008 07:59 | 19-12-2008 14:52

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.1.1 (published 2009-06) | Fixed in Version | v4.1.1 (published 2009-06) |
Clause Reference(s) | 7.6.1.2
For STF discussion |
Source (company - Author) |

Summary | 0004232: Clarify text on mapping of simpleContent derived by restriction

Description

Current text says:
"To restrict XSD simpleContent additional, more restrictive, facets are applied to the base type or to attributes of the base type. The whole type needs to be redefined in the restricted version, translating to a completely new type definition in TTCN 3.
EXAMPLE:
...."
It is proposed to replace with:
"An XSD simpleContent may restrict the base type or attributes of the base type by applying more restrictive facets than those of the base type (if any). Such XSD simpleContent shall be mapped to a sequence of fields, corresponding to the base type and its attributes and applying the restrictions of the given simpleContent to them (i.e. the base type shall not be references but copyed). First the fields corresponding to the base type attributes shall be generated in the order of their occurance in the XSD, followed by the field generated for the base type. The field name of the latter shall be "base"."

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
02-10-2008 07:59 | Gyorgy Rethy | New Issue |
02-10-2008 07:59 | Gyorgy Rethy | Status | new => assigned
02-10-2008 07:59 | Gyorgy Rethy | Assigned To | => Gyorgy Rethy
02-10-2008 07:59 | Gyorgy Rethy | Clause Reference(s) | => 7.6.1.2
02-10-2008 07:59 | Gyorgy Rethy | Source (company - Author) | =>
13-10-2008 09:30 | Gyorgy Rethy | Summary | Unclear mapping of simpleContent derived by restriction => Clarify text on mapping of simpleContent derived by restriction
15-10-2008 10:02 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
15-10-2008 15:03 | Ina Schieferdecker | Note Added: 0007073 |
15-10-2008 15:03 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
15-10-2008 15:03 | Ina Schieferdecker | Resolution | open => fixed
15-10-2008 15:03 | Ina Schieferdecker | Target Version | => Edition 4.1.1 (not yet published)
20-10-2008 16:32 | Gyorgy Rethy | Note Added: 0007127 |
20-10-2008 16:32 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Ina Schieferdecker
12-12-2008 13:13 | Ina Schieferdecker | Note Added: 0007684 |
12-12-2008 13:13 | Ina Schieferdecker | Assigned To | Ina Schieferdecker => Gyorgy Rethy
19-12-2008 14:52 | Gyorgy Rethy | Status | assigned => closed
19-12-2008 14:52 | Gyorgy Rethy | Note Added: 0007753 |
19-12-2008 14:52 | Gyorgy Rethy | Fixed in Version | => Edition 4.1.1 (not yet published)

Notes

(0007073)
Ina Schieferdecker
15-10-2008 15:03

The proposed solution is in principle ok, but as the base field is the last field in the record type, it should be mentioned after the attribute fields for better understanding. Also some more rewording:
"An XSD simpleContent may restrict the base type or attributes of the base type by applying more restrictive facets than those of the base type (if any). Such XSD simpleContent shall be mapped to a record type containing fields corresponding to the attributes and to the base type. The restrictions of the given simpleContent shall be applied to the fields (i.e. the base type shall not be referenced but translated to a new type definition in TTCN-3). At first, the fields corresponding to the attributes shall be generated in the order of their occurance in the XSD simpleContent definition, followed by the field generated for the base type. The field name of the latter shall be "base"."

(0007127)
Gyorgy Rethy
20-10-2008 16:32

"Such XSD simpleContent shall be mapped to a record type containing fields corresponding to the attributes and to the base type."
See the example:
<xs:complexType name="Laa-laa>
<xs:simpleContent>
<xs:extension base="xs:integer">
<xs:attribute name="country" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
The enclosing TTCN-3 record is generated from the enclosing XSD complexType tag and when processing the XSD simple content "only" the body, i.e. the fields of the enclosing record are added.
For this reason the above text shall be: "Such XSD simpleContent shall be mapped to fields of the record type generated for the complexType (see clause 7.6), corresponding to the attributes and to the base type."
Otherwise Ina's text in the previous note is OK with me.

(0007684)
Ina Schieferdecker
12-12-2008 13:13

ok

(0007753)
Gyorgy Rethy
19-12-2008 14:52

Amendments are done in the master copy