Are there any plans to create XML datatype for Semantic Versioning?
Adding an identifier which represents the version information is based on Semantic Versioning can make the data more machine-friendly and human-readable.
Originally created by @cmplstofB on GitHub (Aug 31, 2019).
Original GitHub issue: https://github.com/semver/semver/issues/529
Are there any plans to create XML datatype for Semantic Versioning?
Adding an identifier which represents the version information is based on Semantic Versioning can make the data more machine-friendly and human-readable.
* Example in RDF/Turtle:
```turtle
@prefix ex: <http://example.com/> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix sv: <http://semver.org/onto#> .
<http://example.org/pub/software/latest.bin>
dct:created "2019-08-31"^^dct:W3CDTF ;
ex:versionInfo "1.0.0-beta"^^sv:VersionString .
```
* Example in RDF/XML:
```xml
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ex="http://example.com/"
xmlns:dct="http://purl.org/dc/terms/"
>
<rdf:Description rdf:about="http://example.org/pub/software/latest.bin">
<dct:created rdf:datatype="http://purl.org/dc/terms/W3CDTF">2019-08-31</dct:created>
<ex:versionInfo rdf:datatype="http://semver.org/onto#VersionString">1.0.0-beta</ex:versionInfo>
</rdf:Description>
</rdf:RDF>
```
This seems like a good idea. I think however, for those purposes, you may need a much more robust regex and we'd definitely need a lot more testing infrastructure to validate it. The example regex provided by the spec has been vetted against a large enough data set that we have high confidence in it, but the regex itself, depends on the version string being the sole content and starting at the beginning of the line.
I would add that all our test oracles are one liners as well.
<!-- gh-comment-id:528490662 -->
@jwdonahue commented on GitHub (Sep 5, 2019):
This seems like a good idea. I think however, for those purposes, you may need a much more robust regex and we'd definitely need a lot more testing infrastructure to validate it. The [example regex provided by the spec](https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string) has been vetted against a large enough data set that we have high confidence in it, but the regex itself, depends on the version string being the sole content and starting at the beginning of the line.
___
I would add that all our test oracles are one liners as well.
Also, a lone version triple is not distinguishable as a SemVer string. Given the state of current practice in the software industry, you cannot unambiguously label the string "1.0.0" as a SemVer string, nor perhaps, in the absence of sufficient context, can you identify it as a version string of any kind.
<!-- gh-comment-id:530479360 -->
@jwdonahue commented on GitHub (Sep 11, 2019):
Also, a lone version triple is not distinguishable as a SemVer string. Given the state of current practice in the software industry, you cannot unambiguously label the string "1.0.0" as a SemVer string, nor perhaps, in the absence of sufficient context, can you identify it as a version string of any kind.
+1 to this one.
It would be very nice to have an official xsd/namespace constraining SemVer values in xml files.
<!-- gh-comment-id:3348027300 -->
@clemchst commented on GitHub (Sep 29, 2025):
+1 to this one.
It would be very nice to have an official xsd/namespace constraining SemVer values in xml files.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @cmplstofB on GitHub (Aug 31, 2019).
Original GitHub issue: https://github.com/semver/semver/issues/529
Are there any plans to create XML datatype for Semantic Versioning?
Adding an identifier which represents the version information is based on Semantic Versioning can make the data more machine-friendly and human-readable.
@cmplstofB commented on GitHub (Aug 31, 2019):
Here is an example of the ontology for semver (it may contain some errors...);
@wizzwizz4 commented on GitHub (Sep 1, 2019):
What's that /onto page? It's not a URL; is it just a namespace URI?
@cmplstofB commented on GitHub (Sep 1, 2019):
@wizzwizz4 Yes.
I prepared the URI just to give an example.
@jwdonahue commented on GitHub (Sep 5, 2019):
This seems like a good idea. I think however, for those purposes, you may need a much more robust regex and we'd definitely need a lot more testing infrastructure to validate it. The example regex provided by the spec has been vetted against a large enough data set that we have high confidence in it, but the regex itself, depends on the version string being the sole content and starting at the beginning of the line.
I would add that all our test oracles are one liners as well.
@jwdonahue commented on GitHub (Sep 11, 2019):
Also, a lone version triple is not distinguishable as a SemVer string. Given the state of current practice in the software industry, you cannot unambiguously label the string "1.0.0" as a SemVer string, nor perhaps, in the absence of sufficient context, can you identify it as a version string of any kind.
@clemchst commented on GitHub (Sep 29, 2025):
+1 to this one.
It would be very nice to have an official xsd/namespace constraining SemVer values in xml files.