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

ID | Project | Category | View Status | Date Submitted | Last Update
0006868 | Part 09: Using XML with TTCN-3 | Technical | public | 20-01-2015 15:32 | 04-12-2015 14:07

Reporter | Bogdan Stanca-Kaposta |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | always
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.5.1 (published 2013-04) |
Target Version | v4.7.1 (published 2016-07) | Fixed in Version | v4.7.1 (published 2016-07) |
Clause Reference(s) | Annex A, 6.5.6
For STF discussion |
Source (company - Author) | STF475

Summary | 0006868: XSD.GYear does not allow years greater than 9999

Description

yearExpansion is too strict and does not allow positive years having more than 4 digits (only negative ones).
Proposed solution is to update the yearExpansion to
const charstring
...
year := "[0-9]#(4)", // or "\d#4"
yearExpansion := "-#(,1)([1-9][0-9]#(0,))#(,1)",
...
Please check the lexical mapping fom W3C
[56] yearFrag ::= '-'? (([1-9] digit digit digit+)) | ('0' digit digit digit))
source: http://www.w3.org/TR/xmlschema11-2/#nt-yrFrag [^]
Examples from W3C
<ex:gYearElement>10739</ex:gYearElement>
source: http://www.w3.org/2002/ws/databinding/examples/6/09/GYearElement/ [^]

Steps To Reproduce | To reproduce please execute the XML Conformance Test Pos_060506_gregorian_year_003
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files |

Issue History
Date Modified | Username | Field | Change
20-01-2015 15:32 | Bogdan Stanca-Kaposta | New Issue |
21-01-2015 10:14 | Bogdan Stanca-Kaposta | Note Added: 0012675 |
21-01-2015 10:14 | Bogdan Stanca-Kaposta | Note Edited: 0012675 | bug_revision_view_page.php?bugnote_id=12675#r109
21-01-2015 10:14 | Bogdan Stanca-Kaposta | Note Edited: 0012675 | bug_revision_view_page.php?bugnote_id=12675#r110
21-01-2015 10:15 | Bogdan Stanca-Kaposta | Note Edited: 0012675 | bug_revision_view_page.php?bugnote_id=12675#r111
21-01-2015 10:18 | Jacob Wieland - Spirent | Description Updated | bug_revision_view_page.php?rev_id=113#r113
21-01-2015 10:18 | Jacob Wieland - Spirent | Note Edited: 0012675 | bug_revision_view_page.php?bugnote_id=12675#r114
14-05-2015 10:08 | Gyorgy Rethy | Target Version | => v4.7.1 (published 2016-07)
03-08-2015 14:27 | Gyorgy Rethy | Assigned To | => Gyorgy Rethy
03-08-2015 14:27 | Gyorgy Rethy | Status | new => assigned
13-10-2015 12:09 | Gyorgy Rethy | Note Added: 0013365 |
13-10-2015 12:10 | Gyorgy Rethy | Note Edited: 0013365 | bug_revision_view_page.php?bugnote_id=13365#r184
13-10-2015 12:13 | Gyorgy Rethy | Note Edited: 0013365 | bug_revision_view_page.php?bugnote_id=13365#r185
13-10-2015 12:13 | Gyorgy Rethy | Note Edited: 0013365 | bug_revision_view_page.php?bugnote_id=13365#r186
13-10-2015 12:14 | Gyorgy Rethy | Note Edited: 0013365 | bug_revision_view_page.php?bugnote_id=13365#r187
13-10-2015 12:15 | Gyorgy Rethy | Note Edited: 0013365 | bug_revision_view_page.php?bugnote_id=13365#r188
13-10-2015 12:16 | Gyorgy Rethy | Assigned To | Gyorgy Rethy => Jacob Wieland - Spirent
13-10-2015 12:16 | Gyorgy Rethy | Status | assigned => confirmed
13-10-2015 15:37 | Jacob Wieland - Spirent | Note Added: 0013375 |
13-10-2015 15:40 | Jacob Wieland - Spirent | Note Edited: 0013375 | bug_revision_view_page.php?bugnote_id=13375#r190
13-10-2015 15:47 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
13-10-2015 15:47 | Jacob Wieland - Spirent | Status | confirmed => assigned
13-10-2015 16:12 | Gyorgy Rethy | Note Added: 0013376 |
13-10-2015 16:13 | Gyorgy Rethy | Note Added: 0013377 |
13-10-2015 16:13 | Gyorgy Rethy | Status | assigned => resolved
13-10-2015 16:13 | Gyorgy Rethy | Fixed in Version | => v4.7.1 (published 2016-07)
13-10-2015 16:13 | Gyorgy Rethy | Resolution | open => fixed
04-12-2015 14:07 | Gyorgy Rethy | Note Added: 0013554 |
04-12-2015 14:07 | Gyorgy Rethy | Status | resolved => closed

Notes

(0012675)
Bogdan Stanca-Kaposta
21-01-2015 10:14 (edited on: 21-01-2015 10:18)

The root issue has been already fixed by http://forge.etsi.org/mantis/view.php?id=6742 [^] Nevertheless we could improve the reading of year by replacing it year := "[0-9]#(4)", // without any spaces or "\d#4"

(0013365)
Gyorgy Rethy
13-10-2015 12:09 (edited on: 13-10-2015 12:15)

Actually, XSD prohibits the year "0000" in the fixed-length 4-digit year part. The proposed pattern would allow "0000" and TTCN-3 pattern does not allow excluding certain concrete values from the patterns)
But I agree, the year pattern should be changed to increase readibility (and make the fixed length more visible):
year := "(0#3[1-9])|(0#2[1-9][0-9])|(0[1-9][0-9]#(2))|([1-9][0-9]#(3))"
NOTE: in the final version #(2) and #(3) will be without brackets, but for some reasons Mantis changes them to 0000002 and 0000003 in comments.
(for easier comparisionthe current pattern is:
year := "(0(0(0[1-9]|[1-9][0-9])|[1-9][0-9][0-9])|[1-9][0-9][0-9][0-9])")
Please review!

(0013375)
Jacob Wieland - Spirent
13-10-2015 15:37 (edited on: 13-10-2015 15:40)

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:
[56] yearFrag ::= '-'? (([1-9] digit digit digit+)) | ('0' digit digit digit))
)
This clearly allows 0000.
To quote the description in W3C:
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.

(0013376)
Gyorgy Rethy
13-10-2015 16:12

OK, clarified now. XSD version 1.0 didn't allow '0000', version 1.1 does allow this. So, there is no problem to go for year := "[0-9]0000004" For any case I will add a note to clause 6.5.2 Date and time: NOTE: Please note that XSD version 1.0 didn't allow the year '0000'. XSD version 1.1 allows this.

(0013377)
Gyorgy Rethy
13-10-2015 16:13

See resolution in the last note.

(0013554)
Gyorgy Rethy
04-12-2015 14:07

Added to draft version V4.6.3