
The following definition:
DateAndTime ::= TEXTUAL-CONVENTION DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d" STATUS current DESCRIPTION "A date-time specification.
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as:
1992-5-26,13:30:15.0,-4:0
Note that if only local time is known, then timezone information (fields 8-10) is not present." SYNTAX OCTET STRING (SIZE (8 | 11))
Gets converted to:
<xsd:simpleType name="DateAndTime"> xsd:annotation xsd:documentation A date-time specification.
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as:
1992-5-26,13:30:15.0,-4:0
Note that if only local time is known, then timezone information (fields 8-10) is not present. </xsd:documentation> xsd:appinfo <displayHint>2d-1d-1d,1d:1d:1d.1d,1a1d:1d</displayHint> </xsd:appinfo> </xsd:annotation> <xsd:restriction base="xsd:string"> xsd:pattern value="((0|[1-9](([0-9]){0,4}))-(0|[1-9](([0-9]){0,2}))-(0|[1-9](([0-9]) {0,2})),(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9]) {0,2})).(0|[1-9](([0-9]){0,2})))|((0|[1-9](([0-9]){0,4}))-(0|[1-9](([0-9 ]){0,2}))-(0|[1-9](([0-9]){0,2})),(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9 ]){0,2})):(0|[1-9](([0-9]){0,2})).(0|[1-9](([0-9]){0,2})),((\p{IsBasicLa tin}){1})(0|[1-9](([0-9]){0,2})):((0|[1-9](([0-9]){0,2})))"/ <xsd:minLength value="8"/> <xsd:maxLength value="8"/> </xsd:restriction> </xsd:simpleType>
The display hint shows the value is 11 chars long. The minLength and maxLength fields are both set to "8". There really should be two min and max length restrictions (8 and 11). What happens if there are more?
Steve

Hi Steve!
On Mon, Jun 30, 2003 at 02:03:57PM -0400, Steve Bucknam wrote:
The following definition:
DateAndTime ::= TEXTUAL-CONVENTION DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d" STATUS current DESCRIPTION "A date-time specification.
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as: 1992-5-26,13:30:15.0,-4:0 Note that if only local time is known, then timezone information (fields 8-10) is not present." SYNTAX OCTET STRING (SIZE (8 | 11))
Gets converted to:
<xsd:simpleType name="DateAndTime"> xsd:annotation xsd:documentation A date-time specification.
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be displayed as: 1992-5-26,13:30:15.0,-4:0 Note that if only local time is known, then timezone information (fields 8-10) is not present. </xsd:documentation> <xsd:appinfo> <displayHint>2d-1d-1d,1d:1d:1d.1d,1a1d:1d</displayHint> </xsd:appinfo> </xsd:annotation> <xsd:restriction base="xsd:string"> <xsd:pattern
value="((0|[1-9](([0-9]){0,4}))-(0|[1-9](([0-9]){0,2}))-(0|[1-9](([0-9]) {0,2})),(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9]) {0,2})).(0|[1-9](([0-9]){0,2})))|((0|[1-9](([0-9]){0,4}))-(0|[1-9](([0-9 ]){0,2}))-(0|[1-9](([0-9]){0,2})),(0|[1-9](([0-9]){0,2})):(0|[1-9](([0-9 ]){0,2})):(0|[1-9](([0-9]){0,2})).(0|[1-9](([0-9]){0,2})),((\p{IsBasicLa tin}){1})(0|[1-9](([0-9]){0,2})):((0|[1-9](([0-9]){0,2})))"/> <xsd:minLength value="8"/> <xsd:maxLength value="8"/> </xsd:restriction> </xsd:simpleType>
The display hint shows the value is 11 chars long. The minLength and maxLength fields are both set to "8". There really should be two min and max length restrictions (8 and 11). What happens if there are more?
I cannot reproduce this bug neither in version 0.4.1 nor in version 0.4.2-pre1 (current CVS). The correct behavior should be not to generate min/maxLength facets. The pattern already includes the length information. Actually, it is composed of two patterns, one describing the string with a length of 8 and another pattern describing the string with a length of 11.
If there were more than two length restrictions the generated pattern would be composed of more than two (sub-)patterns.
Regards Torsten
participants (2)
-
Steve Bucknam
-
Torsten Klie