View Issue Details

IDProjectCategoryView StatusLast Update
000802210000-005: Information ModelSpecpublic2022-07-05 16:27
ReporterJeff Harding Assigned ToJeff Harding  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Summary0008022: Regular Expression Property for DataTypes
Description

In the Machinery spec we have defined a TrimmedString DataType

10.2 TrimmedString
This Simple DataType is a subtype of String representing a string with no leading or trailing whitespace, where whitespace means the Unicode characters defined as whitespace (“WSpace=Y”, “WS”) in the Unicode database.
Where a TrimmedString is specified as input (e.g. input argument to a Method or writing a Variable) and the incoming string contains leading or trailing whitespace, the Server is entitled to react with an error (Bad_TypeMismatch) or – preferably – silently trim the string internally before processing it.

This seems to be rather general and could be defined in the base spec instead of.

TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

related to 0007397 closedJeff Harding Add TrimmedString DataType 

Activities

Jim Luth

2022-06-01 14:32

administrator   ~0016777

Discussed in telecon. We may want to provide a more generic mechanism using a pattern like a regular expression or XML pattern. And then define patterns for specific derived types like the existing URIString and this proposed TrimmedString.

Jeff Harding

2022-06-01 14:32

developer   ~0016778

To define this in a more generic way would require the DataType to be a Structure consisting of the String and a manipulation defining string pattern or expression.
Is this what is needed or is it really just a classification of DataType String to indicate to a client that it will not have leading and trailing whitespace?

One option would be to define a 'ManipulatedString' DataType which would indicate some processing is done by the Server. This type would then be subtyped to define specific manipulations such as TrimmedString. We could also use the ManipulatedString subType of String in a Structured DataType to create a regulate expression or pattern based Manipluated String type. The Structure would include the ManipulatedString and a second string which defines the expression or pattern.

I suggest we start with the ManipulatedString DataType and maybe some other subtypes such as TrimmedString, LowerCaseString, UpperCaseString. We can then decide in a future step if we need the Structured DataType.

Wolfgang Mahnke

2022-06-01 14:32

developer   ~0016779

The intended solution was not described very well in my note.

The idea is to define a Property for DataTypes that contain a RegularExpression.
So the TrimmedString would still be a subtype of String, but the DataType would have a property describing the pattern.

Other DataTypes, potentially in any place of the DataType hierarchy, can have this property as well. Does not need a common supertype.
However, maybe we want to restrict to subtypes of String.

BTW: The Property can be in a later version of the Spec, the TrimmedString is needed rather short term.

Jeff Harding

2022-06-01 14:32

developer   ~0016780

Agreed to create a TrimmedString as a subtype of String DataType now.
Will clone this issue as a feature request for a regular expression property to be added to a DataType to describe some manipulation.
Should consider both string and numeric manipulations.

Jeff Harding

2022-06-01 14:32

developer   ~0016781

Added TrimmedString type

Jeff Harding

2022-06-01 14:34

developer   ~0016782

Cloned 7397 to address future feature to define Regular Expression DataType

Issue History

Date Modified Username Field Change
2022-06-01 14:32 Jeff Harding New Issue
2022-06-01 14:32 Jeff Harding Status new => assigned
2022-06-01 14:32 Jeff Harding Assigned To => Jeff Harding
2022-06-01 14:32 Jeff Harding Issue generated from: 0007397
2022-06-01 14:32 Jeff Harding Note Added: 0016777
2022-06-01 14:32 Jeff Harding Note Added: 0016778
2022-06-01 14:32 Jeff Harding Note Added: 0016779
2022-06-01 14:32 Jeff Harding Note Added: 0016780
2022-06-01 14:32 Jeff Harding Note Added: 0016781
2022-06-01 14:32 Jeff Harding Relationship added related to 0007397
2022-06-01 14:34 Jeff Harding Status assigned => new
2022-06-01 14:34 Jeff Harding Note Added: 0016782
2022-07-05 16:27 Jim Luth Status new => assigned