Closed MarAlder closed 1 year ago
Regex as proposed by Semantic Versioning 2.0.0 seems not to work with Eclipse. Also other editiors have trouble with this regex. Let's use xsd:string
until someone finds a solution.
^(?P<major>0|[1-9]\d*)\.(?P<minor>0|[1-9]\d*)\.(?P<patch>0|[1-9]\d*)(?:-(?P<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
(see regex101.com)
Current situation & problem
We have an update node in CPACS to mark the version history. This can be interpreted differently and contains redundant information (see example below). It is not clear whether the latest version is found in
header/version
or if this was the initial version with the latest described inheader/version/updates/update/version
. Furthermore, the parameterstimestamp
,version
andcpacsVersion
are redundant.Proposal
Data structure
We propose to provide the latest version of the dataset in
header/version
. Additional information is given underversionInfos
(open for better naming suggestions..). The trick is that version is a reference to the<versionInfo version="..."> attribute. The corresponding
versionInfo` element contains all the required information.Technically, this is possible in XSD via
key
andkeyref
elements. With this, the dataset is only valid if aversionInfo
element matching the upperversion
entry is found and if eachversion
attribute is unique (similar to uID references).Versioning standard
We propose to follow the Semantic Versioning 2.0.0 standard. Theoretically, the corresponding regex strings can be used to enforce this standard (see here and examples).
It seems at the moment that some editors have problems with this. I get error messages with Eclipse that the regex expression is invalid. Here we need to find a solution to work around the problem.
ToDo