Hi
I was having trouble writting my .projectspec file as the XSD validator (vscode xml extension ) kept telling me That I cannot add more than one pathVariable element..
When I then opened the projectSpec.xsd file It told me that it was invalid
"code": "cos-all-limited.2",
"severity": 8,
"message": "cos-all-limited.2: The {max occurs} of an element in an 'all' model group must be 0 or 1. The value 'unbounded' for element 'configuration' is invalid.",
"source": "xsd",
"startLineNumber": 190,
"startColumn": 11,
"endLineNumber": 190,
"endColumn": 17
The offending snippet is at line 190, in the first part of <xs:element name="project">
<xs:all>
<xs:element ref="configuration" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="file" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="pathVariable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="buildVariable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="envVariable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
</xs:all>
After some googeling I found that this seems to work.
<xs:choice maxOccurs="unbounded">
<xs:element ref="configuration" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="file" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="pathVariable" minOccurs="0" />
<xs:element ref="buildVariable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="envVariable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
</xs:choice>