Empty strings should not be allowed for identifiers
Describe the bug
Email from Gabor Takacs (aimotive):
Dear ASAM Support,
I'm Gabor Takacs from aiMotive. I have a question about the OpenScenario Standard: Can attributes marked as type="String" use="required" in OpenScenario XSD be empty strings?
In the OpenScenario XSD model documentation (https://www.asam.net/static_downloads/ASAM_OpenSCENARIO_V1.2.0_Model_Documentation/modelDocumentation/RenderedXsdOutput.html) there are several required string attributes. For example: <xsd:complexType name="Condition"> … <xsd:attribute name="name" type="String" use="required"/> </xsd:complexType>
<xsd:complexType name="EntityRef"> <xsd:attribute name="entityRef" type="String" use="required"/> </xsd:complexType>
<xsd:complexType name="File"> <xsd:attribute name="filepath" type="String" use="required"/> </xsd:complexType>
In OpenScenario xsd, the String is: <xsd:simpleType name="String"> <xsd:union memberTypes="parameter xsd:string"/> </xsd:simpleType>
Based on the xsd standard, the required xsd:string attributes can be empty strings, so the following elements are correct: ...
In theory, 2 out of 3 examples can be correct with an empty string: • 1 Condition with an empty name per scope • An empty entityRef also makes sense if there is a ScenarioObject with an empty name But filepath always incorrect with empty string and in my opinion, this (required but empty string) makes the readability of xosc worse and even while running the scenario, it made the transparency worse. So, my question is, can the attributes marked as type="String" use="required" really be empty strings, or is the real purpose of the use="required" in the standard that not only is the attribute mandatory, but the string cannot be empty?
Describe the expected behavior
Strings used as identifiers in general should match the regular expression: [A-Za-z_][A-Za-z0-9_]*