  

<table class="width100" style="width:100%;" data-cellspacing="1">
<colgroup>
<col style="width: 16%" />
<col style="width: 16%" />
<col style="width: 16%" />
<col style="width: 16%" />
<col style="width: 16%" />
<col style="width: 16%" />
</colgroup>
<tbody>
<tr class="odd">
<td colspan="6" class="form-title"><div class="center">
ETSI's Bug Tracker - Part 09: Using XML with TTCN-3
</div></td>
</tr>
<tr class="even">
<td colspan="6" class="form-title">View Issue Details</td>
</tr>
<tr class="odd">
<td colspan="6" class="print-spacer"><hr /></td>
</tr>
<tr class="even print-category">
<td class="print" width="16%">ID</td>
<td class="print" width="16%">Project</td>
<td class="print" width="16%">Category</td>
<td class="print" width="16%">View Status</td>
<td class="print" width="16%">Date Submitted</td>
<td class="print" width="16%">Last Update</td>
</tr>
<tr class="odd print">
<td class="print">0005852</td>
<td class="print">Part 09: Using XML with TTCN-3</td>
<td class="print">Technical</td>
<td class="print">public</td>
<td class="print">22-12-2010 12:27</td>
<td class="print">13-07-2011 16:33</td>
</tr>
<tr class="even">
<td colspan="6" class="print-spacer"><hr /></td>
</tr>
<tr class="odd print">
<td class="print-category">Reporter</td>
<td class="print">Jacob Wieland - Spirent</td>
<td colspan="4" class="print"> </td>
</tr>
<tr class="even print">
<td class="print-category">Assigned To</td>
<td class="print">Gyorgy Rethy</td>
<td colspan="4" class="print"> </td>
</tr>
<tr class="odd print">
<td class="print-category">Priority</td>
<td class="print">high</td>
<td class="print-category">Severity</td>
<td class="print">minor</td>
<td class="print-category">Reproducibility</td>
<td class="print">have not tried</td>
</tr>
<tr class="even print">
<td class="print-category">Status</td>
<td class="print">closed</td>
<td class="print-category">Resolution</td>
<td class="print">fixed</td>
<td colspan="2" class="print"> </td>
</tr>
<tr class="odd print">
<td class="print-category">Platform</td>
<td class="print"></td>
<td class="print-category">OS</td>
<td class="print"></td>
<td class="print-category">OS Version</td>
<td class="print"></td>
</tr>
<tr class="even print">
<td class="print-category">Product Version</td>
<td class="print"></td>
<td colspan="4" class="print"> </td>
</tr>
<tr class="odd">
<td class="print-category">Target Version</td>
<td class="print"></td>
<td class="print-category">Fixed in Version</td>
<td class="print"></td>
<td colspan="2" class="print"> </td>
</tr>
<tr class="even print">
<td class="print-category">Clause Reference(s)</td>
<td colspan="4" class="print">XSD Language Mapping, section 7.1.4</td>
<td></td>
</tr>
<tr class="odd print">
<td class="print-category">For STF discussion</td>
<td colspan="4" class="print"></td>
<td></td>
</tr>
<tr class="even print">
<td class="print-category">Source (company - Author)</td>
<td colspan="4" class="print">Testing Technologies - Jacob Wieland</td>
<td></td>
</tr>
<tr class="odd">
<td colspan="6" class="print-spacer"><hr /></td>
</tr>
<tr class="even print">
<td class="print-category">Summary</td>
<td colspan="5" class="print">0005852: choice with optional content
should be mapped to an optional union field</td>
</tr>
<tr class="odd print">
<td class="print-category">Description</td>
<td colspan="5" class="print">The special case that one element (or
sub-particle) of a choice particle can occur 0 times (minOccurs="0")
should be handled in the way that the resulting union field in the
TTCN-3 type should be optional.<br />
<br />
Otherwise, if more than one alternative is 'optional', it is unclear
which alternative shall be chosen if none of the elements allowed in the
choice are present in the XML.<br />
<br />
Example:<br />
<br />
&lt;choice&gt;<br />
  &lt;element name="a" minOccurs="0" type="A_Type"/&gt;<br />
  &lt;element name="b" minOccurs="0" maxOccurs="10"
type="B_Type"/&gt;<br />
&lt;/choice&gt;<br />
<br />
should be mapped to a field like:<br />
<br />
union {<br />
  A_Type a,<br />
  record length (1 .. 10) of B_Type b<br />
} choice optional<br />
<br />
Of course, this is true for any sub-particle of a choice which describes
the empty XML element concatenation.<br />
<br />
Basically, the rule should be: if one of the sub-fields of a union
should be optional in regard to minOccurs or can be the empty list, the
union should be optional instead.<br />
<br />
 <br />
  </td>
</tr>
<tr class="even print">
<td class="print-category">Steps To Reproduce</td>
<td colspan="5" class="print"></td>
</tr>
<tr class="odd print">
<td class="print-category">Additional Information</td>
<td colspan="5" class="print"></td>
</tr>
<tr class="even print">
<td class="print-category">Tags</td>
<td colspan="5" class="print">No tags attached.</td>
</tr>
<tr class="odd print">
<td class="print-category">Relationships</td>
<td colspan="5" class="print"></td>
</tr>
<tr class="even print">
<td class="print-category">Attached Files</td>
<td colspan="5" class="print"><img
src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif"
alt="doc" /> CR5852_resolution_v1.doc (157,184) <span
class="italic">01-07-2011 10:14</span><br />
http://oldforge.etsi.org/mantis/file_download.php?file_id=2543&amp;type=bug<br />
<img src="http://oldforge.etsi.org/mantis/images/fileicons/doc.gif"
alt="doc" /> CR5852_resolution_v2.doc (75,776) <span
class="italic">01-07-2011 16:44</span><br />
http://oldforge.etsi.org/mantis/file_download.php?file_id=2553&amp;type=bug</td>
</tr>
<tr class="odd">
<td colspan="6" class="print-spacer"><hr /></td>
</tr>
<tr class="even">
<td class="form-title">Issue History</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="odd print-category">
<td class="row-category-history">Date Modified</td>
<td class="row-category-history">Username</td>
<td class="row-category-history">Field</td>
<td class="row-category-history">Change</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">22-12-2010 12:27</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a></td>
<td class="print">New Issue</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">22-12-2010 12:27</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a></td>
<td class="print">Clause Reference(s)</td>
<td class="print">=&gt; XSD Language Mapping, section 7.1.4</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">22-12-2010 12:27</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a></td>
<td class="print">Source (company - Author)</td>
<td class="print">=&gt; Testing Technologies - Jacob Wieland</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">24-05-2011 15:05</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Added: 0010026</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">24-05-2011 15:05</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Assigned To</td>
<td class="print">=&gt; Gyorgy Rethy</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">24-05-2011 15:05</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Status</td>
<td class="print">new =&gt; assigned</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">24-05-2011 15:05</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Target Version</td>
<td class="print">=&gt; Edition 4.3.2 (interim)</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">24-05-2011 19:22</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Priority</td>
<td class="print">normal =&gt; high</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">25-05-2011 16:58</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Edited: 0010026</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">02-06-2011 14:44</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Added: 0010112</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">02-06-2011 14:52</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Edited: 0010112</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">02-06-2011 15:16</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Edited: 0010112</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">02-06-2011 15:40</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Edited: 0010112</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">06-06-2011 12:04</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a></td>
<td class="print">Note Added: 0010113</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">30-06-2011 12:16</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Edited: 0010112</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">30-06-2011 12:53</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Added: 0010156</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">30-06-2011 14:39</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Added: 0010158</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">01-07-2011 10:14</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">File Added: CR5852_resolution_v1.doc</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">01-07-2011 10:15</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Added: 0010172</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">01-07-2011 10:16</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Assigned To</td>
<td class="print">Gyorgy Rethy =&gt; Ina Schieferdecker</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">01-07-2011 14:03</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Assigned To</td>
<td class="print">Ina Schieferdecker =&gt; Jacob Wieland - Spirent</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">01-07-2011 16:44</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a></td>
<td class="print">File Added: CR5852_resolution_v2.doc</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">01-07-2011 16:44</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a></td>
<td class="print">Note Added: 0010189</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">01-07-2011 16:44</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a></td>
<td class="print">Assigned To</td>
<td class="print">Jacob Wieland - Spirent =&gt; Gyorgy Rethy</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">01-07-2011 16:58</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Status</td>
<td class="print">assigned =&gt; resolved</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">01-07-2011 16:58</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Resolution</td>
<td class="print">open =&gt; fixed</td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">13-07-2011 16:33</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Status</td>
<td class="print">resolved =&gt; closed</td>
<td></td>
<td></td>
</tr>
<tr class="odd print">
<td class="print">13-07-2011 16:33</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Note Added: 0010219</td>
<td class="print"></td>
<td></td>
<td></td>
</tr>
<tr class="even print">
<td class="print">13-07-2011 16:33</td>
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a></td>
<td class="print">Fixed in Version</td>
<td class="print">=&gt; Edition 4.3.2 (interim)</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

  

<table class="width100" data-cellspacing="1">
<colgroup>
<col style="width: 50%" />
<col style="width: 50%" />
</colgroup>
<tbody>
<tr class="odd">
<td colspan="2" class="form-title">Notes</td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<colgroup>
<col style="width: 100%" />
</colgroup>
<tbody>
<tr class="odd">
<td class="print">(0010026)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a>   </td>
</tr>
<tr class="odd">
<td class="print">24-05-2011 15:05   <br />
(edited on: 25-05-2011 16:58)</td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<colgroup>
<col style="width: 100%" />
</colgroup>
<tbody>
<tr class="odd">
<td class="print">3GPP related CR.<br />
Check the possible solution.<br />
<br />
</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<colgroup>
<col style="width: 100%" />
</colgroup>
<tbody>
<tr class="odd">
<td class="print">(0010112)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a>   </td>
</tr>
<tr class="odd">
<td class="print">02-06-2011 14:44   <br />
(edited on: 30-06-2011 12:16)</td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<colgroup>
<col style="width: 100%" />
</colgroup>
<tbody>
<tr class="odd">
<td class="print">Yes, this seems to be an unhandled case... though the
case when more than one alternative has minOccurs="0" should be a rather
specific one, supposedly used very rarely, as doesn't make much
technical sense.<br />
<br />
To understand it better, we have to look at the possible cases when
choice can appear:<br />
1) as a complexType on its own<br />
2) as a choice group<br />
===========================================<br />
As compositor of complexTypes, e.g.<br />
&lt;complexType name="e25choOptional"&gt;<br />
    &lt;choice&gt;<br />
        &lt;element name="title" type="string" minOccurs="0"/&gt;<br />
        &lt;element name="forename" type="string"
minOccurs="0"/&gt;<br />
        &lt;element name="surname" type="string"
minOccurs="0"/&gt;<br />
    &lt;/choice&gt;<br />
&lt;/complexType&gt;<br />
&lt;element name="elemChoOptional" type="ns:e25choOptional"/&gt;<br />
<br />
This could be handled in two ways:<br />
-----------------------------<br />
1.a)<br />
As proposed above:<br />
type record E25choOptional {<br />
    union {<br />
        XSD.String title,<br />
        XSD.String forename,<br />
        XSD.String surname<br />
    } choice optional<br />
}<br />
with {<br />
variant "name as uncapitalized";<br />
variant (choice) "untagged";<br />
};<br />
<br />
type E25choOptional ElemChoOptional<br />
with {<br />
variant "name as uncapitalized";<br />
variant "element";<br />
};<br />
<br />
template ElemChoOptional t_ElemChoOptional := { choice := omit }<br />
<br />
-----------------------------<br />
1.b) In this case translating minOccurs="0" maxOccurs="1" to a record
of:<br />
type record E25choOptional {<br />
    union {<br />
        record length(0 .. 1) of XSD.String title_list,<br />
        record length(0 .. 1) of XSD.String forename_list,<br />
        record length(0 .. 1) of XSD.String surname_list<br />
    } choice<br />
}<br />
with {<br />
variant "name as uncapitalized";<br />
variant (choice) "untagged";<br />
variant (choice.title_list) "untagged";<br />
variant (choice.title_list[-]) "name as 'title'";<br />
variant (choice.forename_list) "untagged";<br />
variant (choice.forename_list[-]) "name as 'forename'";<br />
variant (choice.surname_list) "untagged";<br />
variant (choice.surname_list[-]) "name as 'surname'";<br />
};<br />
<br />
type E25choOptional ElemChoOptional<br />
with {<br />
variant "name as uncapitalized";<br />
variant "element";<br />
};<br />
<br />
template ElemChoOptional t_ElemChoOptional := { choice := {title_list :=
{}}}<br />
<br />
In this case, of course, there also shall be the same rule as for
union-s, the first matching alternative "wins", thus receiving an empty
element would be decoded to:<br />
{ choice := { title_list := { } } }<br />
<br />
Not nice, but can work<br />
<br />
===========================================<br />
Let see these two options also in the case, when choice is used as a
governor of groups, embedded in another choice group:<br />
For example:<br />
&lt;group name="e25ChoGroupOpt"&gt;<br />
    &lt;choice&gt;<br />
        &lt;element name="title" type="string" minOccurs="0"/&gt;<br />
        &lt;element name="forename" type="string"
minOccurs="0"/&gt;<br />
        &lt;element name="surname" type="string"
minOccurs="0"/&gt;<br />
    &lt;/choice&gt;<br />
&lt;/group&gt;<br />
<br />
&lt;group name="e25ChoChoGroupOpt"&gt;<br />
    &lt;choice&gt;<br />
        &lt;group ref="ns:e25ChoGroupOpt"/&gt;<br />
    &lt;/choice&gt;<br />
&lt;/group&gt;<br />
<br />
&lt;element name="elemFromChoGroupOpt"&gt;<br />
    &lt;complexType&gt;<br />
        &lt;group ref="ns:e25ChoChoGroupOpt"/&gt;<br />
    &lt;/complexType&gt;<br />
&lt;/element&gt;<br />
-----------------------------<br />
2.a) translated according to the proposal to:<br />
type union E25ChoGroupOpt {<br />
    XSD.String title,<br />
    XSD.String forename,<br />
    XSD.String surname<br />
}<br />
with {<br />
variant "untagged";<br />
};<br />
<br />
type union E25ChoChoGroupOpt {<br />
    E25ChoGroupOpt e25ChoGroupOpt<br />
}<br />
with {<br />
variant "untagged";<br />
};<br />
<br />
type record ElemFromChoGroupOpt {<br />
    E25ChoChoGroupOpt e25ChoChoGroupOpt optional<br />
}<br />
with {<br />
variant "name as uncapitalized";<br />
variant "element";<br />
};<br />
<br />
template ElemFromChoGroupOpt t_ElemFromChoGroupOpt := {
e25ChoChoGroupOpt := omit }<br />
<br />
-----------------------------<br />
2.b) or with the modified min/maxOccurs conversion to:<br />
type union E25ChoGroupOpt {<br />
    record length(0 .. 1) of XSD.String title_list,<br />
    record length(0 .. 1) of XSD.String forename_list,<br />
    record length(0 .. 1) of XSD.String surname_list<br />
}<br />
with {<br />
variant "untagged";<br />
variant (choice.title_list) "untagged";<br />
variant (choice.title_list[-]) "name as 'title'";<br />
variant (choice.forename_list) "untagged";<br />
variant (choice.forename_list[-]) "name as 'forename'";<br />
variant (choice.surname_list) "untagged";<br />
variant (choice.surname_list[-]) "name as 'surname'";<br />
};<br />
<br />
type union E25ChoChoGroupOpt {<br />
    E25ChoGroupOpt e25ChoGroupOpt<br />
}<br />
with {<br />
variant "untagged";<br />
};<br />
<br />
type record ElemChoFromGroupOptional {<br />
    E25ChoChoGroupOpt e25ChoChoGroupOpt<br />
}<br />
with {<br />
variant "name as uncapitalized";<br />
variant "element";<br />
};<br />
<br />
template ElemFromChoGroupOptional t_ElemFromChoGroupOptional :=
{e25ChoChoGroupOpt:= {e25ChoGroupOpt := {title_list :={}}}}<br />
<br />
===========================================<br />
Let see these two options in the case, when the groups is embedded in a
sequence group:<br />
&lt;!-- e25ChoGroupOpt as above --&gt;<br />
&lt;group name="e25SeqChoGroupOpt"&gt;<br />
    &lt;sequence&gt;<br />
        &lt;group ref="ns:e25ChoGroupOpt"/&gt;<br />
    &lt;/sequence&gt;<br />
&lt;/group&gt;<br />
<br />
&lt;element name="elemFromSeqGroupOpt"&gt;<br />
    &lt;complexType&gt;<br />
        &lt;group ref="ns:e25SeqChoGroupOpt"/&gt;<br />
    &lt;/complexType&gt;<br />
&lt;/element&gt;<br />
-----------------------------<br />
3.a) According to the proposed solution:<br />
type record E25SeqChoGroupOpt {<br />
    E25ChoGroupOpt e25ChoGroupOpt optional<br />
}<br />
with {<br />
variant "untagged";<br />
};<br />
<br />
type record ElemFromSeqGroupOpt {<br />
    E25SeqChoGroupOpt e25SeqChoGroupOpt<br />
}<br />
with {<br />
variant "name as uncapitalized";<br />
variant "element";<br />
};<br />
<br />
template ElemFromSeqGroupOpt t_ElemFromSeqGroupOpt := {
e25SeqChoGroupOpt:= {e25ChoGroupOpt:=omit }}<br />
-----------------------------<br />
3.b) or with the modified min/maxOccurs conversion to:<br />
<br />
type record E25SeqChoGroupOpt {<br />
    E25ChoGroupOpt e25ChoGroupOpt<br />
}<br />
with {<br />
variant "untagged";<br />
};<br />
<br />
type record ElemFromSeqGroupOpt {<br />
    E25SeqChoGroupOpt e25SeqChoGroupOpt<br />
}<br />
with {<br />
variant "name as uncapitalized";<br />
variant "element";<br />
};<br />
<br />
template ElemFromSeqGroupOpt t_ElemFromSeqGroupOpt :=
{e25SeqChoGroupOpt:= {e25ChoGroupOpt := {title_list :={}}}}<br />
===========================================<br />
<br />
So, to sum up the experince from the above trial is:<br />
- if using the proposed solution:<br />
the respective union itself cannot be always made optional but all
occurances shall be made optional where the given union is USED in a
record the first time. Therefore, for example, no template resulting an
empty element can be written for the types E25ChoGroupOpt,
E25ChoChoGroupOpt. The values/templates using the type are simpler, but
depending on the USE, fields at different levels shall be omitted.<br />
This would be dificult to handle in the standard (changes at more
places).<br />
- if using the modified min/maxOccurs mapping:<br />
The minOccurs="0" is handled directly at the place where it is used. The
values/templates are more complex, but consistent in all cases (value
has to be discased to the depth of the respective union in all cases,
independent of the use of the union.). At matching, this case is more
tricky as the user shall remember that in case of an empty element the
decoder picks the first alternative. To implement it in the standard, it
would need an additional one-two sentence(s) in clause 7.1.4 ("MinOccurs
and maxOccurs"), exactly the place where the user would search for the
rule.<br />
<br />
Taking into account the findings of the above "experiment", I propose to
handle this case by amending the rules of minOccurs conversion.<br />
<br />
</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">(0010113)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a>   </td>
</tr>
<tr class="odd">
<td class="print">06-06-2011 12:04   </td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<colgroup>
<col style="width: 100%" />
</colgroup>
<tbody>
<tr class="odd">
<td class="print">Regarding your experiments, I would vote for exactly
the other direction. It is much more user-friendly and understandable.
We should not opt for the easier way to change the standard just to
stick with a user-unfriendly, hard to understand feature.<br />
<br />
Anyone can see from your examples that the mapping of version a) is much
more natural and much simpler and, I think, also more composable.<br />
<br />
Since choices pretty much never can stand on their own (they always must
be referenced from an element as its type (or be the top-anonymous type
of an element or a group reference), it just needs to be stated that
whenever such a reference is made to a choice that can evaluate to an
emtpy-XML-content, the field referencing the resulting union type must
be optional. This can probably also be done with 2 or three well-placed
sentences.</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">(0010156)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a>   </td>
</tr>
<tr class="odd">
<td class="print">30-06-2011 12:53   </td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">Choose the record of solution. In case of receiving an
empty element the decoder shall also use the first alternative with an
empty record of.</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">(0010158)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a>   </td>
</tr>
<tr class="odd">
<td class="print">30-06-2011 14:39   </td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">One more point: when there are more than 1
alternatives with minOccurs="0" in the XSD choice, only the first one
shall be a record length(0..X) of, the rest shall be record length(1..X)
of; in this way any decoding ambiguity is removed, an empty something
can be received by using the first alternative only.</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">(0010172)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a>   </td>
</tr>
<tr class="odd">
<td class="print">01-07-2011 10:15   </td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">Proposed resolution text is in
CR5852_resolution_v1.doc. Pls. review.</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">(0010189)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob
Wieland - Spirent</a>   </td>
</tr>
<tr class="odd">
<td class="print">01-07-2011 16:44   </td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">added missing case</td>
</tr>
</tbody>
</table></td>
</tr>
<tr class="even">
<td colspan="2" class="print-spacer"><hr /></td>
</tr>
<tr class="odd">
<td class="nopad" data-valign="top" width="20%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">(0010219)</td>
</tr>
<tr class="even">
<td class="print"><a
href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy
Rethy</a>   </td>
</tr>
<tr class="odd">
<td class="print">13-07-2011 16:33   </td>
</tr>
</tbody>
</table></td>
<td class="nopad" data-valign="top" width="85%"><table class="hide"
data-cellspacing="1">
<tbody>
<tr class="odd">
<td class="print">Added to master copy.</td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table>
