<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<link rel="stylesheet" type="text/css" href="http://oldforge.etsi.org/mantis/css/default.css" />
	<script type="text/javascript"><!--
		if(document.layers) {document.write("<style>td{padding:0px;}<\/style>")}
	// --></script>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Cache-Control" content="no-cache" />
	<meta http-equiv="Pragma-directive" content="no-cache" />
	<meta http-equiv="Cache-Directive" content="no-cache" />
	<meta http-equiv="Expires" content="Tue, 17 Dec 2024 09:16:31 GMT" />
	<link rel="shortcut icon" href="/mantis/images/favicon.ico" type="image/x-icon" />
	<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Text Search" href="http://oldforge.etsi.org/mantis/browser_search_plugin.php?type=text" />	<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Issue Id" href="http://oldforge.etsi.org/mantis/browser_search_plugin.php?type=id" />	<title>0006868: XSD.GYear does not allow years greater than 9999 - ETSI's Bug Tracker</title>
<script type="text/javascript" src="/mantis/javascript/min/common.js"></script>
<script type="text/javascript">var loading_lang = "Loading...";</script><script type="text/javascript" src="/mantis/javascript/min/ajax.js"></script>
</head>
<body>
<br /><table class="width100" cellspacing="1"><tr><td class="form-title" colspan="6"><div class="center">ETSI's Bug Tracker - Part 09: Using XML with TTCN-3</div></td></tr><tr><td class="form-title" colspan="6">View Issue Details</td></tr><tr><td class="print-spacer" colspan="6"><hr size="1" /></td></tr><tr class="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="print"><td class="print">0006868</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">20-01-2015 15:32</td><td class="print">04-12-2015 14:07</td></tr><tr><td class="print-spacer" colspan="6"><hr size="1" /></td></tr><tr class="print"><td class="print-category">Reporter</td><td class="print">Bogdan Stanca-Kaposta</td><td class="print" colspan="4">&#160;</td></tr><tr class="print"><td class="print-category">Assigned To</td><td class="print">Gyorgy Rethy</td><td class="print" colspan="4">&#160;</td></tr><tr class="print"><td class="print-category">Priority</td><td class="print">normal</td><td class="print-category">Severity</td><td class="print">minor</td><td class="print-category">Reproducibility</td><td class="print">always</td></tr><tr class="print"><td class="print-category">Status</td><td class="print">closed</td><td class="print-category">Resolution</td><td class="print">fixed</td><td class="print" colspan="2">&#160;</td></tr><tr class="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="print"><td class="print-category">Product Version</td><td class="print">v4.5.1 (published 2013-04)</td><td class="print" colspan="4">&#160;</td></tr><tr><td class="print-category">Target Version</td><td class="print">v4.7.1 (published 2016-07)</td><td class="print-category">Fixed in Version</td><td class="print">v4.7.1 (published 2016-07)</td><td class="print" colspan="2">&#160;</td></tr><tr class="print"><td class="print-category">Clause Reference(s)</td><td class="print" colspan="4">Annex A, 6.5.6</td></tr><tr class="print"><td class="print-category">For STF discussion</td><td class="print" colspan="4"></td></tr><tr class="print"><td class="print-category">Source  (company  - Author)</td><td class="print" colspan="4">STF475</td></tr><tr><td class="print-spacer" colspan="6"><hr size="1" /></td></tr><tr class="print"><td class="print-category">Summary</td><td class="print" colspan="5">0006868: XSD.GYear does not allow years greater than 9999</td></tr><tr class="print"><td class="print-category">Description</td><td class="print" colspan="5">yearExpansion is too strict and does not allow positive years having more than 4 digits (only negative ones).<br />
<br />
Proposed solution is to update the yearExpansion to <br />
<br />
const charstring<br />
...<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;year := &quot;[0-9]#(4)&quot;, // or &quot;\d#4&quot;<br />
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;yearExpansion := &quot;-#(,1)([1-9][0-9]#(0,))#(,1)&quot;,<br />
...<br />
<br />
<br />
Please check the lexical mapping fom W3C<br />
[56]   yearFrag ::= '-'? (([1-9] digit digit digit+)) | ('0' digit digit digit))<br />
<br />
source: <a href="http://www.w3.org/TR/xmlschema11-2/#nt-yrFrag">http://www.w3.org/TR/xmlschema11-2/#nt-yrFrag</a> [<a href="http://www.w3.org/TR/xmlschema11-2/#nt-yrFrag" target="_blank">^</a>]<br />
<br />
<br />
Examples from W3C<br />
&lt;ex:gYearElement&gt;10739&lt;/ex:gYearElement&gt;<br />
source: <a href="http://www.w3.org/2002/ws/databinding/examples/6/09/GYearElement/">http://www.w3.org/2002/ws/databinding/examples/6/09/GYearElement/</a> [<a href="http://www.w3.org/2002/ws/databinding/examples/6/09/GYearElement/" target="_blank">^</a>] <br />
</td></tr><tr class="print"><td class="print-category">Steps To Reproduce</td><td class="print" colspan="5">To reproduce please execute the XML Conformance Test Pos_060506_gregorian_year_003</td></tr><tr class="print"><td class="print-category">Additional Information</td><td class="print" colspan="5"></td></tr><tr class="print"><td class="print-category">Tags</td><td class="print" colspan="5">No tags attached.</td></tr><tr class="print"><td class="print-category">Relationships</td><td class="print" colspan="5"></td></tr><tr class="print"><td class="print-category">Attached Files</td><td class="print" colspan="5"></td></tr><tr><td class="print-spacer" colspan="6"><hr size="1" /></td></tr><tr><td class="form-title">Issue History</td></tr><tr class="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></tr><tr class="print"><td class="print">20-01-2015 15:32</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=699">Bogdan Stanca-Kaposta</a></td><td class="print">New Issue</td><td class="print"></td></tr><tr class="print"><td class="print">21-01-2015 10:14</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=699">Bogdan Stanca-Kaposta</a></td><td class="print">Note Added: 0012675</td><td class="print"></td></tr><tr class="print"><td class="print">21-01-2015 10:14</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=699">Bogdan Stanca-Kaposta</a></td><td class="print">Note Edited: 0012675</td><td class="print">bug_revision_view_page.php?bugnote_id=12675#r109</td></tr><tr class="print"><td class="print">21-01-2015 10:14</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=699">Bogdan Stanca-Kaposta</a></td><td class="print">Note Edited: 0012675</td><td class="print">bug_revision_view_page.php?bugnote_id=12675#r110</td></tr><tr class="print"><td class="print">21-01-2015 10:15</td><td class="print"><a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=699">Bogdan Stanca-Kaposta</a></td><td class="print">Note Edited: 0012675</td><td class="print">bug_revision_view_page.php?bugnote_id=12675#r111</td></tr><tr class="print"><td class="print">21-01-2015 10:18</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">Description Updated</td><td class="print">bug_revision_view_page.php?rev_id=113#r113</td></tr><tr class="print"><td class="print">21-01-2015 10:18</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 Edited: 0012675</td><td class="print">bug_revision_view_page.php?bugnote_id=12675#r114</td></tr><tr class="print"><td class="print">14-05-2015 10:08</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; v4.7.1 (published 2016-07)</td></tr><tr class="print"><td class="print">03-08-2015 14:27</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></tr><tr class="print"><td class="print">03-08-2015 14:27</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></tr><tr class="print"><td class="print">13-10-2015 12:09</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: 0013365</td><td class="print"></td></tr><tr class="print"><td class="print">13-10-2015 12:10</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: 0013365</td><td class="print">bug_revision_view_page.php?bugnote_id=13365#r184</td></tr><tr class="print"><td class="print">13-10-2015 12:13</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: 0013365</td><td class="print">bug_revision_view_page.php?bugnote_id=13365#r185</td></tr><tr class="print"><td class="print">13-10-2015 12:13</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: 0013365</td><td class="print">bug_revision_view_page.php?bugnote_id=13365#r186</td></tr><tr class="print"><td class="print">13-10-2015 12: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">Note Edited: 0013365</td><td class="print">bug_revision_view_page.php?bugnote_id=13365#r187</td></tr><tr class="print"><td class="print">13-10-2015 12: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 Edited: 0013365</td><td class="print">bug_revision_view_page.php?bugnote_id=13365#r188</td></tr><tr class="print"><td class="print">13-10-2015 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">Assigned To</td><td class="print">Gyorgy Rethy =&gt; Jacob Wieland - Spirent</td></tr><tr class="print"><td class="print">13-10-2015 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">Status</td><td class="print">assigned =&gt; confirmed</td></tr><tr class="print"><td class="print">13-10-2015 15:37</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: 0013375</td><td class="print"></td></tr><tr class="print"><td class="print">13-10-2015 15:40</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 Edited: 0013375</td><td class="print">bug_revision_view_page.php?bugnote_id=13375#r190</td></tr><tr class="print"><td class="print">13-10-2015 15:47</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></tr><tr class="print"><td class="print">13-10-2015 15:47</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">Status</td><td class="print">confirmed =&gt; assigned</td></tr><tr class="print"><td class="print">13-10-2015 16:12</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: 0013376</td><td class="print"></td></tr><tr class="print"><td class="print">13-10-2015 16:13</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: 0013377</td><td class="print"></td></tr><tr class="print"><td class="print">13-10-2015 16:13</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></tr><tr class="print"><td class="print">13-10-2015 16:13</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; v4.7.1 (published 2016-07)</td></tr><tr class="print"><td class="print">13-10-2015 16:13</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></tr><tr class="print"><td class="print">04-12-2015 14:07</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: 0013554</td><td class="print"></td></tr><tr class="print"><td class="print">04-12-2015 14:07</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></tr></table>
<br />
<table class="width100" cellspacing="1">
<tr>
	<td class="form-title" colspan="2">
		Notes	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0012675)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=699">Bogdan Stanca-Kaposta</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				21-01-2015 10:14&#160;&#160;&#160;
				<br />(edited on:&#32;21-01-2015 10:18)			</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				The root issue has been already fixed by <a href="http://forge.etsi.org/mantis/view.php?id=6742">http://forge.etsi.org/mantis/view.php?id=6742</a> [<a href="http://forge.etsi.org/mantis/view.php?id=6742" target="_blank">^</a>]<br />
<br />
Nevertheless we could improve the reading of year by replacing it <br />
<br />
&#160;&#160;year := &quot;[0-9]#(4)&quot;, // without any spaces  or &quot;\d#4&quot;<br />
<br />
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0013365)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				13-10-2015 12:09&#160;&#160;&#160;
				<br />(edited on:&#32;13-10-2015 12:15)			</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Actually, XSD prohibits the year &quot;0000&quot; in the fixed-length 4-digit year part. The proposed pattern would allow &quot;0000&quot; and TTCN-3 pattern does not allow excluding certain concrete values from the patterns)<br />
<br />
But I agree, the year pattern should be changed to increase readibility (and make the fixed length more visible):<br />
<br />
&#160;&#160;year := &quot;(0#3[1-9])|(0#2[1-9][0-9])|(0[1-9][0-9]#(2))|([1-9][0-9]#(3))&quot;<br />
NOTE: in the final version #(2) and #(3) will be without brackets, but for some reasons Mantis changes them to <a href="/mantis/view.php?id=2" title="[resolved] TC_COR_8263_01 Unsolicited mulitcast RA" class="resolved">0000002</a> and <a href="/mantis/view.php?id=3" title="[resolved] TP_COR_8229_01 - Tesp Purpose &lt;--&gt; Requirement  mismatch + TC absent (?)" class="resolved">0000003</a> in comments.<br />
<br />
(for easier comparisionthe current pattern is:<br />
&#160;&#160;year := &quot;(0(0(0[1-9]|[1-9][0-9])|[1-9][0-9][0-9])|[1-9][0-9][0-9][0-9])&quot;)<br />
<br />
Please review!<br />
<br />
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0013375)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=508">Jacob Wieland - Spirent</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				13-10-2015 15:37&#160;&#160;&#160;
				<br />(edited on:&#32;13-10-2015 15:40)			</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Where did you read that the year 0000 is prohibited. That is not apparent from the pattern given in the W3C standard (as copied above: <br />
<br />
[56] yearFrag ::= '-'? (([1-9] digit digit digit+)) | ('0' digit digit digit))<br />
<br />
)<br />
<br />
This clearly allows 0000.<br />
<br />
To quote the description in W3C:<br />
<br />
yearFrag is a numeral consisting of at least four decimal digits, optionally preceded by a minus sign; leading '0' digits are prohibited *except to bring the digit count up to four*.  It represents the ·year· value.<br />
<br />
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0013376)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				13-10-2015 16:12&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				OK, clarified now. XSD version 1.0 didn't allow '0000', version 1.1 does allow this.<br />
<br />
So, there is no problem to go for<br />
&#160;&#160;year := &quot;[0-9]<a href="/mantis/view.php?id=4" title="[resolved] TC_COR_8262_01 Unsolicited RA" class="resolved">0000004</a>&quot;<br />
<br />
For any case I will add a note to clause 6.5.2 Date and time:<br />
NOTE: Please note that XSD version 1.0 didn't allow the year '0000'. XSD version 1.1 allows this.			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0013377)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				13-10-2015 16:13&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				See resolution in the last note.			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td class="print-spacer" colspan="2">
		<hr size="1" />
	</td>
</tr>
<tr>
	<td class="nopad" valign="top" width="20%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				(0013554)
			</td>
		</tr>
		<tr>
			<td class="print">
				<a href="http://oldforge.etsi.org/mantis/view_user_page.php?id=127">Gyorgy Rethy</a>&#160;&#160;&#160;
			</td>
		</tr>
		<tr>
			<td class="print">
				04-12-2015 14:07&#160;&#160;&#160;
							</td>
		</tr>
		</table>
	</td>
	<td class="nopad" valign="top" width="85%">
		<table class="hide" cellspacing="1">
		<tr>
			<td class="print">
				Added to draft version V4.6.3			</td>
		</tr>
		</table>
	</td>
</tr>
</table>
</body>
</html>
